Eclipse Facelet HTML Validator: Cannot apply expression operators to method bindings

Candice picture Candice · Jan 5, 2014 · Viewed 14.5k times · Source

The Eclipse Facelet HTML Validator reports an error "Cannot apply expression operators to method bindings" for the following line:

<ui:fragment rendered="#{!empty managedBean.getSomething('ENUM_VALUE', someInt)}">

I found this in the Juno help (I'm using Kepler):

Applying operator to method binding
#{bean.action * 5}
If bean.action indicates a method "action()" on bean, then it is not legal EL to treat its result as a value. In the example, multiplying action by 5 attempts treat it is as a value.

I'm having trouble understanding why it's not legal to treat its result as a value? What's the correct way to write the EL then? Thanks!

Answer

pasql picture pasql · Jan 31, 2014

If you like you can hide the error message by setting

Window -> Preferences -> Web -> JavaServer Faces Tool -> Validation -> General Problems

the value Applying method operator to binding to Ignore.