Reputation: 43
I have following attribute in my Facelet:
rendered="#{createTicketBaseBean.show == '#{I18N['key_please_select']}'}"
I am trying to compare the value with property in my properties file, but I get following error:
Error Parsing: #{createTicketBaseBean.show == '#{I18N['key_value_incident']}'}`
But when I replace the above expression with a hard coded value like below:
rendered="#{createTicketBaseBean.show == 'incident'}"
Then it works fine. How do I properly compare against another EL expression?
Upvotes: 1
Views: 476
Reputation: 1108632
This is indeed invalid syntax. You can't and shouldn't nest EL expressions. You should see the #{}
as one whole scope where variables can interact with each other.
Given your desired comparison
createTicketBaseBean.show == I18N['key_please_select']
this is the proper syntax:
rendered="#{createTicketBaseBean.show == I18N['key_please_select']}"
Upvotes: 2