We tried that (code below), but the button does not appear in the
generated HTML. We're using Wicket 1.4.17. Do later versions of Wicket
render a grayed out (vice invisible) button?
private Button createDisabledButton() {
final Button button = new Button("disabled-button");
button.setEnabled(false);
button.setVisible(true);
return button;
}
From: Thomas Matthijs <[email protected]>
To: [email protected]
Date: 06/26/2013 07:45 AM
Subject: Re: Graying Out Disabled Buttons/Controls
On Wed, Jun 26, 2013 at 2:30 PM, Richard W. Adams <[email protected]> wrote:
> We have a customer requirement that disabled form buttons be grayed out
> rather than Wicket's default behavior of making them invisible. Google
has
> a lot of discussion on the topic, but I didn't see a "best practice"
> solution. Does Wicket provide a way to gray out buttons (or any form
> control, for that matter)?
>
Use setEnabled(false) instead of setVisible()
**
This email and any attachments may contain information that is confidential
and/or privileged for the sole use of the intended recipient. Any use, review,
disclosure, copying, distribution or reliance by others, and any forwarding of
this email or its contents, without the express permission of the sender is
strictly prohibited by law. If you are not the intended recipient, please
contact the sender immediately, delete the e-mail and destroy all copies.
**