french english

RSS 1.0 
 
 Login 
 Password 
 Créer un compte 
 
02-06-09 / 03:25 : CP2JavaWS 0.7 : remote tables browsing (cjed)
Une nouvelle version de CP2JavaWS est disponible sur sourceforge :

- New CP2JavaWSTableViewDelegate component, that manages retrieving of rows objects values automatically : triggers requests to the server through CP2JavaWS bridge classes when needed. It allows fast browsing of large table selection results without stressing the application server nor database server, and without requiring any pagination !
No GWT component, JSF or other provides that feature yet : they all use pagination (data splitted into multiple pages), that is less practical, less intuitive and slower to reach the desired element (if you have hundreds of elements you can’t have all pages number displayed, so you have to use many times forward/fast forward buttons).

Requests are sent ahead asynchronously when we reach near cache's end, so the application user interface remains responsive.

The requested rows count (next or previous cache size) adapts automatically to the current visible rows (that depends from the enclosing scrollview size - could be resized then).

Use of fast scroll using the scrollbar or scroll area is allowed (generates a cache fault and then a synchronous - that time only - call to reset all caches from the next requested position).

Ready for column sorting (infos are passed to the remote service's read method) once the datasource delegate method is managed in CPTableView.

Can pass selection criteria (SQL, HQL, or any other WHERE clause part string) to the remote service's read method if selection must be restricted (pass null to browse the whole table).

Use (see included example) :
- create the CPTableView and columns as usual but pass the corresponding attribute of the remote collection's elements class as the column id (you can pass any nested property using EL type path, as CPPropertyUtils is used here).
- create the table datasource (and set it as the tableView datasource) passing the endPoint, remote Java service interface name, read method and get size (whole table size) method names, index/primary key attribute name, additional criterias string :

tableViewDelegate = [CP2JavaWSTableViewDelegate createForEndPoint:endPoint1 javaServiceInterface:@"com.cp2javaws.demo.services.IDemoService2" readMethod:@"readCustomersForIndexCriteriaAndCountIsForward" sizeMethod:@"customersCount" idAttName:@"customerId" criterias:nil];

The read method on the server must follow this signature : (Integer indexCriteriaValue, Integer count, Boolean isForward, String criterias, List sortDescriptors).

Fixes : - fixed a problem with CP2JavaWSURLConnection's instance authDelegate scope, that lead to the application not working if using index.html (uses Press and then all global vars appear in the same file - same scope) instead of index-debug.html.
- fixed a problem when encoding/decoding null attributes values (if using custom CPCoding implementation and not checking for null attributes - ok when relying on automatic mode). These fields are now ignored (not included in JSON string).
- now follows correct rules when checking for sameDomain setting at endPoint creation (allows use of a local file for the client CP application if the server is local and Safari is used).

- Added preliminary support for synchronous calls (do not manage digest authentication yet). Then asynchronous mode remains the default (should also be preferred as it allows more responsive user interface).
Commentaires
Poster un commentaire 
  
    
  image de securisation du formulaire


  
      (sera ajouté après validation)