Antonio Gallardo schrieb:
Sylvain Wallez escribió:
- since only CForms has Ajax integration, people are over-using it for presentation purposes (e.g. paginated repeater)
I agree with you, mixing binding with form definition is not good. We want to keep it separated. However, I think it is a first implementation wich show us a way to implement a paginated repeater after all it is not released yet. It is a work in progress. Is not fair to blame to a first draft implementation.

I had my thoughts whether the mixing is appropriate or not from the start, so thank you for your feedback.

As Simone mentioned in his reply, our main goal was to achieve the lazy-loading of pages. I agree that using the standard binding to fetch all rows and just display a subset (page) of them could be easily done with some simple xsl and without changes in the repeater implementation at all. But we are not focused just on presentation. Our implementation is a try to load only the row-data we need to support persistency frameworks and large collections in general. Currently lazy loading could be achieved without changes in the controller except using the advanced collection. Editing data is also possible yet, adding and deleting of rows will follow.

So concerning this I think pageSave/pageLoad has to be done in the binding because we have to control the doLoad()-method and prevent it from fetching and creating all rows from the start. To ensure seperation of concerns we can maybe try to move everything to the binding.

Currently the form-definition is used to enable pagination and and setting pageSize and so on. This configuration tag could be easily moved to the binding definition file without problems. The binding registers its pageStorage object in the repeater object just for one purpose. In the change-page-action I need to call pageSave and pageLoad. If I manage to access these methods there directly without repeater.getStorage().doPageLoad() in a decent way, everything would work just using the binding and without touching the definition and the repeater itself.

Please let me know what you think about it or if I'm getting something completely wrong.

Matthias



Reply via email to