I have a button that I'd like to render based on whether a function returns true or false.
The HTML:
<p:commandButton type="button" rendered="#{myBean.checkPermission(1)}" value="Create" />
And the supporting bean:
public boolean checkPermission(String actionKey) {
...
}
The problem is that when I call checkPermission with a numeric parameter like
#{myBean.checkPermission(1)}
,
it works fine, but with I pass a String as a parameter, i.e.
#{myBean.checkPermission(ABC)}
, I get an empty string passed. Any idea why?