Two Laptop Bag*
The moose likes Struts and the fly likes Dynamic select fields need to add in jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dynamic select fields need to add in jsp page" Watch "Dynamic select fields need to add in jsp page" New topic
Author

Dynamic select fields need to add in jsp page

Soumya Madhu
Greenhorn

Joined: Dec 24, 2008
Posts: 7
Hi,

I need to create dynamic select fields(<s:select>) when I give a number as input. If I select 3 as input, I need to create 3 select fields in jsp page dynamically. whose field name should be created dynamically.
I am using struts 2 and tomcat 6 and java 1.6.

Can any one help me ?

thanks
soumya
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61086
    
  66

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Just create the HTML that the select tag would render. You might have to play some games to get validation to do what you want, depending on how you're planning on implementing it.
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello Soumya Madhu. What's your real problem?

Do you have any code? Are you receiving some error message or just don't know what to do?


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
 
Consider Paul's rocket mass heater.
 
subject: Dynamic select fields need to add in jsp page