Re: AjaxEditableLabel inside of AjaxEditableLabel

2011-11-21 Thread Martin Grigorov
See jQuery#stopPropagation()

On Sun, Nov 20, 2011 at 8:02 PM, Alec Swan  wrote:
> Anybody can help with stopping propagation of events from inner
> editable label to the outer editable label?
>
> Thanks
>
> On Fri, Nov 18, 2011 at 3:45 PM, Alec Swan  wrote:
>> I am not sure how to stop propagating the event. Could you please
>> provide any pointers?
>>
>> Here is the relevant code:
>>
>> final String keypress = "var kc=wicketKeyCode(event); if (kc==27) " +
>> cancelCall +
>>                                " else if (kc!=13) { return true; } else " + 
>> saveCall;
>>
>> tag.put("onblur", saveCall);
>> tag.put("onkeypress", "if (Wicket.Browser.isSafari()) { return; }; " +
>> keypress);
>> tag.put("onkeydown", "if (!Wicket.Browser.isSafari()) { return; }; " +
>> keypress);
>>
>>
>> On Fri, Nov 18, 2011 at 12:32 AM, Martin Grigorov  
>> wrote:
>>> Hi,
>>>
>>> You'll need to stop the propagation of the event.
>>> To do that you'll have to override
>>> org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.EditorAjaxBehavior.onComponentTag(ComponentTag)
>>>
>>> On Fri, Nov 18, 2011 at 7:48 AM, Alec Swan  wrote:
 Hello,

 I have two AjaxEditableLabel components. I use jQuery to place one
 component inside of another when the user views the page. The problem
 is that when the user clicks inside of the inner AjaxEditableLabel it
 goes into edit mode but right after that the outer AjaxEditableLabel
 goes into edit mode.

 How can I prevent the outer AjaxEditableLabel from going into edit mode?

 Thanks,

 Alec

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


>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: AjaxEditableLabel inside of AjaxEditableLabel

2011-11-20 Thread Alec Swan
Anybody can help with stopping propagation of events from inner
editable label to the outer editable label?

Thanks

On Fri, Nov 18, 2011 at 3:45 PM, Alec Swan  wrote:
> I am not sure how to stop propagating the event. Could you please
> provide any pointers?
>
> Here is the relevant code:
>
> final String keypress = "var kc=wicketKeyCode(event); if (kc==27) " +
> cancelCall +
>                                " else if (kc!=13) { return true; } else " + 
> saveCall;
>
> tag.put("onblur", saveCall);
> tag.put("onkeypress", "if (Wicket.Browser.isSafari()) { return; }; " +
> keypress);
> tag.put("onkeydown", "if (!Wicket.Browser.isSafari()) { return; }; " +
> keypress);
>
>
> On Fri, Nov 18, 2011 at 12:32 AM, Martin Grigorov  
> wrote:
>> Hi,
>>
>> You'll need to stop the propagation of the event.
>> To do that you'll have to override
>> org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.EditorAjaxBehavior.onComponentTag(ComponentTag)
>>
>> On Fri, Nov 18, 2011 at 7:48 AM, Alec Swan  wrote:
>>> Hello,
>>>
>>> I have two AjaxEditableLabel components. I use jQuery to place one
>>> component inside of another when the user views the page. The problem
>>> is that when the user clicks inside of the inner AjaxEditableLabel it
>>> goes into edit mode but right after that the outer AjaxEditableLabel
>>> goes into edit mode.
>>>
>>> How can I prevent the outer AjaxEditableLabel from going into edit mode?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

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



Re: AjaxEditableLabel inside of AjaxEditableLabel

2011-11-18 Thread Alec Swan
I am not sure how to stop propagating the event. Could you please
provide any pointers?

Here is the relevant code:

final String keypress = "var kc=wicketKeyCode(event); if (kc==27) " +
cancelCall +
" else if (kc!=13) { return true; } else " + 
saveCall;

tag.put("onblur", saveCall);
tag.put("onkeypress", "if (Wicket.Browser.isSafari()) { return; }; " +
keypress);
tag.put("onkeydown", "if (!Wicket.Browser.isSafari()) { return; }; " +
keypress);


On Fri, Nov 18, 2011 at 12:32 AM, Martin Grigorov  wrote:
> Hi,
>
> You'll need to stop the propagation of the event.
> To do that you'll have to override
> org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.EditorAjaxBehavior.onComponentTag(ComponentTag)
>
> On Fri, Nov 18, 2011 at 7:48 AM, Alec Swan  wrote:
>> Hello,
>>
>> I have two AjaxEditableLabel components. I use jQuery to place one
>> component inside of another when the user views the page. The problem
>> is that when the user clicks inside of the inner AjaxEditableLabel it
>> goes into edit mode but right after that the outer AjaxEditableLabel
>> goes into edit mode.
>>
>> How can I prevent the outer AjaxEditableLabel from going into edit mode?
>>
>> Thanks,
>>
>> Alec
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



Re: AjaxEditableLabel inside of AjaxEditableLabel

2011-11-17 Thread Martin Grigorov
Hi,

You'll need to stop the propagation of the event.
To do that you'll have to override
org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel.EditorAjaxBehavior.onComponentTag(ComponentTag)

On Fri, Nov 18, 2011 at 7:48 AM, Alec Swan  wrote:
> Hello,
>
> I have two AjaxEditableLabel components. I use jQuery to place one
> component inside of another when the user views the page. The problem
> is that when the user clicks inside of the inner AjaxEditableLabel it
> goes into edit mode but right after that the outer AjaxEditableLabel
> goes into edit mode.
>
> How can I prevent the outer AjaxEditableLabel from going into edit mode?
>
> Thanks,
>
> Alec
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



AjaxEditableLabel inside of AjaxEditableLabel

2011-11-17 Thread Alec Swan
Hello,

I have two AjaxEditableLabel components. I use jQuery to place one
component inside of another when the user views the page. The problem
is that when the user clicks inside of the inner AjaxEditableLabel it
goes into edit mode but right after that the outer AjaxEditableLabel
goes into edit mode.

How can I prevent the outer AjaxEditableLabel from going into edit mode?

Thanks,

Alec

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