0
Im displaytag를 사용하여 보고서를 만듭니다. 보고서의 꼬리말에 두 개의 열의 평균 합계를 표시하고 싶습니다. "pris"와 "dekningsprosent"의 평균 합계.디스플레이 태그 바닥 글 평균
displaytag에서 가능합니까? 나는 합계를 세는 방법이 있다는 것을 알았지 만 나는 평균을 찾을 수 없다.
여러분이 도와 드리겠습니다. 지금까지 내 코드는 다음과 같습니다.
<display:table name="rapportList" class="table" requestURI="" id="rapportList" export="true" pagesize="25">
<display:column property="leilighetId" sortable="true" titleKey="report.header.leilighetId"/>
<display:column property="pris" sortable="true" titleKey="report.header.price" format="{0,number,currency}"/>
<display:column property="dekningProsent" sortable="true" titleKey="report.header.coverage" format="{0,number,percent}"/>
<display:footer>
//What goes in here to get the average?
</display:footer>
</display>
미리 감사드립니다.
처럼 하나의 시작, 그리고 제로 잊지 마세요? http://demo.displaytag.org/displaytag-examples-1.2/example-columnsummation.jsp –
표시 태그를 사용하지 않고 struts 반복자 태그를 사용하면 문제를보다 명확하게 나타낼 수 있습니다 (마술이 적고 EL/OGNL 솔루션 제공 가능). 당신은 행동의 평균을 깨뜨릴 수 있습니다. jQuery로 문제를 해결할 수도있다. – Quaternion