从displayTag列元素内部访问Struts2堆栈

从displayTag列元素内部访问Struts2堆栈,struts2,displaytag,Struts2,Displaytag,我想通过访问struts2值堆栈中的属性,使titleKey属性参数化。所以,我想这样做: <display:table name="myListOfObjects" id="myId" requestURI="/myAction.action" pagesize="10"> <display:column property="myProperty" titleKey="my.internationalyzed.i18n.key.myProperty.<s:pro

我想通过访问struts2值堆栈中的属性,使titleKey属性参数化。所以,我想这样做:

<display:table name="myListOfObjects" id="myId" requestURI="/myAction.action" pagesize="10">
    <display:column property="myProperty" titleKey="my.internationalyzed.i18n.key.myProperty.<s:property value='anotherObject.aProperty'/>" />
    ...
在display:table元素之外,它被正确解析,结果值显示在页面上,因此属性被正确地公开和定值。
您知道如何从display:column元素内部访问操作中公开的属性吗?

您可以在非struts标记中使用JSP EL表达式,因此在请求范围中查看时,表达式将要求请求公开值堆栈。比如说

<display:column property="myProperty" titleKey="my.internationalyzed.i18n.key.myProperty.${anotherObject.aProperty}" />

<s:property value='anotherObject.aProperty'/>
<display:column property="myProperty" titleKey="my.internationalyzed.i18n.key.myProperty.${anotherObject.aProperty}" />