struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Evaluate a string property containing some OGNL expression
Date Wed, 27 Feb 2008 23:28:06 GMT
Maxx wrote:
> Back on this:
> 
>>         <s:set name="testValue" value="%{12}" />
>>         testValue = <s:property value="#testValue" /> // print 1
>>
>>         <s:set name="testValueName" value="%{'testValue'}" />
>>         testValueName = <s:property value="#testValueName" /> // print testValue
>>
>>         // print nothing!!!
>>         testValue (via xxxName) = <s:property value="%{%{#testValueName}}" />


That last line wont work because it's not a valid OGNL expression. 
However, looking back through the thread, it seems what you're looking 
for is a way to shorten a long OGNL expression. Take a look at the 
s:push tag, I think that'll give you what you need. Alternatively, post 
a real-world example of a situation where you need to do this. It's 
likely that what you're doing now can be simplified a lot by knowing how 
OGNL's value stack is getting manipulated.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message