Here is the controlcode:<br><br><span style="font-family: courier new,monospace;"><?xml version="1.0" encoding="UTF-8"?></span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"><pages xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:noNamespaceSchemaLocation="<a href="http://www.opencms.org/dtd/6.0/xmlpage.xsd">http://www.opencms.org/dtd/6.0/xmlpage.xsd</a>"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <page language="en"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <element name="lcontent"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <links/></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <content/></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </element></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <element name="mcontent"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <links/></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <content/></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </element></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <element name="rcontent"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> <links /></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> <content /></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> </element></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </page></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></pages></span><br style="font-family: courier new,monospace;"><br><br><br><br>On 29 March 2011 17:48, Mario Jäger <<a href="mailto:m.jaeger@alkacon.com">m.jaeger@alkacon.com</a>> wrote:<br>
><br>> Hi Yves,<br>><br>> Please, show me the control code of your "page with free text". The<br>> structure is important for me, not the content of the elements. Shall<br>> mean, that you can remove the content of the elements, of course.<br>
><br>> Kind Regards,<br>> Mario.<br>><br>> Am 29.03.2011 16:45, schrieb Yves Glodt:<br>> > Hi Mario,<br>> ><br>> > in fact the element exists in the page, so yes, I wonder why isEmpty<br>
> > returns "true".<br>
> ><br>> > And I also wonder why the 2 other calls return false... :-)<br>> ><br>> > Is there another way to check whether an element exists in a page?<br>> ><br>> > The example here does also not work as I expect:<br>
> > <a href="http://opencms-wiki.org/EL_functions_provided_by_OpenCMS_taglib#XML_content">http://opencms-wiki.org/EL_functions_provided_by_OpenCMS_taglib#XML_content</a><br>> ><br>> > Maybe I expect something impossible. As said, my page is a simple "page<br>
> > with free text"<br>> ><br>> ><br>> > On 29 March 2011 16:13, Mario Jäger <<a href="mailto:m.jaeger@alkacon.com">m.jaeger@alkacon.com</a><br>> > <mailto:<a href="mailto:m.jaeger@alkacon.com">m.jaeger@alkacon.com</a>>> wrote:<br>
> ><br>> > Hi Yves,<br>> ><br>> > I assume, that you are wondering over the (second) return value "true",<br>> > because the element does not exist in your xml content. With the three<br>
> > function calls you use, methods in<br>> > org.opencms.jsp.util.CmsJspContentAccessValueWrapper.java are used. The<br>> > second call uses the method getIsEmpty() in that class. And that method<br>
> > also returns true for non existing values. The description for that<br>> > method says: Returns true in case the value is empty, that is either<br>> > null or an empty String.<br>> ><br>
> > Kind Regards,<br>> > Mario.<br>> ><br>> > Am 29.03.2011 14:58, schrieb Yves Glodt:<br>> > > Hello,<br>> > ><br>> > > I try to check if an element exists in a "page with free text",<br>
> > and if<br>> > > yes, include it.<br>> > ><br>> > > The check I do like this (in a c:if), but these 3 calls return<br>> > "false,<br>> > > true, false" (in order of appearance)<br>
> > ><br>> > ${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].hasValue['rcontent']}<br>> > ><br>> > ${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].value['rcontent'].isEmpty}<br>
> > ><br>> > ${cms:vfs(pageContext).xml[cms:vfs(pageContext).context.uri].value['rcontent'].exists}<br>> > ><br>> > > What is wrong about this?<br>> > ><br>
> > > Best regards,<br>> > > Yves<br>> > ><br>> > ><br>> > ><br>> > ><br>> > ><br>> > ><br>> > > _______________________________________________<br>
> > > This mail is sent to you from the opencms-dev mailing list<br>> > > To change your list options, or to unsubscribe from the list,<br>> > please visit<br>> > > <a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>
> ><br>> ><br>> > --<br>> > -------------------<br>> > Mario Jäger<br>> ><br>> > Visit OpenCms Days 2011 Conference and Expo<br>> > May 9 to May 10 2011 in Cologne, Germany<br>
> > <a href="http://www.opencms-days.org">http://www.opencms-days.org</a><br>> ><br>> > Alkacon Software GmbH - The OpenCms Experts<br>> > <a href="http://www.alkacon.com">http://www.alkacon.com</a> - <a href="http://www.opencms.org">http://www.opencms.org</a><br>
> ><br>> ><br>> ><br>> ><br>> ><br>> > _______________________________________________<br>> > This mail is sent to you from the opencms-dev mailing list<br>> > To change your list options, or to unsubscribe from the list, please visit<br>
> > <a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>><br>><br>> --<br>> -------------------<br>> Mario Jäger<br>><br>> Visit OpenCms Days 2011 Conference and Expo<br>
> May 9 to May 10 2011 in Cologne, Germany<br>> <a href="http://www.opencms-days.org">http://www.opencms-days.org</a><br>><br>> Alkacon Software GmbH - The OpenCms Experts<br>> <a href="http://www.alkacon.com">http://www.alkacon.com</a> - <a href="http://www.opencms.org">http://www.opencms.org</a><br>
><br>> _______________________________________________<br>> This mail is sent to you from the opencms-dev mailing list<br>> To change your list options, or to unsubscribe from the list, please visit<br>> <a href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br>