• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Struts HTML Lib w/Ajax - Can't get textbox value to Action class

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has been driving me crazy!!

This is a web page that is all form, then when a button is clicked a modal dialog is created that has a text box and a "Save" button. When Save is clicked an Ajax (it is Dojo behind the Ajax wrapper, so I am not using Dojo's xhrPost call or the Get one either) call gets the form object from just the dialog textboxes and the form object is used to be passed back to the Action class. The problem is that I know that the form object is getting the textbox values but they are not in the ActionForm object in the action class. Other form element values are there, but just not the text boxes.

Here is how the HTML is written out:

The rtcVendorForm has this member: private String[] parameterValue;
and getters and setters

In FireFox I have the web Developer add-on and when I select Show Form Details it shows each text box name like this: parameter[0].parameterValue, parameter[1].parameterValues, ...

So I was thinking that I would make the ActionForm member be a String array, but it is never populated with a value. when I breakpoint it and check it for a value.

Just as a test to make sure the form object can pass in multiple values I did a test using Javascript like this:

and I got value of "test1,test2" but I don't want to got this way because it is just too cheesy;

Any help would be appreciated!

Posts: 67750
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
    Bookmark Topic Watch Topic
  • New Topic