Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 tags: %{bla bla} what is the percentage notation used for?

 
Hermann Maurer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I don't get over the hump with '%{', google did not resolve for me:-(

I take an example from the following link, as it used heavily the '%{':
http://www.javaworld.com/javaworld/jw-10-2007/jw-10-struts2inaction.html?page=4


value="%{id}" />
<s:textfield
name="ngContainerVO.ngAttributes[%{#stat.index}].value"
value="%{value}" label="%{displayName}" title="%{description}" />

In general:
'#' is used to access the value stack of struts
'${' is used for Expression Language (which is not used in struts)
'%{' I don't know what it is ??? Maybe someone is so kind to explain this with an example ???

Help is very much appreciated.

Many thanks,
Hermann


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's the OGNL escape notation, just like ${} is the JSP EL escape.
 
Hermann Maurer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the fast reply!

BR/Hermann
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic