Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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!



 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
This one time, at bandcamp, I had relations with a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic