我可以使用隐藏标签中的列media='none'
吗?由于使用显示标签另一列中隐藏列的值作为超链接的参数,是否会因此产生任何其他后果。
我成功隐藏了该列,但得到了以下结果:服务器日志中的警告
W org.displaytag.tags.ColumnTag setMedia 属性“媒体”的值无法识别 value="none"
我尝试使用隐藏的类,但它没有锻炼,所以我继续使用媒体,因为没有,它起作用了。
<table border="1" width="100%" align="center" cellpadding="0" cellspacing="1" class="table_main">
<display:table name="requestScope.ITIReportForm.rprtData" id="table" export="true" sort="list" requestURI="/itireport.do" pagesize="20" align="center" class="table_main" width="100%">
<display:column width="5%" align="center" media="html" titleKey="" headerClass="table_header" title="Request No">
<a href="/apeweb/homesubmit.do?method=showRequest&requestNo=<%=((ITIReportVO)table).getReqNo()%>&reqStatus=<%=((ITIReportVO)table).getStatusreq()%>&reqType=<%=((ITIReportVO)table).getTypeofrequest()%>"><%=((ITIReportVO)table).getReqNo()%></a>
</display:column>
<display:column width="5%" align="center" class="hidden" media="Excel" title="Request No" headerClass="table_header" >
<%=((ITIReportVO)table).getReqNo()%>
</display:column>
<display:column class="hidden" property="statusreq" title="Status" headerClass="table_header" width="16%" align="center" media ="none"/>
<display:column class="label_text" property="typeofrequest" title="Req Type" headerClass="table_header" width="10%" align="center"/>
<display:column class="label_text" property="cdsID" title="CDSID" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="ll6CdsID" title="LL6 CDSID" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="requestStatus" title="Request Status" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="creationDate" title="Creation Date" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnITI" title="Assigned to ITI" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnAsstAdm" title="Assigned to Asset Admin" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnHlpDsk" title="Assigned to Help Desk" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="closdDate" title="Closed Date" headerClass="table_header" width="6%" align="center"/>
<display:setProperty name="export.xls.filename" value="rprtData.xls"/>
<display:setProperty name="css.tr.even" value="row1" />
<display:setProperty name="css.tr.odd" value="row2" />
<display:setProperty name="paging.banner.placement" value="bottom" />
<display:setProperty name="basic.msg.empty_list" value="No Records Found" />
</display:table>
</table>
@ alfasin ...这是我的代码...我尝试使用隐藏的类,但它没有锻炼,所以我继续使用媒体,因为没有并且它有效。
<table border="1" width="100%" align="center" cellpadding="0" cellspacing="1" class="table_main">
<display:table name="requestScope.ITIReportForm.rprtData" id="table" export="true" sort="list" requestURI="/itireport.do" pagesize="20" align="center" class="table_main" width="100%">
<display:column width="5%" align="center" media="html" titleKey="" headerClass="table_header" title="Request No">
<a href="/apeweb/homesubmit.do?method=showRequest&requestNo=<%=((ITIReportVO)table).getReqNo()%>&reqStatus=<%=((ITIReportVO)table).getStatusreq()%>&reqType=<%=((ITIReportVO)table).getTypeofrequest()%>"><%=((ITIReportVO)table).getReqNo()%></a>
</display:column>
<display:column width="5%" align="center" class="hidden" media="Excel" title="Request No" headerClass="table_header" >
<%=((ITIReportVO)table).getReqNo()%>
</display:column>
<display:column class="hidden" property="statusreq" title="Status" headerClass="table_header" width="16%" align="center" media ="none"/>
<display:column class="label_text" property="typeofrequest" title="Req Type" headerClass="table_header" width="10%" align="center"/>
<display:column class="label_text" property="cdsID" title="CDSID" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="ll6CdsID" title="LL6 CDSID" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="requestStatus" title="Request Status" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="creationDate" title="Creation Date" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnITI" title="Assigned to ITI" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnAsstAdm" title="Assigned to Asset Admin" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="assgnHlpDsk" title="Assigned to Help Desk" headerClass="table_header" width="6%" align="center"/>
<display:column class="label_text" property="closdDate" title="Closed Date" headerClass="table_header" width="6%" align="center"/>
<display:setProperty name="export.xls.filename" value="rprtData.xls"/>
<display:setProperty name="css.tr.even" value="row1" />
<display:setProperty name="css.tr.odd" value="row2" />
<display:setProperty name="paging.banner.placement" value="bottom" />
<display:setProperty name="basic.msg.empty_list" value="No Records Found" />
</display:table>
</table>