I was just trying learn sortHeader Component. But got a doubt about its
flow. Below is code for ready reference...
use in JSP:
------------
<x:dataTable
var="car"
value="#{list.cars}"
sortColumn="#{list.sort}"
sortAscending="#{list.ascending}"
preserveDataModel="true"
preserveSort="true">
<f:facet name="header">
<h:outputText value="(header table)" />
</f:facet>
<f:facet name="footer">
<h:outputText value="(footer table)" />
</f:facet>
<h:column>
<f:facet name="header">
<x:commandSortHeader columnName="type" arrow="true">
<h:outputText value="#{example_messages['sort_cartype']}" />
</x:commandSortHeader>
</f:facet>
.........
in managed bean list(SortableList):
getter/setter are there for sort and ascending atrribute
And sort() method which uses these attributes to sort the list.
in HtmlCommandSortHeader component class there is :
public void broadcast(FacesEvent event) throws
AbortProcessingException
{
..................
dataTable.setSortColumn(getColumnName());
dataTable.setSortAscending(true);
}
Now question is:
In broadcast method, dataTable attribute are set based on the header
clicked.And we are
sorting based on "list" bean's sort/ascending attribute.
How "list" bean properties are updated? Or say how datatable attribute
update will result in
updation of bean property?
Confidentiality Notice
The information contained in this electronic message and any attachments to
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL
PROTECTED] immediately
and destroy all copies of this message and any attachments.