aspose 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
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: 57
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: 57
Thanks N. Sharma.

Can I have the AJAX sample code please?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: struts2 - Iterator List increment on page