This content has been marked as final.
Show 3 replies
-
1. Re: dataTable with rich:columns not showing header facet
rseely Mar 18, 2010 1:12 PM (in response to rseely)One extra note: The mddb.getSortOrdering(...) method call (which returns appropriate DESCENDING, ASCENDING, and UNSORTED values from the RichFaces Ordering enum) isn't being called at all. -
2. Re: dataTable with rich:columns not showing header facet
rseely Mar 18, 2010 1:36 PM (in response to rseely)I've made the header appear by restructuring the header portion into its own columnGroup (see below), but I have no sorting icons. I'm getting closer, but I still need an assist to get the sorting icons into there. Thanks!
{code}
<rich:dataTable
rendered="#{mddb.dataList.size>0}"
styleClass="growthDisplayDataTable"
value="#{mddb.dataList}" var="dataItem" id="mdt"
rowKeyVar="idx">
<f:facet name="header">
<rich:columnGroup>
<rich:column width="30%" id="mdtKeyColumnHeader">
<h:outputText value="" />
</rich:column>
<rich:columns
value="#{mddb.filteredDisplayColumns}"
var="dispCol" index="columnIdx" width="#{dispCol.columnWidth}%"
id="mdtColumnHeader#{columnIdx}"
sortBy="#{dataItem.getValue()[columnIdx+1]}"
sortOrder="#{mddb.getSortOrdering(dispCol,columnIdx)}">
<f:facet name="header">
<h:outputText value=" " />
</f:facet>
<h:outputText value=" " />
</rich:columns>
</rich:columnGroup>
</f:facet>
<rich:columnGroup>
<rich:column width="30%" id="mdtKeyColumn">
<f:facet name="header">
<h:outputText value=" " />
</f:facet>
<a:commandLink styleClass="growthDisplayDataKeyColumn"
action="#{mrd.setActiveNode}"
reRender="dataPanel,hierarchyMenu" eventsQueue="woot">
<h:outputText styleClass="growthDisplayDataKeyColumn"
value="#{idx+1}. #{dataItem.getValue()[0]}" />
<f:param name="activeHierarchyNodeId"
value="#{dataItem.getKey()}" />
</a:commandLink>
</rich:column>
<rich:columns
value="#{mddb.filteredDisplayColumns}"
var="dispCol" index="columnIdx" width="#{dispCol.columnWidth}%"
id="mdtColumn#{columnIdx}"
sortBy="#{dataItem.getValue()[columnIdx+1]}"
sortOrder="#{mddb.getSortOrdering(dispCol,columnIdx)}"
styleClass="growthDisplayDataColumn #{dispCol.align=='R' ? 'textAlignRight' : (dispCol.align=='C' ? 'textAlignCenter' : '')}">
<f:facet name="header">
<h:outputText value=" " />
</f:facet>
<h:outputText
value="#{mdf.format(dispCol.formatIndex, dataItem.getValue()[columnIdx+1] * dispCol.formatMultiplier)}" />
</rich:columns>
</rich:columnGroup>
</rich:dataTable>
{code}Message was edited by: Robert Seely ... having a hell of a time getting code to format right in here. Any pointers are appreciated.
-
3. Re: dataTable with rich:columns not showing header facet
rseely Mar 18, 2010 4:18 PM (in response to rseely)Taking out the column group fixed it: I have a header with sort icons now. I have another issue, but it'll have to wait for tomorrow, and for another thread.