• 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

Not able to submit Ordered List even using Indexed property

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here my list is getting fetched successfully and values are getting displayed in the in text field,
But when i'm editing the values in the textboxes , and on submitting the form , the list values are
not submited in the action

heres my ActionForm,



heres my StudentVO




heres my JSP




heres my action Class



heres my Struts Config Mapping,

 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the rendered HTML...
 
Rahul Shivsharan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i figured out the problem

now i did some changes in jsp that is as follows



than i did a change in ActionForm for the getter method of student , which is



by doing these above changes i'm able to populate the studentId's and student names in the text field , as well as if i change the names or the id's in the text field
i'm able to submit it successfully and those changed field i'm able to see in the action .

But here is a question, here in the action form in the getter of student i have hardcoded the number 7 which is the list size when i set the list in setter.

but if i don't want to hard code the value , what if my list is dynamic, this list can be 7 or more or even less , than what to do ??

please give some suggestion
 
Rahul Shivsharan
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'M EXTREMELY SORRY FOR ASKING SUCH A STUPID QUESTION, I FIGURED IT OUT, I CHANGED MY GETTER METHOD OF student in ActionForm , which is as follows



now it works perfectly fine , thank you
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rahul Shivsharan wrote:


Correct--that's why I wanted you to look at the rendered HTML, so you'd see you were duplicating the work the "indexed" attribute already does for you.

It's a list--it's dynamically sized.I'm not sure what you're trying to do here.

Edit: Sorry, didn't see you'd already answered your own question.

Glad you figured it out :)

 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic