• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Dynamically Generate the JSP Components

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I need to generate the number of textbox,listbox and button dynamically based on user selection. Means Suppose user has select number 3 then in next page 3 text box, 3 list box and 3 button should be displayed.

I also want to retrive the values into the box.

I am using Struts 1.2. Please help me to do this.

Thanks in advance.

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like a job for indexed properties
 
Rushi Desai
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thank for reply.

Can you please explain in detail? I am new to the indexed properties.

I also want to map the values entered into the listbox.

Suppose user has select 3 values(eg. phoneno,city,state) , then three textbox should be displayed.

Now I want to map the values. Means Value entered into first textbox is of phoneno,in second box is of city and in third box is of state.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you read the FAQ entry I linked? I think it's a pretty good introduction.
If you only have 10 or so fields of different things (name, address, phone, etc.) it may be easier to have all the fields on the JSP and conditionally display them. If it were the same kinds of things, like line items on an invoice, indexed properties may make more sense.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic