what is the appropriate MVP way of doing this?

2010-08-31 Thread Joe Hudson
Hi, If I have a presenter that needs to populate a view that contains a FlowPanel which a list of custom widgets that contain some text and a hyperlink can anyone help me understand the best way of properly interfacing this out in the view? For example: public class MyPresenter { public

Re: what is the appropriate MVP way of doing this?

2010-08-31 Thread Thomas Broyer
On 31 août, 17:00, Joe Hudson joe...@gmail.com wrote: Hi, If I have a presenter that needs to populate a view that contains a FlowPanel which a list of custom widgets that contain some text and a hyperlink can anyone help me understand the best way of properly interfacing this out in the

Re: what is the appropriate MVP way of doing this?

2010-08-31 Thread Joe Hudson
That's great! Thanks Thomas. I've got another question (well, a set of questions) - say you have a text field in the view that you want to reference - to receive click events as well as key up events. 1) Would you reference the text field as HasText and cast to the event handlers? 2) Would you

Re: what is the appropriate MVP way of doing this?

2010-08-31 Thread Sam
Joe, in the View interface I would provide: HasClickHandlers getTextBoxForClickHandler(); HasKeyUpHandlers getTextBoxForKeyUpHandler(); The implementations in the View would both return that same TextBox. Redundant but clear. -- You received this message because you are subscribed to the

Re: what is the appropriate MVP way of doing this?

2010-08-31 Thread Christian Goudreau
Even better, I would declare an interface inside my view referencing only presenters function needed and use @UiHandler. More informations here: http://code.google.com/intl/fr-FR/webtoolkit/articles/mvp-architecture-2.html I'm also about to publish an article on ArcBees's developer

Re: what is the appropriate MVP way of doing this?

2010-08-31 Thread Joe Hudson
Cool, I definitely look forward to reading the article. Thanks guys! Joe On Aug 31, 2:27 pm, Christian Goudreau goudreau.christ...@gmail.com wrote: Even better, I would declare an interface inside my view referencing only presenters function needed and use @UiHandler. More informations