I would like to set in java code value in my xhtml portlet in attribut required.
I'm trying this:
required="{portalProperties.checkRequired(foo)}"
Java code
public boolean checkRequired(String inputName) {
if ("foo".equals(inputName))
return true;
else
return false;
}
but my function doesn't invoke. Can somebody tell me how to solve my problem?
You are missing the hash (#) sign in front of the el expression: #{...}.