my dog learned polymorphism*
The moose likes Struts and the fly likes Struts HTML Lib w/Ajax - Can't get textbox value to Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts HTML Lib w/Ajax - Can Watch "Struts HTML Lib w/Ajax - Can New topic
Author

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

Joey Garcia
Greenhorn

Joined: Oct 11, 2007
Posts: 2
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!



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Struts HTML Lib w/Ajax - Can't get textbox value to Action class
 
Similar Threads
Problem of insert data into database
how to populate formbean property using html:checkbox values
Ajax, Struts, and a few pesky event based issues
Problem in hiding the row of data
Editing and submitting multiple records