This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Page when submitted, List becomes empty

 
Hafiz Abdulla
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[color=brown][tt][/tt][/color]




Im using the above code in JSP..
I have a method populate() which sets the value in the form..
The content which i am setting in the action, is being displayed on the screen..
But when i submit the jsp, the list "primaryList" is becoming empty....
Please help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

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

Also, brown text on tan isn;t very readable. Rather, please UseCodeTags to set your code apart.

Good luck with your question.
 
Hafiz Abdulla
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the response..
 
Raja Pal
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please note the disabled = "true" property in several cases(IE 6+) will restrict the data of the select box to get submitted. Instead you may want to choose readonly="true". The list will be then pouplated as expected.
 
Hafiz Abdulla
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried removing disabled = "true" property .. But no luck...
 
Raja Pal
Ranch Hand
Posts: 92
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry about that...I misread the unformatted code in a hurry. With the better formatting now, it looks more readable. I was referring only to the primDetails, division property in the "select" when I wrote that last comment, about disabled.
 
Hafiz Abdulla
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried changing the scope in struts config to 'Session'..
Now the list values are coming while submitting..
But if i modify some thing on screen, say a text field which is inside that list, after submitting i am getting old value only..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic