Re: MVP HasClickHandler

2009-09-11 Thread fonghuangyee
Thanks jason, I just implement HasSelectionHandlers to handle a list of dynamic hasclickhandler. It work fine and nice. On Sep 11, 7:59 am, Jason A. Beranek jason.bera...@gmail.com wrote: I take a little different approach, but you have most of the fundamentals. The characteristic interface

Re: MVP HasClickHandler

2009-09-10 Thread fonghuangyee
Thanks for ur advise. How about if i define a interface ( View Listener ), then my presenter implement the View Listener? Example : public class MyView extend Composite implement MyPresenter.View { public interface Listerner { public void onEdit(String id); }

Re: MVP HasClickHandler

2009-09-10 Thread Jason A. Beranek
I take a little different approach, but you have most of the fundamentals. The characteristic interface (i.e., Listener in your example) shouldn't be defined as part of a particular instance of MyPresenter.View, as that ties the Presenter directly to a specific view implementation. Also, I would

MVP HasClickHandler

2009-09-06 Thread fonghuangyee
Hihi , After i go through so many MVP example, i found that we always use presenter to get those HasClickHandler from Display( Or View) to do some action. This way works nice for static clickable action, but if we have some dynamic button ( example a table listing with a list of clickable action

Re: MVP HasClickHandler

2009-09-06 Thread Jason A. Beranek
One approach I've used is to put some logic in the View to forward a different event than the purely GUI events to the Presenter. For example, if you have a table or list of items which can be clicked, and a click signifies selection of an item, use HasSelectionHandlers() in the View, and