Hi all
A design question for everyone using MVP for their GWT
implementations :-)
I have a simple interface like so:
interface ArrivalWidgetInterface {
....
HasText getSlotText();
....
}
Let´s say that I want to set the SlotText in my widget implementing
the above interface.
I´m leaving some code out here, but it should be pretty straight
forward if you have been using
examples from Google IO 2009 and so on.
Pretty simple, in a async success method I put the following:
widget.getSlotText().setText(result.getSlot());
Done.
Let´s say now that I want to manipulate the Slot textbox in some other
way,
for example disable it after the value has been set.
How can I do this in a good way?
Changing the interface to return an TextBox instead of the HasText
interface seems like a bad idea,
since that would give me problems when testing. If possible you´ll
want to keep all the UI-code outside the presenter, right? So what
would be best here? Create a new public method in the widget, and
expose that method in the interface aswell?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---