Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LookupDispatchAction and enter key

 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you guys handle enter keys on jsp pages when action extends LookupDispatchAction. As you know that hitting enter key on jsp page would throw and error saying no method parameter specified in action. Is there any standard way to call default action method while user hits ennter key?

I know that overriding unspecified method would resolve this but I don't want to go back to each of my action classes and override this method. any other simple way?
 
sudhakar Tadepalli
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can write a javascript function to set a default value(Method Name) when you hit Enter key(KeyCode==13).But I doubt one thin what if you focus a button with tab and hit eneterkey ?. Techincally it should call the selected method. If you convert your submit buttons to just button and submit through javascript will works for all. Not sure if it help u
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic