Are you aware that the sortColumn expression should point to a simple PROPERTY on the backing bean, not a "sort method"? The property is assigned the *name* of the *column* to sort on.

The method pointed to by the "value" attribute is responsible for returning its data in the correct sort order; it does this by looking at the sort column PROPERTY to determine what to sort on.

This should all be explained in the sorting example.

rahmoune patrick wrote:
Hello,
I don't know so much about dataTable but I call the sort method explicitely
when I return the data list.
maybe someone more experienced can comment Hope it help you

patrick

*/Qiang Yu <[EMAIL PROTECTED]>/* a écrit :

    Hello all,
    I am having some difficulties with t:DataTable and
    t:commandSortHeader: they do not sort my data. I have a bean named
    "expList" saved in the session, and I have programmed a sort method
    following the MyFaces examples. But I found whenever I click the
    command sort header, the "sort" function is simply not called.

    My steps to uses the sortable table are:
    1. define a List data member called list in my expList class/object
    2. define a sort function to sort the list based on sort solumn and
    ascending attribute
    3. populate the expList and save it in the session;

    My JSP is like the following:



    value="#{expList.list}"
    sortColumn="#{expList.sort}"
    sortAscending="#{expList.ascending}"

Reply via email to