File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts2 - Iterator List increment on page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts2 - Iterator List increment on page" Watch "struts2 - Iterator List increment on page" New topic
Author

struts2 - Iterator List increment on page

Santhosh Kalisamy
Ranch Hand

Joined: Apr 15, 2008
Posts: 56
Friends,

I do have a problem.

I do need to display a select box and a textfield. Once user selected a value on select box 1 and text field 1, I have to display Selec Box 2 and Text field 2.

I have to go up to 5 like that.

Right now, I am displaying all 5 on page load using Struts Iterator.



Please share some ideas.... Thanks in advance.
nir sharma
Ranch Hand

Joined: Sep 11, 2012
Posts: 72

you can use javascript to show only one pair and hide rest of the four, and then on blur from that pair you can check whether its filled or not and accordingly show the next pair and continue with the same cycle.
second you can use ajax, and dynamically populate pairs once previous pair is filled.
Santhosh Kalisamy
Ranch Hand

Joined: Apr 15, 2008
Posts: 56
Thanks N. Sharma.

Can I have the AJAX sample code please?
 
Consider Paul's rocket mass heater.
 
subject: struts2 - Iterator List increment on page
 
Similar Threads
spaces while populating using s:iterator
Struts2: Retern all the values inside the list in my Action
Tag that display a list in Struts 2
Struts 2 forms and collections
Data mismatch between two separate lists in a single iterator in struts2