I think that when you call the getter of the DataModel/array/list pass in
your table (<x:datatable value="#{form.dataModel}" you didn't sort the M
odel before rendering
private List dataModel;
public List getDataMode
l(){
sort(dataModel);
return dataModel;
}
Something like that, see
the source of the sortable table example (not the JSP, the Java one)
c
ed
> De: Changzhou Wang <[EMAIL PROTECTED]>
> A: [EMAIL PROTECTED]
apache.org
> Objet: sort table (extension)
> Date: Tue, 3 May 2005 18:1
5:05 -0700
> Hi All:
>
> I am trying to combine a sortable table wi
th a scrollable table.
> However the sorting part does not work (though
the sortTable example
> comes with myfaces 1.0.9 works find), basically,
the table is not
> sorted even though the head is changed (with arrows)
after the click.
>
> In general, how does the UI component x:commandS
ortHeader knows what
> action to take when the user click on the column?
It seems the backing
> bean (in SortableList.java) provides a "public v
oid sort(String
> column)" method, but I can not figure out where and ho
w
> x:commandSortHeader or its parent x:dataTable knows to invoke this
> method? The x:dataTable only specifies the sortColumn and sortAscending
>
> Thanks,
> czw
Comparez les prix de la high-tech avec Boursoprix.com -
http://www.boursoprix.com