Reputation: 2557
I noticed this behaviour of JSF EL. 1.
<h:panelGroup rendered="#{!admissionBean.requestStatus=='PR'}">
..some buttons without rendered attribute
</h:panelGroup>
2.
<h:inputText size="6" value="#{dimension.newWeight}" disabled="#{admissionBean.requestStatus=='PR'}"></h:inputText>
1 is not rendered. 2. text box is not disabled.
How can both happen together? textbox not disabled means requestStatus is not equal to PR. that means rendered condition of panel group should be true.
Any help?Am I missing any thing here.
Thanks
Upvotes: 0
Views: 29404
Reputation: 7589
Just giving it a shot: Maybe the ! at the beginning applies as an unary operator, before the == comparison. Hence, the result is not the expected.
Whether this is right or not, I would suggest you to use
<h:panelGroup rendered="#{admissionBean.requestStatus!='PR'}">
..some buttons without rendered attribute
</h:panelGroup>
So the idea of checking if this IS NOT EQUAL TO that performs logically.
Upvotes: 8