struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pille <alsa-us...@flipsonline.de>
Subject Re: initialize a DynaValidatorForm property
Date Tue, 19 Dec 2006 06:03:35 GMT


mano dasanayake wrote:
> Hi,
> Yes you can initiate an attribute of type arrayList in the DynaForm as
> follows,
> 
> <form-property name="yourList" type="java.util.List" />

i know that.

> 
> And in the action mapping specify the name of the Form Bean that you are
> about to use. In this case the form bean that contains the List you'r going
> to initiate..

i tried all of this. when i spcified the name of DynaValidatorForm in
the prepare-mapping i got an exception. but it worked with
DynActionForm. why?

but i solved it right now. i just implemented my own Form class as
extension of ValidatorForm.



> 
> Regards,
> Mano
> 

thank you

regards
philippe

> 
> -----Original Message-----
> From: Pille [mailto:alsa-users@flipsonline.de] 
> Sent: Tuesday, December 19, 2006 5:12 AM
> To: user@struts.apache.org
> Subject: initialize a DynaValidatorForm property
> 
> hi,
> how can i initialize a property of type ArrayList in a DynaValidatorForm?
> i saw that i can do some simple initialization with the initial
> attribute in the form-peoperty tag in struts-config.
> 
> at the moment i do some initialization in a prepare action that sets the
> attributes some combo boxes.
> 
> <action path="/prepareBuyOnline"
>                 type="software.BuyOnlineAction"
>                 parameter="prepareForm">
>             <forward name="success" path="/BuyOnline.jsp"/>
> 
> it seems that a form of type DynaValidatorFrom doesn´t allow the
> attribute name="formName" in the prepare action statement. do i need
> this attribute to access the form bean?
> i always get a ForwardConfig exception when i try to do this but i need
> to initialize a form property (ArrayList) in the action statement. i
> think i need an instance of the form bean to set a property with
> PropertyUtils.setSimpleProperty(yourForm,"propertyName",object);
> in a action method. is that right?
> 
> which data types can i use in a DynaValidatorForm? i have a book here
> and the author says that only arrays, lists and maps of primitive data
> types are allowed. is it possible to use a java.util.ArrayList with my
> own beans of same type as elements?
> thank you
> 
> regards
> philippe
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message