• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[STRUTS] Dynamic ActionForm Editing

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I shall explain my problem with the next example:
My (example) bean has the following code:

I can fill this bean up with some SQL statements.
After that i can present the results in a JSP page.

The bean will be connected with the text input's, so that if you change something within the input (the form on the jsp page), it will also be changed in the bean.
My Action would be (to cast the form back to the bean):

My problem is this,
When i create a class like:

So the person can have more then one address.
(But you never know how many addresses)
How can i present this in a JSP page with this nice form connection? So that if a person changes one of the addresses it also changes within the address bean?

[ September 11, 2002: Message edited by: Tim Schade ]
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It sounds to me like you are trying to implement a one-to-many relationship. Assuming this is the case you might want to take a look at the <nested> tags. They are part of 1.1 or available as an add-on for 1.0.
 
Tim Cyber
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jason Menard:
It sounds to me like you are trying to implement a one-to-many relationship. Assuming this is the case you might want to take a look at the <nested> tags. They are part of 1.1 or available as an add-on for 1.0.


I just downloaded the beta2 of struts 1.1.
And i'm looking into the <nested> thingy right now. I guess it's the answer to my problem, thnks
 
reply
    Bookmark Topic Watch Topic
  • New Topic