aspose file tools*
The moose likes Struts and the fly likes Struts 2 tags: %{bla bla} what is the percentage notation used for? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 tags: %{bla bla} what is the percentage notation used for?" Watch "Struts 2 tags: %{bla bla} what is the percentage notation used for?" New topic
Author

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

Hermann Maurer
Greenhorn

Joined: Oct 19, 2009
Posts: 4
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

Joined: Sep 29, 2008
Posts: 12617

Moved to the Struts forum.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It's the OGNL escape notation, just like ${} is the JSP EL escape.
Hermann Maurer
Greenhorn

Joined: Oct 19, 2009
Posts: 4
Thanks for the fast reply!

BR/Hermann
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 tags: %{bla bla} what is the percentage notation used for?
 
Similar Threads
Autoboxing and references
Empty space caused by rendered attribute
Spring security framework with fine grained permissions
Dynamic data population from database and display in jsp
Replace text by HTML links