Available operators in JSF 2.0 ValueExpression
I have been using expressions like this in JSF 1.2: rendered="#{foo.bar!=null && !foo.isBar}". However in JSF 2.0 I've found this doesn't work, and rendered="#{foo.b开发者_如何学Pythonar!=null and !foo.isBar}" comes out to be the solution that doesn't throw any Exception.
Please tell me what operators can be used in these situations!
Thanks in advance, Daniel
&& needs escaping in XML, which is why and works and && doesn't. You would have to write &&. In any case neither is correct. If x has a boolean property bar, the way to test it in EL is via #{x.bar}, not #{x.isBar}.
The EL operators are defined in the documentation.
加载中,请稍侯......
精彩评论