我将 Tiles 2.0 与 Struts2 一起使用,我想做的是从值堆栈中填充一个动作 bean,即
<s:property value="myBean.cod1"/>
会填充类似的东西AS0000123
现在,如果在我的图块定义中我有这样的东西会发生什么:
<definition name="fieldPurpose1" template="fieldPurposeTemplate.jsp">
<put-attribute name="field" value="myBean.cod1"/>
</definition>
因此,在模板中我试图:
<s:set name="fieldSimple"><tiles:insertAttribute name="field"/></s:set>
<s:property value="%{#fieldSimple}"/>
但我得到的是文本myBean.cod1
而不是填充文本。有任何想法吗?