lazy loading datatable and sorting/filtering

UI Components for JSF
Post Reply
hwaastad
Posts: 56
Joined: 11 Oct 2010, 12:43

17 Oct 2011, 12:29

Hei,
I've been running an lazyloading datatable using the framework from the examples.
(using a M-SQL backend)
Right now the filters does not work since the class.getField() returns null.
To bypass this I've had to replace this using getDeclaredFields:
--
//String fieldValue = String.valueOf(car.getClass().getDeclaredField(filterProperty).get(car));
Field f = car.getClass().getDeclaredField(filterProperty);
f.setAccessible(true);
String fieldValue = String.valueOf(f.get(car));
f.setAccessible(false);
--

Is there a better way?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests