Re: Which form componnent had focus when form was submitted?
you can create a subclass of hiddenfield that would add the necessary javascript for you and you will end up with a nice reusable component. -igor On Wed, Apr 21, 2010 at 11:43 AM, Warren Bell wrote: > Thats what I am currently doing. It just felt to much like something I > used to do in Struts. I don't know if there is much call for this, but > it would be nice to have an onSubmit for a text field or other form > components that would get fired off if that component was in focus when > the form was submited, or maybe a Form onSubmit(Component > componentInFocus). Just a thought, I end up doing a lot of this. > > Warren > > Igor Vaynberg wrote: >> you have to keep a HiddenField component and populate its value using >> javascript. >> >> -igor >> >> On Wed, Apr 21, 2010 at 9:41 AM, Warren Bell >> wrote: >>> Is there a way to figure out in a forms onSubmit which text field or >>> button had focus when the form is submitted. I have done something in > js >>> to achieve this, but wanted to see if there was something already > built >>> in Wicket. I am limited to using form submit only no Ajax. Windows CE > is >>> having problems with some of the Ajax I tried to use. >>> >>> Thanks, >>> >>> Warren >>> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > > -- > Thanks, > > Warren Bell > > > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Which form componnent had focus when form was submitted?
Thats what I am currently doing. It just felt to much like something I used to do in Struts. I don't know if there is much call for this, but it would be nice to have an onSubmit for a text field or other form components that would get fired off if that component was in focus when the form was submited, or maybe a Form onSubmit(Component componentInFocus). Just a thought, I end up doing a lot of this. Warren Igor Vaynberg wrote: > you have to keep a HiddenField component and populate its value using > javascript. > > -igor > > On Wed, Apr 21, 2010 at 9:41 AM, Warren Bell > wrote: >> Is there a way to figure out in a forms onSubmit which text field or >> button had focus when the form is submitted. I have done something in js >> to achieve this, but wanted to see if there was something already built >> in Wicket. I am limited to using form submit only no Ajax. Windows CE is >> having problems with some of the Ajax I tried to use. >> >> Thanks, >> >> Warren >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Thanks, Warren Bell
Re: Which form componnent had focus when form was submitted?
you have to keep a HiddenField component and populate its value using javascript. -igor On Wed, Apr 21, 2010 at 9:41 AM, Warren Bell wrote: > Is there a way to figure out in a forms onSubmit which text field or > button had focus when the form is submitted. I have done something in js > to achieve this, but wanted to see if there was something already built > in Wicket. I am limited to using form submit only no Ajax. Windows CE is > having problems with some of the Ajax I tried to use. > > Thanks, > > Warren > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Which form componnent had focus when form was submitted?
Is there a way to figure out in a forms onSubmit which text field or button had focus when the form is submitted. I have done something in js to achieve this, but wanted to see if there was something already built in Wicket. I am limited to using form submit only no Ajax. Windows CE is having problems with some of the Ajax I tried to use. Thanks, Warren