Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

update a select box in jsp...

 
Pradeep Adibatla
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a select box... I need to update it with values which are there in an ArrayList in action class...

In my action class i have the values ready but they are not updated in jsp drop-down

I have a question...

1) Should execute method return success for this?? We are not going to a new page so why should we return something?
Anyways,I am returning success and in the mapping I am specifying the same jsp name in result tag...

I want to know what does the framework do when it encounters an ArrayList in action class which matches the name mentioned in the s:iterator written for the select in jsp because I am unable to track in-between processing...

The values are being diaplayed in action class and the drop down is somehow empty...
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show the relevant excerpts of the Action class and the JSP page. Also try to mention the struts version you are using, you must be using Struts 2 (guessing from when you said s:iterator), but exactly which version (as there are changes in different version like the id attribute of s:iterator tag has been replaced by var attribute)...
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote:Can you show the relevant excerpts of the Action class and the JSP page.


I think you'll find them here!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic