Jsp 使用Struts2';s<;s:房地产>;标记入<;显示:表格>;标签
我正在尝试使用DisplayTag将列表添加到表中 当我以通常的方式向列添加列表属性时,一切正常工作:Jsp 使用Struts2';s<;s:房地产>;标记入<;显示:表格>;标签,jsp,struts2,displaytag,ognl,Jsp,Struts2,Displaytag,Ognl,我正在尝试使用DisplayTag将列表添加到表中 当我以通常的方式向列添加列表属性时,一切正常工作: <display:column property="status" title="Claim Status"/> <display:column property="authNo" title="Authorization Number" href="authSlipMasterAction"> 现在,我想检查authNo何时不是空的;如果为空,则不提供链接,那么
<display:column property="status" title="Claim Status"/>
<display:column property="authNo" title="Authorization Number" href="authSlipMasterAction">
现在,我想检查authNo何时不是空的;如果为空,则不提供链接,那么如何在
标记中使用
和
我尝试使用
显示值,但没有显示值(我必须显示值,因为我想检查条件)
这是我的密码
<display:table uid="myTable" id="display-tag" name="session.claimReportList">
<display:column title="Authorization No">
<s:property value="#attr.myTable.transNo" />
</display:column>
我也试过了
<s:property value="#session.myTable.transNo" />
在显示标签列中时,您需要在
或
中使用#attr.
符号;您还需要访问您的对象
例如:
发件人:
#attr['foo']
或#attr.foo
访问PageContext
如果可用,否则搜索
请求
/会话
/应用程序
S:我会考虑查看一些新的网格,但是,
请在显示标签内尝试下面的代码。
2.行是您用于
显示:表
的id
3.authNo:您的自定义属性<s:if test="%{#attr.row.authNo != null}">
<display:column title="Status">Your custom message</display:column>
</s:if>
您的自定义消息
希望它能帮助你 是的,我忘了带UID的东西。我把它添加到了答案中,链接了我几个世纪前写的原始答案。。。如果行得通,请试一试。@您能试着用打印机打印吗