我可以使用media='none'
隐藏displaytag中的列吗?由于这是因为使用displaytag的另一列中隐藏列的值作为超链接的参数,是否会产生任何其他后果。
我成功隐藏了列,但在服务器日志中获取了foll:warning
W org.displaytag.tags.ColumnTag setMedia属性“media”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>
答案 0 :(得分:6)
media='none'
与media='abc'
相同。
原因它找到了&#39; abc&#39; (或任何字符串)为[mymedia]
你应该使用
<display:column property="index" title="" class="hidden" headerClass="hidden" />
并在您的CSS
文件中。
.hidden {
display: none;
}