Struts with vectors? Best way to solve this problem?

Discussion in 'Java' started by Scott Phelps, Jun 8, 2005.

  1. Scott Phelps

    Scott Phelps Guest

    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
     
    Scott Phelps, Jun 8, 2005
    #1
    1. Advertising

  2. Scott Phelps

    Wendy Smoak Guest

    "Scott Phelps" <> 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
     
    Wendy Smoak, Jun 9, 2005
    #2
    1. Advertising

  3. Scott Phelps

    Scott Phelps Guest

    "Wendy Smoak" <> wrote in message
    news:OKNpe.8739$qr.7126@fed1read06...
    > "Scott Phelps" <> 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.
     
    Scott Phelps, Jun 10, 2005
    #3
  4. Scott Phelps

    Wendy Smoak Guest

    "Scott Phelps" <> 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
     
    Wendy Smoak, Jun 10, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    699
    Shadowman
    Mar 26, 2008
  2. Guest
    Replies:
    0
    Views:
    444
    Guest
    Sep 14, 2005
  3. YouSui
    Replies:
    1
    Views:
    125
    Matthias Reuter
    Feb 9, 2010
  4. Matthew Lefavor
    Replies:
    0
    Views:
    115
    Matthew Lefavor
    Aug 7, 2013
  5. Ian Kelly
    Replies:
    0
    Views:
    113
    Ian Kelly
    Aug 7, 2013
Loading...

Share This Page