• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

LookupDispatchAction and enter key

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic