Enabling/ Disabling Save/ Cancel Buttons

7 views
Skip to first unread message

P.G.Taboada

unread,
Jul 22, 2010, 8:21:23 AM7/22/10
to GWT Pectin
Hi,

I would like to enable/ disable the "save/ ok/ cancel" buttons uppon
form state.

What is the best approach?

brgds,

Papick

Andrew Pietsch

unread,
Jul 22, 2010, 9:02:29 AM7/22/10
to gwt-pecti...@googlegroups.com
Howdy,

You can use the command.enabledWhen(ValueModel<Boolean>) method to specify a condition to trigger enabling and disabling a command.  There's also a disableWhen(...) version if that reads better. 

Cheers

P.G.Taboada

unread,
Jul 22, 2010, 9:43:44 AM7/22/10
to GWT Pectin
Hi,

I have seen this in the samples, but what I need is to enable/ disable
widgets upon validation state changes.

So I need to build a ValueModel holding a boolean and have it being
changed by the validation calls on my model?

brgds

Papick


On 22 Jul., 15:02, Andrew Pietsch <and...@pietschy.com> wrote:
> Howdy,
>
> You can use the command.enabledWhen(ValueModel<Boolean>) method to specify a
> condition to trigger enabling and disabling a command.  There's also a
> disableWhen(...) version if that reads better.
>
> Cheers
>

Andrew Pietsch

unread,
Jul 22, 2010, 6:33:07 PM7/22/10
to gwt-pecti...@googlegroups.com
On 22 July 2010 23:43, P.G.Taboada <pgta...@googlemail.com> wrote:
Hi,

I have seen this in the samples, but what I need is to enable/ disable
widgets upon validation state changes.

So I need to build a ValueModel holding a boolean and have it being
changed by the validation calls on my model?

At this point in time yes.  There's some thoughts at this kind of thing at
https://wave.google.com/wave/waveref/googlewave.com/w+vIXX8JY-A  so if you think of anything else you'd need feel free to add a blip.
 
Cheers
 
Reply all
Reply to author
Forward
0 new messages