[opencms-dev] cmstag:contentcheck ifexists suggestion
Jorge González
informatico at hotelparadisepark.com
Wed Nov 9 16:39:27 CET 2005
Hi list:
The <cmstag:contentcheck ifexists="xxx"> tag returns "true" if the content
does not exist, that is, in the case of an html attribute.
An empty html field is automatically completed with a <br /> by the xml
content editor page.
I'm using this method, and it works as expected:
public boolean isEmpty(String str) {
if(str == null) return true;
else if("".equals(str)) return true;
else if("<br />".equals(str.trim())) return true;
else if("<br />".equals(str.trim())) return true;
else
return false;
}
More information about the opencms-dev
mailing list