/** * Returns the value of the datatype as returned by {@link #getValue()} but * returns an empty string ("") if the value is <code>null</code>. This * method is mostly provided as a convenience in code which maps from one * format to another, since it avoids the need for some null checks. */ public String getValueOrEmpty() { String retVal = getValue(); if (retVal == null) { retVal = ""; } return retVal; }
/** * Returns the value of the datatype as returned by {@link #getValue()} but * returns an empty string ("") if the value is <code>null</code>. This * method is mostly provided as a convenience in code which maps from one * format to another, since it avoids the need for some null checks. */ public String getValueOrEmpty() { String retVal = getValue(); if (retVal == null) { retVal = ""; } return retVal; }
return FormattedTextEncoder.getInstanceHtml().encode(getValue());
return FormattedTextEncoder.getInstanceHtml().encode(getValue());