Struts and actionForm

Discussion in 'Java' started by sp, Jul 12, 2004.

  1. sp

    sp Guest

    I've an html form for an Order. Order for me is a
    Bean with some property (date,number,..). Order
    have one or more elements. For me element is
    a Bean with some property (code,quantity,price,description).
    So I want to generate the setter and getter of the ActionForm tha recive
    this field from html form.
    For the property of the order is simple, but for
    the elements of the order i don't know how to make a setter. I want to
    collect a Vector or Array of elements Bean, but I don't know how to create a
    setter.
    I read that in a jsp page write:
    <html:text property="myobj[1].price" ..
    is as myobj[1].getPrice().
    But how to costruct this settet?
    sp, Jul 12, 2004
    #1
    1. Advertising

  2. sp

    Sudsy Guest

    sp wrote:
    <snip>
    > I read that in a jsp page write:
    > <html:text property="myobj[1].price" ..
    > is as myobj[1].getPrice().
    > But how to costruct this settet?


    You're entering the world of advanced struts, i.e. using objects rather
    than simple strings in your forms. I suggest you read the following:
    <http://www.sudsy.net/technology/struts-advanced.html>

    Have fun!
    Sudsy, Jul 12, 2004
    #2
    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. Pratap Das
    Replies:
    2
    Views:
    2,009
    Pratap Das
    Apr 5, 2004
  2. ShadowMan
    Replies:
    2
    Views:
    2,084
    ShadowMan
    Jul 12, 2004
  3. Hamvil
    Replies:
    1
    Views:
    4,160
    Wendy S
    Apr 16, 2005
  4. Replies:
    1
    Views:
    2,707
    shawnews
    Nov 1, 2005
  5. loris_p
    Replies:
    2
    Views:
    659
    loris_p
    Jun 7, 2007
Loading...

Share This Page