Struts with vectors? Best way to solve this problem?

S

Scott Phelps

I have a one to many relationship that I need to store from a web page using
struts..


A person has many events and that ocurred on dates. The event is represented
by an id, which is stored in a forgien table.

There are 10 ids which can happen on a given date in the next week.


So basicly I am going to have a table with 10 rows (events) and 7 columns
(days).

How do I create my ActionForm in manor that will make the presentation easy?

Thanks !!

Scott
 
W

Wendy Smoak

Scott Phelps said:
A person has many events and that ocurred on dates. The event is
represented by an id, which is stored in a forgien table.

There are 10 ids which can happen on a given date in the next week.

Forget about Struts for the moment. Design and test your data access code
separately. How are you going to get the data in and out of the database?
Are you using JDBC directly, or an O/R mapping layer like Hibernate?
 
S

Scott Phelps

Wendy Smoak said:
Forget about Struts for the moment. Design and test your data access code
separately. How are you going to get the data in and out of the database?
Are you using JDBC directly, or an O/R mapping layer like Hibernate?

Im using castor.
 
W

Wendy Smoak

Scott Phelps said:
Im using castor.

Okay... so do you already have an object model for the person, the event,
and the relationship? I see either a person that has a list of events,
which have dates, or else a person with a bunch of dates, which have events.

Struts can handle nested objects in the form as long as you stick to the
JavaBeans naming conventions. When you use dotted notation in the element
names, it will call the appropriate get/set methods to populate the form
bean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top