• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the fast reply!

BR/Hermann
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic