On Wednesday 28 January 2009 10:50:27 Ryan Peterson wrote:
> Hi guys, I have an object accessible using <s:property value="p.myInteger"
> />, which displays an arbitrary integer.
>
> Is there a way to dynamically put this into an OGNL method call, something
> like:
>
> <s:set name="DynamicCodeType"
>       value="@com.whatever.myactioncl...@getcodetype(p.myInteger)'"/>
>
> Right now I can populate @getCodeType with an integer value
> @getCodeType(111) for example, which returns the expected results.  But
> when I use p.myInteger I can't seem to get it to resolve for the method
> call.
>
> Thank you!

What is 'p' ? Are you in an iterator or something? The @fqdn@ is for invoking 
static methods. Regular methods (exposed by objects on the stack) can be 
called pretty easily stackObj.method().

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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

Reply via email to