My ListBox is inside a custom composite widget I have created. I am
using this widget in my different views in my application.
Just to elaborate more on this widget which I created, it is a Dialog
Box which has Left ListBox and Right ListBox. There are 4 buttons on
the center which allows to move items from Left to Right or Right to
Left. They can be moved one at a time or all at once. So when I
created this ListBox using GWT Designer as a New-Windows Builder-
UIBinder - DialogBox I don't get any presenter or activity with that.
Plus I don't want an activity simply because I don't want a new place.
I am opening this custom dialog box within my same place and I don't
want to write the processing code of moving items from either side
inside my current activity because then If my two different views want
to use this custom dialog box I have to duplicate the code. The whole
idea of this Widget was to have self-contained code.
The problem I see with GWT designer is all the event handling code
goes inside UIHandler method which is still inside my
CustomWidget.java file.
How do I then test my widget not inside GWTTestcase?
I introduced a presenter to use classic MVP approach and move my
processing logic inside presenter that way I can test my presenter my
mocking GWT widgets as my own custom widgets.
MVP-Part 2 deals with Activities and Places which works fine when you
are using GWT widgets inside a View. But when you have a re-usable
widget you created I don't want to assign new place and activity for
every custom widget I create. Because I really want to test my widget
and not the view here. See the difference here?
Unless I am missing something here..