You need to make sure all of your component parents are also visible.

Remeber that wicket uses a component tree (you can see it in your
DebugToolbar if you add it to your pages).
The inspector looks something like this:

http://www.wicket-library.com/wicket-examples-6.0.x/spring/wicket/bookmarkable/org.apache.wicket.devutils.inspector.InspectorPage;jsessionid=76EE1D9ED70B7660542E78B4C1333951?0&pageId=0


On Wed, Jun 26, 2013 at 9:16 AM, Richard W. Adams <[email protected]> wrote:

> 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.
> **
>

Reply via email to