You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by heikki <tr...@gmail.com> on 2013/06/10 14:25:31 UTC

AjaxEditableMultiLineLabel inside Link

hello,

I have a Link, used in a menu to go to a different page. When a content
editor is logged in, the link's text is rendered by an
AjaxEditableMultiLineLabel.

In that case, when you click on the link, the AjaxEditableMultiLineLabel
opens an input textarea with the current value selected. Updating it works
fine as long as the user doesn't click in it, because then the surrounding
link takes you to another page.

I would like to disable the link on onEdit() and re-enable it onSubmit(). I
tried using link.setEnabled(true/false) for it, but that has the effect that
the AjaxEditableMultiLineLabel no longer works, I guess because it is a
child component of the link and also gets disabled.


Do you have any tips ?

Kind regards
Heikki Doeleman



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-inside-Link-tp4659348.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: AjaxEditableMultiLineLabel inside Link

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

You should read about JavaScript event propagation and
event.stopPropagation()


On Mon, Jun 10, 2013 at 3:25 PM, heikki <tr...@gmail.com> wrote:

> hello,
>
> I have a Link, used in a menu to go to a different page. When a content
> editor is logged in, the link's text is rendered by an
> AjaxEditableMultiLineLabel.
>
> In that case, when you click on the link, the AjaxEditableMultiLineLabel
> opens an input textarea with the current value selected. Updating it works
> fine as long as the user doesn't click in it, because then the surrounding
> link takes you to another page.
>
> I would like to disable the link on onEdit() and re-enable it onSubmit(). I
> tried using link.setEnabled(true/false) for it, but that has the effect
> that
> the AjaxEditableMultiLineLabel no longer works, I guess because it is a
> child component of the link and also gets disabled.
>
>
> Do you have any tips ?
>
> Kind regards
> Heikki Doeleman
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxEditableMultiLineLabel-inside-Link-tp4659348.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
>
>