You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by ChambreNoire <aw...@tentelemed.com> on 2014/12/04 16:51:46 UTC

Force AjaxLink to be enabled

Hi,

Having recently migrated an old app all the way from 1.3 to 6, one of the
issues I encountered was that links and other component take their parents
into consideration when determining their enabled state (introduced in
1.4?). This is a real pain for me in a few specific cases. I can't override
isEnabledInHierarchy as it's final. Is there a easy quick and dirty way
around for a given link ? 

Many Thanks,

CN

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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: Force AjaxLink to be enabled

Posted by ChambreNoire <aw...@tentelemed.com>.
Ha! Yes I was going to do that tonight but fine. 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668633.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: Force AjaxLink to be enabled

Posted by ChambreNoire <aw...@tentelemed.com>.
gah!

Always finish debugging before posting. Just needed to override
canCallListenerInterface(). Easy peasy!

CN

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668662.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: Force AjaxLink to be enabled

Posted by ChambreNoire <aw...@tentelemed.com>.
Hmm. I managed to get this working for AjaxLinks but now I have a similar
situation for simple 'Link's used to download files via
ResourceStreamRequestHandler. I override isLinkEnabled() but I still get a
ListenerInvocationNotAllowedException. 

Any ideas?

CN

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668661.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: Force AjaxLink to be enabled

Posted by ChambreNoire <aw...@tentelemed.com>.
Haha I had already overridden AbstractLink#isLinkEnabled()  and yes now
Wicket renders a link rather than a span but clicking doesn't work.
OnClick() isn't called at all.

CN

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668638.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: Force AjaxLink to be enabled

Posted by Martin Grigorov <mg...@apache.org>.
Check AbstractLink#isLinkEnabled()

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 4, 2014 at 5:13 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> LOL
>
> On Thu, Dec 4, 2014 at 4:04 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
> > Hi,
> >
> > Yes. There is!
> > But I will tell you how to do it only if you update your thread about the
> > caret selection with the final solution so other users can also use it
> ;-)
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire <aw...@tentelemed.com> wrote:
> >
> > > Hi,
> > >
> > > Having recently migrated an old app all the way from 1.3 to 6, one of
> the
> > > issues I encountered was that links and other component take their
> > parents
> > > into consideration when determining their enabled state (introduced in
> > > 1.4?). This is a real pain for me in a few specific cases. I can't
> > override
> > > isEnabledInHierarchy as it's final. Is there a easy quick and dirty way
> > > around for a given link ?
> > >
> > > Many Thanks,
> > >
> > > CN
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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
> > >
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>

Re: Force AjaxLink to be enabled

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
LOL

On Thu, Dec 4, 2014 at 4:04 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
> Yes. There is!
> But I will tell you how to do it only if you update your thread about the
> caret selection with the final solution so other users can also use it ;-)
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire <aw...@tentelemed.com> wrote:
>
> > Hi,
> >
> > Having recently migrated an old app all the way from 1.3 to 6, one of the
> > issues I encountered was that links and other component take their
> parents
> > into consideration when determining their enabled state (introduced in
> > 1.4?). This is a real pain for me in a few specific cases. I can't
> override
> > isEnabledInHierarchy as it's final. Is there a easy quick and dirty way
> > around for a given link ?
> >
> > Many Thanks,
> >
> > CN
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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
> >
> >
>



-- 
Regards - Ernesto Reinaldo Barreiro

Re: Force AjaxLink to be enabled

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Yes. There is!
But I will tell you how to do it only if you update your thread about the
caret selection with the final solution so other users can also use it ;-)

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire <aw...@tentelemed.com> wrote:

> Hi,
>
> Having recently migrated an old app all the way from 1.3 to 6, one of the
> issues I encountered was that links and other component take their parents
> into consideration when determining their enabled state (introduced in
> 1.4?). This is a real pain for me in a few specific cases. I can't override
> isEnabledInHierarchy as it's final. Is there a easy quick and dirty way
> around for a given link ?
>
> Many Thanks,
>
> CN
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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
>
>