You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Farrukhjon SATTOROV (farrukh)" <fi...@gmail.com> on 2013/09/07 12:11:18 UTC

Focus navigation on form components by pressing ENTER

Hi everyone, how to set focus on next form component (TextField) by
pressing on ENTER key in current TextField. Thanks in advance.

Re: Focus navigation on form components by pressing ENTER

Posted by Carl-Eric Menzel <cm...@wicketbuch.de>.
You don't need an ajax behavior to do this. This is all client-side
javascript only, as described in the stackoverflow post.

You can of course use a regular behavior to emit the necessary
javascript.

Carl-Eric

On Sat, 7 Sep 2013 15:50:06 +0500
"Farrukhjon SATTOROV (farrukh)" <fi...@gmail.com> wrote:

> My code here:
> sizeTextField.add(new
> AjaxEventBehavior("ENETER_KEY_OR_SOMTHING_LIKE_THIS") {
>  @Override
> protected void onEvent(AjaxRequestTarget target) {
> target.focusComponent(unitTextField);
> }
> });
> but i don't known how handler passing ENTER key and pass this as
> parameter to AjaxEventBehavior.
> 
> 
> On Sat, Sep 7, 2013 at 3:36 PM, Sven Meier <sv...@meiers.net> wrote:
> 
> > http://stackoverflow.com/**questions/4494552/change-**
> > enter-from-submission-to-tab/**4494691#4494691<http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691>
> >
> >
> > On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote:
> >
> >> Hi everyone, how to set focus on next form component (TextField) by
> >> pressing on ENTER key in current TextField. Thanks in advance.
> >>
> >>
> >
> > ------------------------------**------------------------------**---------
> > To unsubscribe, e-mail:
> > users-unsubscribe@wicket.**apache.org<us...@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: Focus navigation on form components by pressing ENTER

Posted by "Farrukhjon SATTOROV (farrukh)" <fi...@gmail.com>.
My code here:
sizeTextField.add(new AjaxEventBehavior("ENETER_KEY_OR_SOMTHING_LIKE_THIS")
{
 @Override
protected void onEvent(AjaxRequestTarget target) {
target.focusComponent(unitTextField);
}
});
but i don't known how handler passing ENTER key and pass this as parameter
to AjaxEventBehavior.


On Sat, Sep 7, 2013 at 3:36 PM, Sven Meier <sv...@meiers.net> wrote:

> http://stackoverflow.com/**questions/4494552/change-**
> enter-from-submission-to-tab/**4494691#4494691<http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691>
>
>
> On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote:
>
>> Hi everyone, how to set focus on next form component (TextField) by
>> pressing on ENTER key in current TextField. Thanks in advance.
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Focus navigation on form components by pressing ENTER

Posted by Sven Meier <sv...@meiers.net>.
http://stackoverflow.com/questions/4494552/change-enter-from-submission-to-tab/4494691#4494691

On 09/07/2013 12:11 PM, Farrukhjon SATTOROV (farrukh) wrote:
> Hi everyone, how to set focus on next form component (TextField) by
> pressing on ENTER key in current TextField. Thanks in advance.
>


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