Hi Dominik, why not have a display interface like this?
interface Display {
void toggleVisible(boolean toggle);
}
If you need the presenter to toggle specific widgets on the display create
an enum:
interface Display {
enum WidgetType {
BUTTON,
TEXTBOX
};
void toggleVisible(boolean toggle, WidgetType type);
}
On Thu, Jan 14, 2010 at 8:45 PM, Dominik Steiner <
[email protected]> wrote:
> Hi there,
>
> I'm wondering how you best handle the situation that in your Presenter
> you need to call setVisible() on some UI Object returned via the
> Display interface?
>
> I could of course just write something like this in the Presenter
>
> interface Display{
> Widget getOkButton();
> }
>
> but that would made the class not JUnit testable. So I'm wondering why
> there are interfaces in GWT like HasText in order to set text on a
> Label or something but no interface in order to pass that to the
> Presenter for setting the visiblity of an UI element?
>
> Am I missing something?
>
> Dominik
>
> P.S. of course I could just extend the Widget class with my own custom
> ones and let this implement a custom Interface that defines setVisible
> () in order to pass that to the Presenter to make it testable, but
> wondering if others have run into the same problem?
>
> --
> 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.
>
>
>
>
--
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977
-- 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.
