Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts with vectors? Best way to solve this problem?

Reply
Thread Tools

Struts with vectors? Best way to solve this problem?

 
 
Scott Phelps
Guest
Posts: n/a
 
      06-08-2005
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


 
Reply With Quote
 
 
 
 
Wendy Smoak
Guest
Posts: n/a
 
      06-09-2005
"Scott Phelps" <(E-Mail Removed)> wrote:

> 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?

--
Wendy Smoak


 
Reply With Quote
 
 
 
 
Scott Phelps
Guest
Posts: n/a
 
      06-10-2005

"Wendy Smoak" <(E-Mail Removed)> wrote in message
news:OKNpe.8739$qr.7126@fed1read06...
> "Scott Phelps" <(E-Mail Removed)> wrote:
>
>> 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?
>
> --
> Wendy Smoak
>


Im using castor.


 
Reply With Quote
 
Wendy Smoak
Guest
Posts: n/a
 
      06-10-2005
"Scott Phelps" <(E-Mail Removed)> wrote
>
> 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.

--
Wendy Smoak


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What’s the best way to solve this kind of javascript dead loop? YouSui Javascript 1 02-09-2010 08:11 AM
Advice Needed: Best way to use Maven (w. Eclipse/Struts/Spring/Hibernate/svn/ant) etienno Java 0 12-13-2006 10:15 AM
Is it safe to point to Internet for locating struts DTD files in struts TLDs and XML files? Katie Wright Java 8 01-07-2005 03:37 PM
Struts Installation - missing struts.tld??? Jason Us Java 0 10-03-2003 11:36 PM
The best way to update a collection in a struts page using "logic:iterate" Zhao Java 0 09-16-2003 09:16 AM



Advertisments