Dooh.. I assumed i had to pass the form to the excute method as a dynaform.. Cool i'll be back soon.
On 11-12-2002 15:59, "Pat Quinn" <[EMAIL PROTECTED]> wrote: > You access your form bean in the very same way as before theres nothing new > there. > > > > > > >> From: Mark <[EMAIL PROTECTED]> >> Reply-To: [EMAIL PROTECTED] >> To: Struts Users Mailing List <[EMAIL PROTECTED]> >> Subject: Re: Map-backed ActionForms >> Date: Wed, 11 Dec 2002 15:54:36 +0100 >> >> Pat >> >> How do i get to my FormBean in my action class >> >> usually: >> >> MyForm theForm = (MyForm) form; >> >> But when i try to compile javac says 'no', is there something i'm missing >> or >> does javac hate me :)? >> >> >> On 11-12-2002 14:49, "Pat Quinn" <[EMAIL PROTECTED]> wrote: >> >>> I'm using the Map-Backed action form approach as detailed here: >>> >>> >> http://jakarta.apache.org/struts/userGuide/building_controller.html#map_actio>> n >>> _form_classes >>> >>> I have a form bean with a one instance of a Value >> Object(i.e.customersVO), >>> this value object contain an ArrayList(i.e. CustomerDetails) of other >> Value >>> objects(i.e. CustomerDetailsVO). >>> >>> ---------- >>> Form Bean >>> ---------- >>> public class customersForm extends ActionForm { >>> >>> >>> private customersVO customers = null; >>> >>> >>> /*Get & Set methods for the customers Value Object*/ >>> public void setCustomers(customersVO pCustomersVO ) { >>> customers = pCustomersVO; >>> } >>> >>> >>> public customersVO getCustomers() { >>> return customers; >>> } >>> >>> >>> /*Get & Set methods for the ArrayList of VO's contained within the >>> customersVO*/ >>> public Object getCustomerDetail(int key) { >>> return customers.getCustomerDetails().get(key); >>> } >>> >>> public void setCustomerDetail(int key, Object value) { >>> customers.getCustomerDetails().set(key, value); >>> } >>> } >>> >>> >>> ----------- >>> JSP Source >>> ----------- >>> <logic:iterate name="myForm" property="CustomerDetails" >> indexId="rowIndex"> >>> <% String name = "customerDetail["+rowIndex+"]";%> >>> <html:text property="<%=name + ".firstName"%>"/> >>> >>> >>> >>> This works fine but i personally don't like including scriplet code like >>> this in my jsp's. Is there another way can do this?? >>> >>> >>> >>> >>> >>> >>> _________________________________________________________________ >>> Add photos to your e-mail with MSN 8. Get 2 months FREE*. >>> http://join.msn.com/?page=features/featuredemail >>> >>> >>> -- >>> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >>> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >>> >>> >> >> >> -- >> To unsubscribe, e-mail: >> <mailto:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> > > > _________________________________________________________________ > Help STOP SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>