Tags 如何使用显示标记传递参数?

Tags 如何使用显示标记传递参数?,tags,struts,query-string,displaytag,querystringparameter,Tags,Struts,Query String,Displaytag,Querystringparameter,我正在使用display标签。在我的display:column中,我需要记录上的href链接,如果单击count的链接,它将转到我的struts操作页面,同时我需要“哪个实例类型”和“评级元素id”。因此,请给我建议,将该值作为查询字符串传递。目前使用的是struts版本1.2.9 我的示例代码是 <c:if test="${(asnAccuracyListUID.instanceType != null && asnAccuracyListUID.instanceTyp

我正在使用display标签。在我的display:column中,我需要记录上的href链接,如果单击count的链接,它将转到我的struts操作页面,同时我需要“哪个实例类型”和“评级元素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"/>

<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"/>


中删除
属性=“firstWeekOfCount”
我的问题是

<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"/>
<display:table name="${weeklyDlvyInstancesDashboardReportForm.asnAccuracyListQO}" uid="asnAccuracyListUID" sort="list" defaultsort="1" 
                                        requestURI="/weeklyDlvyInstancesDashboardReportPre.do?method=httpGet" excludedParams="method"
                                        decorator="com.ford.mpl.superg.decorator.WeeklyDeliveryInstancesTypeTableDecorator" keepStatus="true">
                                        <%@include file="/jsp/include/displaytag.jsp"%>
                                        <c:set value="${asnAccuracyListUID.firstWeekOfCountLabel}" var="asnAccuracyFirstWeekOfCount"/>
                                        <c:set value="${asnAccuracyListUID.secondWeekOfCountLabel}" var="asnAccuracySecondWeekOfCount"/>
                                        <c:set value="${asnAccuracyListUID.thirdWeekOfCountLabel}" var="asnAccuracyThirdWeekOfCount"/>
                                        <c:set value="${asnAccuracyListUID.fourthWeekOfCountLabel}" var="asnAccuracyFourthWeekOfCount"/>
                                        <c:set value="${asnAccuracyListUID.fifthWeekOfCountLabel}" var="asnAccuracyFifthWeekOfCount"/>
                                        <c:set value="${asnAccuracyListUID.sixthWeekOfCountLabel}" var="asnAccuracySixthWeekOfCount"/>

                                        <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}" href="${pageContext.request.contextPath }/weeklyDlvyInstancesDashboardReportPost.do?method=WeeklyDlvyInstExcelReport" paramProperty="instanceType" paramId="instanceTypeForJSP" sortable="false" />                          
       <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"/>
                                    </display:table>


您正在使用Struts2。。。尝试使用标记而不是JSTL标记,并使用和获得更简单的代码…啊,好的。。。顺便说一句,您的URL似乎不正确,您在参数中使用了两倍的“?”标记…@Swift对不起,我打错了。它在href属性中打印了什么?我键入了一些名称“详细信息”。但是我想使用property=“firstWeekOfCount”显示列值,如果我删除了该属性,它不会显示任何内容。为什么你说要搬走那笔财产。你想说什么是为了一个特定的原因吗?你能给我详细解释一下吗。谢谢