Reputation: 3831
How to correct use JSF variables in javascript? My version works how I expected, but IDEA shows error:
Upvotes: 2
Views: 397
Reputation: 31679
JSF should evaluate your EL expression the same way that in the rest of the XHTML file. The only thing you should take care about is that JSF evaluates the EL expressions in server side, and the JS code is executed in client side (keep those cycles in mind and under control).
On the other side, the error you're getting seems to be Intellij complaining about an unrecognized expression in the javascript code. You could configure the IDE to skip that kind of markers.
Upvotes: 3