After a long time, Richfaces 4.0.0 was released aprrox. 2 months ago with its cons and pros.
I really liked the 3.x version and had good expectations for brand new jsf 2 release.
Lately I ve been checking components in detail. What bothers me most is datatable sort feature needs extra code in 4.0. If you are developing application that using so many datatables for data visualizing, this extra sorting code for each column will bother you in the end.
let’s look at an example code snippet from Richfaces showcase below;
-
<rich:column sortBy="#{cap.state}" id="state"
-
sortOrder="#{capitalsSortingBean.statesOrder}">
-
<f:facet name="header">
-
<a4j:commandlink value="Sort by State Name" render="table"
-
action="#{capitalsSortingBean.sortByStates}" />
-
</f:facet>
-
<h:outputtext value="#{cap.state}" />
-
</rich:column>
u have to define sortOrder attribute and sortBy attribute. But this wont be enought for sorting to work by clicking! You also need a commandlink to apply sorting. Here is the method fired when commandlink is clicked,
Sonraki Sayfa »