My question is straightforward as you can see.
What is the difference between #{...}
and ${...}
in EL Syntax?
Simply put, the ${}
can do only a get
, while the #{}
can do a get
and a set
of the value.
In JSF on legacy JSP, the #{}
syntax is mandatory to trigger auto-creation of managed beans and to set request parameters as model values. If you used ${bean.value}
in a JSF page, then the managed bean with name bean
won't be auto-created if it isn't already in the scope. Also, the managed bean property value
won't be set if the form was submitted with that value in an input component.
In JSF on Facelets, the ${}
is reinterpreted as #{}
and thus they will behave exactly the same.
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