File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes enter key LookupDispatchAction issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "enter key LookupDispatchAction issue" Watch "enter key LookupDispatchAction issue" New topic
Author

enter key LookupDispatchAction issue

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
When cursor is in one of the text fields and have multiple buttons on the page, it throws

javax.servlet.ServletException: Request[/myAction] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.

All my actions extend LookupDispatchAction. how to overcome this issue? I want this to behave like other common web apps, when you hit enter, I want it to submit first button. anyone?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

It should be submitting the first button. My guess is that you will get that error even if you clicked the first button.


A good workman is known by his tools.
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
no. it doesn't submit first button. On hitting enter it throws an error I mentioned in first post saying no parameter found, meaning it doesn't pick up method name as first submit button. No error while clicking on the button. any ideas?
[ October 19, 2005: Message edited by: Vicky Pandya ]
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
does anyone have an idea about this? Whoever uses LookupDispatchAction should have encountered same "enter key" issue. If focus is on any of the forms fields and you hit enter, it will throw an error as I mentioned in first post.

Is there any magic javascript anyone has written which picks up first button as submit when you hit enter key??
 
Consider Paul's rocket mass heater.
 
subject: enter key LookupDispatchAction issue