• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

el expression as parameter in el function

 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear !
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic