Hello everybody!

Please consider the following use-case.

I want to create a form with :

Login
Password
Submit-Button

Submit-Button should be enabled only if both login and password is not
empty.

To implement the requirement I'm trying to use MVP as specified in GWT best
practieces.
Unfortunately the Button widget in GWT has no interface that can say the
object can be enabled/disabled.

So, we somehow should export the "EnableAble" interface from Display (MVP)
for the presenter (MVP).
We can do it by applying the Adapter design pattern (GoF): create a wrapper
that will wrap the button and implement the custom interface - but this
approach looks pretty-bad - we should write a custom wrapper for every
widget we want to enable/disable.

I think that all GWT widgets that can be enabled/disabled can implement the
interface that has the only "setEnabled(boolean enabled)" method.

What do you think about it?
Maybe this suggest should be somehow placed in GWT wishlist?

Can you suggest other nice ways to resolve the task?

--
Kind regards,
Ignat Alexeyenko.
--
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.

Reply via email to