This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: struts2 - Iterator List increment on page
 
Similar Threads
Data mismatch between two separate lists in a single iterator in struts2
Struts2: Retern all the values inside the list in my Action
Struts 2 forms and collections
spaces while populating using s:iterator
Tag that display a list in Struts 2