2012-10-11 1 views
1

태그를 표시하기 위해 display:table을 사용하고 있습니다. 제 시나리오에는 7 개의 기둥이 있습니다. 첫 번째 열에 대해서는 런타임에 값을 얻습니다. 예를 들어 manualASNListUID.instanceType에있는이 값은 arraylist(manualASNListUID)이고 object(instanceType)입니다. 열 값은 Early ASn, Late ASn, Sum입니다. 그렇지 않으면 초기 Asn 및 Sum 또는 초기 ASn, 후기 ASn, CMMS 및 합계.display : table을 사용하여 레코드를 마지막으로 설정하려면 어떻게해야합니까?

마지막 행의 표시로 '합계'값을 어떻게 설정할 수 있습니까?

예를 들어 내 테이블 :

Instance Type Sep-23 Sep-16 Sep-09 Sep-02 Aug-26 Aug-19 
---------------------------------------------------------------------------- 
Early ASN  4  2  4  1  1  2 
Late ASN   2  1  5  3  1  1  
Sum    6  3  9  4  2  3 

Instance Type Sep-23 Sep-16 Sep-09 Sep-02 Aug-26 Aug-19 
---------------------------------------------------------------------------- 
Early ASN  4  2  4  1  1  2 
Late ASN   2  1  5  3  1  1 
CMMS    0  0  0  0  0  0 
Sum    6  3  9  4  2  3 

내 코드는 다음과 같습니다

<display:table name="${weeklyDlvyInstancesDashboardReportForm.manualASNListQO}" uid="manualASNListUID" 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="${manualASNListUID.firstWeekOfCountLabel}" var="manualASNFirstWeekOfCount"/> 
    <c:set value="${manualASNListUID.secondWeekOfCountLabel}" var="manualASNSecondWeekOfCount"/> 
    <c:set value="${manualASNListUID.thirdWeekOfCountLabel}" var="manualASNThirdWeekOfCount"/> 
    <c:set value="${manualASNListUID.fourthWeekOfCountLabel}" var="manualASNFourthWeekOfCount"/> 
    <c:set value="${manualASNListUID.fifthWeekOfCountLabel}" var="manualASNFifthWeekOfCount"/> 
    <c:set value="${manualASNListUID.sixthWeekOfCountLabel}" var="manualASNSixthWeekOfCount"/> 
    <c:if test="${(manualASNListUID.instanceType != null && manualASNListUID.instanceType ne 'Sum')}"> 
    <display:column property="instanceType" title="Instance Type" sortable="false"/> 
    </c:if> 
    <c:if test="${(manualASNListUID.instanceType != null && manualASNListUID.instanceType eq 'Sum')}"> 
    <display:column property="instanceType" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/> 
    </c:if> 
    <display:column property="${checkvalue}" title="Instance Type" sortable="false"/> 
    <display:column property="${checkvalSum}" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/> 
    <display:column property="firstWeekOfCount" title="${manualASNFirstWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="secondWeekOfCount" title="${manualASNSecondWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="thirdWeekOfCount" title="${manualASNThirdWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="fourthWeekOfCount" title="${manualASNFourthWeekOfCount}" sortable="false" autolink="true" /> 
    <display:column property="fifthWeekOfCount" title="${manualASNFifthWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="sixthWeekOfCount" title="${manualASNSixthWeekOfCount}" sortable="false" autolink="true"/> 
    </display:table> 
+0

내가 질문을 이해하지 않습니다. displaytag는 행 목록을 반복합니다. 따라서 합계 행을 마지막으로 지정하려면 목록의 마지막 위치에 놓습니다. –

+0

@JB Nizet, 나는 당신이 그걸 알게하려고 노력했다. –

+0

@JB Nizet, 나는 당신이 잘못 이해했다고 생각한다. '합'은 열 이름이 아니며 목록에서 발생하는 값입니다. –

답변

0
<display:table name="${weeklyDlvyInstancesDashboardReportForm.manualASNListQO}" uid="manualASNListUID" 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="${manualASNListUID.firstWeekOfCountLabel}" var="manualASNFirstWeekOfCount"/> 
    <c:set value="${manualASNListUID.secondWeekOfCountLabel}" var="manualASNSecondWeekOfCount"/> 
    <c:set value="${manualASNListUID.thirdWeekOfCountLabel}" var="manualASNThirdWeekOfCount"/> 
    <c:set value="${manualASNListUID.fourthWeekOfCountLabel}" var="manualASNFourthWeekOfCount"/> 
    <c:set value="${manualASNListUID.fifthWeekOfCountLabel}" var="manualASNFifthWeekOfCount"/> 
    <c:set value="${manualASNListUID.sixthWeekOfCountLabel}" var="manualASNSixthWeekOfCount"/> 

    <c:choose> 
    <c:when test="${asnAccuracyListUID.instanceTypeDescription != null && asnAccuracyListUID.instanceTypeDescription != 'Sum'}"> 
     <display:column property="instanceTypeDescription" title="Instance Type" sortable="false"/> 
    </c:when> 
    <c:otherwise> 
     <display:column property="instanceTypeDescription" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/> 
    </c:otherwise> 
    </c:choose> 

    <display:column property="${checkvalue}" title="Instance Type" sortable="false"/> 
    <display:column property="${checkvalSum}" title="Instance Type" sortable="false" style="font-weight:bold;text-align:center"/> 
    <display:column property="firstWeekOfCount" title="${manualASNFirstWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="secondWeekOfCount" title="${manualASNSecondWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="thirdWeekOfCount" title="${manualASNThirdWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="fourthWeekOfCount" title="${manualASNFourthWeekOfCount}" sortable="false" autolink="true" /> 
    <display:column property="fifthWeekOfCount" title="${manualASNFifthWeekOfCount}" sortable="false" autolink="true"/> 
    <display:column property="sixthWeekOfCount" title="${manualASNSixthWeekOfCount}" sortable="false" autolink="true"/> 
    </display:table>