jsf - display top 10 dynamic records in two column(Each 5 records) -
i'm using primefaces 5.2 , jsf. i'm using data-table displaying top ten failed tc's , count. records dynamic values , fetching db, working fine. want display 10 records in 2 columns of each 5 records. example : tc name count tc01_test 35 tc06_test 15 tc02_test 23 tc07_test 13 tc03_test 20 tc08_test 10 tc04_test 18 tc08_test 9 tc05_test 17 tc10_test 5
i want display records above mentioned example. how can achieve this? xhtml:
<div class="dtheadertwo" > <p:datatable var="failedtcs" value="#{reportsexeprogressbean.toptenfailedtcs}" > <p:column headertext="tc name"> <h:outputtext style="font-size: 12px;" value="#{failedtcs.testcasename}" /> </p:column> <p:column headertext="failed count"> <h:outputtext style="font-size: 20px;" value="#{failedtcs.failedcount}" /> </p:column> </p:datatable> </div>
you can not use datatable in way
better consider using datagrid list become this:
tc01_test 35 tc02_test 15 tc03_test 23 tc04_test 13 tc05_test 20 tc06_test 10 tc07_test 18 tc08_test 9 tc09_test 17 tc10_test 5
code example:
<p:datagrid var="failedtcs" value="#{reportsexeprogressbean.toptenfailedtcs}" columns="2" layout="grid" rows="10" > <p:panel style="text-align:center"> <h:panelgrid columns="2" style="width:100%"> <h:outputtext style="font-size: 12px;" value="#{failedtcs.testcasename}" /> <h:outputtext style="font-size: 20px;" value="#{failedtcs.failedcount}" /> </h:panelgrid> </p:panel> </p:datagrid>
Comments
Post a Comment