Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

action event to populate a dropdown in the same page  RSS feed

 
K Kamalaka
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a requirement to populate a drop down on click of a button. I need to get list of all employees to a dropdown on click of a button Get Employees. I am trying to use actionListener and it says the method not found and getting errors.

Can I use action instead of actionListener my scenario, and return string is empty or null so that navigation doesn't happen and populate the dropdown values? Please help

Thanks,
Kamala
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Kamala!

Yes you can do that, and in fact, I recommend action methods instead of actionListeners for 99% of everything.

Also, you can do the same thing but without a total page refresh using AJAX and the code for the ajaxListener will be almost identical.
 
K Kamalaka
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Tim,

Thank you for your suggestion.

Kamala-
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!