Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Struts and actionForm

Reply
Thread Tools

Struts and actionForm

 
 
sp
Guest
Posts: n/a
 
      07-12-2004
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?


 
Reply With Quote
 
 
 
 
Sudsy
Guest
Posts: n/a
 
      07-12-2004
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!

 
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
Editing data with Struts and ActionForm loris_p Java 2 06-07-2007 09:20 PM
Struts ActionForm and View's initialization alanmiles100@yahoo.com Java 1 11-01-2005 01:39 AM
[STRUTS] ActionForm and Date fields Hamvil Java 1 04-16-2005 10:50 PM
[Struts] DispatchAction and ActionForm ShadowMan Java 2 07-12-2004 06:03 PM
[Struts] Newbie - For ActionForm population, must I use Struts taglib? Pratap Das Java 2 04-05-2004 07:42 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57