Author
el expression as parameter in el function
Jonh Smith
Ranch Hand
Joined: Mar 18, 2010
Posts: 39
posted May 17, 2010 10:23:36
0
Hello.
I have a tag file defined like this:
localeString is an el function defined in the tld like this:
when it tries to compile the tag file, the container ( glassfish 2.1) complains line this:
Can anyone help me by telling me exactly what am i doing wrong ? is it illegal to use an el expression as a string parameter of an el function ?
Thanks
Jonh Smith
Ranch Hand
Joined: Mar 18, 2010
Posts: 39
posted May 17, 2010 10:36:27
0
figured it out: it should be
${mytags:localeString(language, "navbar.menubutton.label.users", "")}
not
${mytags:localeString(${ language} , "navbar.menubutton.label.users", "")}
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
This is a mistake a lot of people make -- thinking that ${} is some sort of operator. It's not. It encloses the entire EL expression and should never be nested within one.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Jonh Smith
Ranch Hand
Joined: Mar 18, 2010
Posts: 39
posted May 17, 2010 14:34:52
0
Thanks Bear !
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
subject: el expression as parameter in el function