NPE - DataHelper - Sorting failed on DataTable

UI Components for JSF
Post Reply
vinche
Posts: 13
Joined: 20 Apr 2011, 11:02

13 Jul 2011, 11:36

Hello,

primefaces 2.2.1
jsf-impl-2.0.3

The dataTable sort feature have a strange behavior. (I use a DataModel)
I have to filter before the sort works.
After investigating I discover that I have a null pointer exception when I try to filter a dataTable.

________

The NullPointerExecption is never logged thanks to sun.
com.sun.faces.context.PartialViewContextImpl - line 242

Code: Select all

      try {
                processComponents(viewRoot, phaseId, executeIds, ctx);
            } catch (Exception e) {
                // RELEASE_PENDING LOG EXCEPTION
            }
_________

The exception is throw by a primeFaces class.

org.primefaces.component.datatable.DataHelper line 94 95

Code: Select all

          List list = (List) table.getValue();
          Collections.sort(list, new BeanPropertyComparator(sortColumn, table.getVar(), asc));
GetValue return a null value and the Collections.sort(..) is not nullSafe.

The error is not comming after filtering because a list of item is set in the StateHelper during the process of this two features.

Code: Select all

 public void setValue(Object value) {
        setDataModel(null);
        getStateHelper().put(PropertyKeys.value, value);

    }
Currently, I have no work arround...

Issue created: http://code.google.com/p/primefaces/iss ... il?id=2235

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 56 guests