I am using a boolean property in a JSF managed bean and depending on its value I have to render a command link on the facelet. But the problem is that facelets is showing this error:
Property 'isPlayButtonEnabled' is not found on my backing bean
So I tested the code by changing the data type of the property from boolean to String. Then facelets didn't show any error. But the command link component didn't get rendered in the view. How is this caused and how can I solve it?
Property 'isPlayButtonEnabled' is not found on my backing bean
Remove the is prefix in the EL expression. It's now looking for a isIsPlayButtonEnabled() method. This should do:
<h:commandButton rendered="#{bean.playButtonEnabled}" />
with
public boolean isPlayButtonEnabled() {
return playButtonEnabled;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With