3
可以使用media='none'
隱藏displaytag中的列嗎?在使用displaytag的另一列中的隱藏列的值作爲超鏈接的參數時,是否會產生其他任何後果。我可以使用media ='none'來隱藏displaytag中的列嗎?
我成功地隱藏列,但得到FOLL:在服務器日誌警告
W¯¯org.displaytag.tags.ColumnTag setMedia無法識別的價值屬性的「媒體」價值=「無」
我嘗試使用類作爲隱藏,但它沒有鍛鍊,所以我繼續與媒體作爲沒有和它的工作。
<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>
向我們顯示您的代碼。 – alfasin
你在CSS中定義了什麼'hidden'類? –
嗨Ross ..我沒有定義任何東西......但是我使用的線是... –
ashwinsakthi