rich:subTable
moyphus Sep 11, 2009 9:13 AMHi
Now i'm using rich:subtable inside dataTable,.,I have an employees list...Each employee has a 4 or 5 components...I used the code below...But its displaying all components for all employees...
<rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" cellpadding="0" cellspacing="0" width="430px" height="350px" sortMode="single" id="previewList" var="pay" rowKeyVar="i" value="#{emppayrolldefnHome.previewList}"> <f:facet name="header"> <rich:columnGroup> <rich:column> <h:outputText value="Employee Name"/> </rich:column> <rich:column> <h:outputText value="Amount"/> </rich:column> </rich:columnGroup> </f:facet> <rich:column> <h:outputText value="#{empmasterList.getEmpName(pay.id.empId)}"/> </rich:column> <rich:subTable OnRowMouseOver="this.style.backgroundColor='#F8F8F8'" onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" var="pay1" value="#{emppayrolldefnHome.componentList}"> <rich:column> <h:outputText value="#{pay1.prcompId}"/> </rich:column> <rich:column> <h:outputText value="#{pay1.pramount}"/> </rich:column> </rich:subTable> <f:facet name="footer"> <rich:columnGroup> <rich:column> <h:outputText value="#{messages.Total}"/> </rich:column> <rich:column> <h:outputText id="totamount" style="text-align: right;" value="#{emppayrolldefnHome.instance.totalAmount}"> <f:convertNumber pattern="#,##,##,##,##0.00" type="currency" currencySymbol="rs" currencyCode="INR"/> </h:outputText> </rich:column> </rich:columnGroup> </f:facet> </rich:dataTable>