-
1. Re: submit on enter
tony.herstell1 May 11, 2007 6:35 AM (in response to ypasmk)I could be wrong but I think seam finds the "nearest" command button and automagically presses that when you hit enter!
Shuffle the button round so that "submit" is nearest the password field.
Works for me!
(I have asked for a way of saying which I want the default button to be on a page with no luck so far so ask for that and it might get considered.
Basically set breakpoints on all handlers for you buttons/links and see which is being called when the user presses enter ! -
2. Re: submit on enter
ypasmk May 11, 2007 10:51 AM (in response to ypasmk)Well after some searching I found this...dont know if it's working but I'll try it right now
http://www.jsftutorials.net/defaultActionTag.html
-
3. Re: submit on enter
cwash May 11, 2007 11:25 AM (in response to ypasmk)
I could be wrong but I think seam finds the "nearest" command button and automagically presses that when you hit enter!
Shuffle the button round so that "submit" is nearest the password field.
Works for me!
I think you're right in that this is how JSF determines which command button to turn into a type="submit" (which will respond to the enter button keypress). If you want it to appear second, this is something you can do easily with a style change.
I'm really surprised no one thought that through when designing JSF. It's pretty basic form stuff... -
4. Re: submit on enter
pmuir May 11, 2007 11:29 AM (in response to ypasmk)Yes, this is a bug in JSF. We'll have to make sure it goes into the next version. You could suggest to Ajax4jsf they have a version of this tag in their toolkit, it is, IMO, the right way to do it, and seems like a good fit for a4j.