March 24th, 2011
6:41 pm
Posted under JSF
Permalink
Tags EL, Gotcha, JSF, Tip
Some quick points on this are as follows:-
- If you are using double quotes at the out level e.g. for HTML attributes, use single quotes inside the EL expressions
- If you need quotes inside the EL, escape them with backslash as per normal Java standards
An example of an attribute containing EL with escaped quotes follows (note that the blog post may mess up the quote appearance slightly) :-
onstart="return #{empty cc.attrs.onstart ? ‘true’ : el:format1(cc.attrs.onstart, el:concat3(‘\”, component.clientId, ‘\”))}"
Leave a Reply
You must be logged in to post a comment.