The presenter does sorting, mapping etc. The view even has no direct dependency to the presenter. If the view requires to notify the presenter, it will have to fire an event to the presenters event handlers.
In your case, it would be cleaner to put the information, which contact will be displayed in wich row, into the presenter. The presenter should fill each table cell, while the table doesn't know anything about its content. You can think of the view as the most stupid part of your application. The view only does initalization and layout of the ui components, that's it. It provides methods to access some of the components like text field or labels, but all the logic is in the presenter. Regards Jan Ehrhardt On Sun, Feb 14, 2010 at 10:02 PM, Yaakov <[email protected]> wrote: > Hi all, > > Am I correct in my understanding that the View NEVER has any > dependencies on the model? I.e., whatever sorting, mapping, etc needs > to be done between the view and the data, it's the Presenter that > holds the real data and just sets simple strings to the View? > > So, following this and the Contacts example on GWT site, it would be > **incorrect** to create a ContactsFlexTable that would keep track of > which Contact is assigned to which row index in the table, right? > > Thanks, > Yaakov. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
