• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Property value not getting set in Action Form

Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

i am facing a problem from the last 3-4 days. I am having a jsp page, with a form element on that. I am having two <select> dropdown boxes of country and state on the form named MyForm . javascript: x()

These are dependent drop down and state dropdown gets filled with according to the value selected from the country drop down. This is working fine on front end. But when i submit, the fields respectilvely named selCountry and selState are not getting set in the Action Form and hence not available in my Action class.

I've checked the value by putting alert messages before submitting the form.
It's coming upto there, but not in the Action Form.

The reset method is being called of Action Form which sets these fields to empty "" String. After that validate method is being called, and in validate method, these fields are coming as "" String and not the values which i've selected on the Jsp Page.

I am confused, when the values are being coming upto form submission, then why arn't they coming in the action form after submitting the form. I've put SOP in getter and setter methods of these fields, but they are also showing "" String.

Please help.
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post relevant portions of your ActionForm bean, struts-config.xml file, and JST. What method are you using to handle your dependent dropdowns? Ajax? It might also help to know what values you're displaying in your alerts.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic