You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ludodo <lu...@gmail.com> on 2010/09/27 12:19:11 UTC

setEnabled(true) doesn't enable a subcomponent

Hello,

I've 2 components ComponentA & ComponentB. 
ComponentB extends ComponentA. 

ComponentA.html looks like this :

<wicket:panel>  
  <form wicket:id="form">
	  ...
	 
	  <wicket:child />

          ....
  </form>
</wicket:panel>

and ComponentB looks like this :
<wicket:extend>
        ...
         Link 
        ...
</wicket:extend>

My need is always enabled the link in componentB, even if the form is not
enabled.

My problem is that my   tag is always disabled when i disable (i.e. call
form.setEnabled(false)) event if I call link.setEnable(true) in my code, 
I tried to replace it with a <button> but it shows a <button> tag with
disabled="disabled" attribute in the generated html.

Did somebody has this problem before with Wicket ?

Thanks,
Ludovic.




-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-true-doesn-t-enable-a-subcomponent-tp2715172p2715172.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: setEnabled(true) doesn't enable a subcomponent

Posted by Jeremy Thomerson <je...@wickettraining.com>.
If you want everything in the form disabled except the link,  use a visitor
on the form to disable everything but the link. All parents of the link must
be enabled.

Jeremy Thomerson
http://wickettraining.com
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors

On Sep 27, 2010 10:21 AM, "Igor Vaynberg" <ig...@gmail.com> wrote:

in wicket the enabled status is controlled by the entire hierarchy. in
order for a component to be enabled so must be all of its parents, all
the way to the page. there are many reasons to do it this way and we
will not change it. i suggest you either move the link out or disable
on a more granular basis.

-igor


On Mon, Sep 27, 2010 at 5:37 AM, Ludodo <lu...@gmail.com> wrote:
>
> Yes I did and it d...

Re: setEnabled(true) doesn't enable a subcomponent

Posted by Igor Vaynberg <ig...@gmail.com>.
in wicket the enabled status is controlled by the entire hierarchy. in
order for a component to be enabled so must be all of its parents, all
the way to the page. there are many reasons to do it this way and we
will not change it. i suggest you either move the link out or disable
on a more granular basis.

-igor

On Mon, Sep 27, 2010 at 5:37 AM, Ludodo <lu...@gmail.com> wrote:
>
> Yes I did and it didn't works either.
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-true-doesn-t-enable-a-subcomponent-tp2715172p2715340.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: setEnabled(true) doesn't enable a subcomponent

Posted by Ludodo <lu...@gmail.com>.
Yes I did and it didn't works either.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-true-doesn-t-enable-a-subcomponent-tp2715172p2715340.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: setEnabled(true) doesn't enable a subcomponent

Posted by Alexander Morozov <al...@gmail.com>.
Hi!

Did you try to override isEnabled method on the button ?

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setEnabled-true-doesn-t-enable-a-subcomponent-tp2715172p2715313.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org