The component is pretty neat and all, but it only works if you're ordering a list of Strings. Fair enough, you can pass any collection to it and it will convert the elements to a String (through a converter or the toString() method). The problem that I have is that I'd like to order my list of objects that implement the Comparable interface. When I process the commandButton to get the ordered list, my original list goes from being List<MyObject> to List<String>. The weird thing is that it's declared as a list of MyObject. Primefaces is actually changing the type of my list. Weird.
Anyway, I understand the implications of enforcing only comparable objects in the component, but I think it would make the orderList much more powerful. Read a list from the DB, for example, order the elements using p:orderList, store the order back in the DB.
Components, Ajax Framework, Utilities and More.
2 posts • Page 1 of 1
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 33 guests