Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts2 - Iterator List increment on page

 
Santhosh Kalisamy
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 72
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks N. Sharma.

Can I have the AJAX sample code please?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic