开发者

How to pass parameter to method call in Struts 2 OGNL

开发者 https://www.devze.com 2023-01-01 10:46 出处:网络
I want to use a property as a param of an object\'s method. <s:property value=\"orderProductId\"开发者_JS百科 />

I want to use a property as a param of an object's method.

<s:property value="orderProductId"开发者_JS百科 />

returns correct value (e.g. 1)

<s:iterator value="%{order.getProductById(1).activations}">

gives me correct value too. But

<s:iterator value="%{order.getProductById(#orderProductId).activations}">

doesn't. Not sure why #orderProductId doesn't interpret correctly.


Ah, the joy of %#$ in OGNL... This doesn't work ?

<s:iterator value="%{order.getProductById(orderProductId).activations}">
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号