【发布时间】:2012-10-06 13:52:30
【问题描述】:
我正在使用显示标签。在我的显示:列中,我需要记录中的 href 链接,如果单击计数的链接,它会转到我的 struts 操作页面,同时我需要“哪个实例类型”和'rating element id'。所以请给我建议将值作为查询字符串传递..目前正在使用struts 1.2.9版 我的示例代码是,
<c:if test="${(asnAccuracyListUID.instanceType != null && asnAccuracyListUID.instanceType != 'Sum')}">
<display:column property="instanceTypeDescription" title="Instance Type" sortable="false"/>
</c:if>
<c:if test="${(asnAccuracyListUID.instanceType != null && asnAccuracyListUID.instanceType == 'Sum')}">
<display:column property="instanceType" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/>
</c:if>
<display:column property="firstWeekOfCount" title="${asnAccuracyFirstWeekOfCount}" sortable="false" >
<a href="weeklyDlvyInstancesDashboardReportPost.do?method=WeeklyDlvyInstExcelReport&instanceType=${asnAccuracyListUID.instanceType}&ratingElementId=${asnAccuracyListUID.ratingElementId}">${asnAccuracyListUID.firstWeekOfCount}</a>
</display:column>
<display:column property="secondWeekOfCount" title="${asnAccuracySecondWeekOfCount}" sortable="false" />
<display:column property="thirdWeekOfCount" title="${asnAccuracyThirdWeekOfCount}" sortable="false" />
<display:column property="fourthWeekOfCount" title="${asnAccuracyFourthWeekOfCount}" sortable="false" />
<display:column property="fifthWeekOfCount" title="${asnAccuracyFifthWeekOfCount}" sortable="false" />
<display:column property="sixthWeekOfCount" title="${asnAccuracySixthWeekOfCount}" sortable="false"/>
【问题讨论】:
-
您正在使用 Struts2... 尝试使用
标签而不是 JSTL 标签,以及 与 和 -
啊好吧...顺便说一句,您的 URL 似乎不正确,您使用的是 '?' 的两倍标记参数...
-
@Swift 对不起,我打错了..
-
我输入了一些名称“详细信息”。但我想使用 property="firstWeekOfCount" 显示列值
标签: tags struts query-string displaytag querystringparameter