click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <sab...@gmail.com>
Subject DataProvider interface
Date Sat, 20 Feb 2010 03:23:10 GMT
Hi all,

Currently the Table, Select and FormTable controls uses normal List objects as data providers.
While 
simple end easy to use it does lead to inconsistencies, for example Table rowList can be set
in 
onRender but Select and FormTable need to be populated before onProcess.

How about we add a DataProvider interface that can be set for all three components in the
onInit 
event. The Control can then call this interface when the data is needed. For Select and FormTable

this will be during the onProcess event, while Table will retrieve its data during rendering.

In addition this interface can act as a data proxy when paging. For example the DataProvider
can 
expose a getSize() method that returns 1000 while in reality only 10 objects were retrieved.

Ajax can also benefit from a performance perspective. Imagine making an Ajax request to a
Page with 
multiple Select controls and FormTable. These controls will be populated during the onInit
event, 
but they won't be processed because Ajax requests should only process the Control that was

interacted with.

kind regards

bob

Mime
View raw message