PDA

View Full Version : Pageable table with MVC


marswe
06-23-2008, 06:38 AM
Hi,

I got a view where it is possible to search and the result is displayed in a table below. This is working when I have an ordinary table and the search request in sent from the view to the controller and then is the result returned to the view (i.e. the model is updated) and the table shows the results. So far so good.

Now I want to have a pageable table instead, but I'm not sure how to stick with the MVC-concept since a pageable table make use of BasePagingLoader together with a DataProxy or RpcProxy. Could someone give me a hint of how to do it?

/Markus

assassin
06-25-2008, 04:32 AM
Let the store fill up with the use of the proxy and the loader in the view. Delete the store.add() function. This is done in the view because it has the responsibility of getting/showing data. The controller is only responsible for changing/setting data and changing states. This is my opinion of the view and controller pattern so don't pin me on it.

Regards,
Rick