display:table
タグを表示するためだけに、を使用しています。私のシナリオでは、7つの列があります。最初の列では、実行時に値を取得します。たとえば、これらの値はとmanualASNListUID.instanceType
です。列の値は、Early ASn、Late ASn、Sumです。それ以外の場合は、Early AsnとSum、またはEarly ASn、Late ASn、CMMSとSum。arraylist(manualASNListUID)
object(instanceType)
最後の行に表示されるように「合計」値を設定するにはどうすればよいですか?
たとえば、私のテーブル:
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>