Posts Tagged ‘sort’

A new 0.9 version of CP2JavaWS is available :

cp2javaws

– slight changes to the master/detail view, that is now fully compatible with the new CPTableView (that has been merged in the master branch). Compatibility with the older 0.71 version remains.

– now automatically adds an image background for the tableView columns’s headers when creating a master/detail view.

– added support for sorting to the tableView (the logic was still available in the CPTableViewDelegate and remote generic DAO service, however the new CPTableView does not yet implement sortDescriptors creation and change notification) : a CP2JavaWS category has been added to CPTableHeaderView, in order to manage mouse click in the the header view, and then set the current sort descriptor and send the sortDescriptorsDidChange notification to the tableView’s delegate.

Note : the header background does not reflect yet the sort order (no arrow).

The online demo has been updated.

Advertisements

A new version of CP2JavaWS is available at sourceforge :

Note : now uses json2lib stringify and parse methods from latest Cappuccino main branch (and future 0.71 version). Then it does not work for version 0.7 (or you should replace these methods manually by these from CPValue).
These two new methods should lead to general better performance.

– fixed a cache problem : now if an asynchronous request was pending before a cache fault, its return is ignored (as the state isn’t the same as originally expected after a cache fault).

– the sorting code now works properly (as soon as headers and CPSortDescriptors are added to CPTableView). It can still be tested by modifying the init value for currentSortDescriptorsStr in CP2JavaWSTableViewDelegate (see commented code). The reference is now the position in the table, and limit(first, length) requests are used.

– added a new generic service, GenericMasterDetailDAOService, that manages retrieving of elements for any CP class, using Hibernate. It then avoids having to define a DAO service (the previous mode is still available, for custom management or non-database datastores).

To use the new mode, pass the table elements CP class name when creating the CP2JavaWSTableViewDelegate, instead size and read method names (that are then generic).