For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > February 2005 > using multiple instances of the same javabean









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author using multiple instances of the same javabean
guru.mandavia@gmail.com

2005-02-04, 8:57 pm

Hello,
I am trying to use multiple instances of the same javabean on a post.
I can't seem to figure out how to do this. Here is what I want to
do....

1. I have a bean class that maps to a database table
2. I have a form with multiple set of fields, with each set mapping to
the bean.
3. I want to use the javabean to set the properties for each set

Eg. I have a table called
CONTACT with fields
NAME
ADDRESS
PHONE

My form has 4 different sets of contacts like main contact, alternative
contact, emergency contact all with fields that map to the table. How
do I use the javabean to set each properties for each set.

I would like to avoid using <jsp:setProperty name="mainContactBean"
property="Address" param="mainContactAddress"/> because of the large
set of properties.

Is there a way to do a <jsp:setproperty property="*"/> for each
individual set?

Thanks,
Guru

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com