struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Ash <m...@euronetworldwide.com>
Subject RE: Lost in beans
Date Wed, 05 Feb 2003 22:36:36 GMT
Now its getting interesting, I was starting to look at a converter solution
as well but didn't get anywhere, got some concrete example I could admire?

-----Original Message-----
From: Matthew Meyer [mailto:mordorian@charter.net]
Sent: Wednesday, February 05, 2003 4:29 PM
To: Struts Users Mailing List
Subject: Re: Lost in beans


I was actually looking for an easy way to do just this 
(nest Dynas) for 4 hours today..
The easiest hack(at least in my mind a hack) is to write a 
beanutils Converter to convert from a string to 
DynaActionFrom.
Then when DynaActionFormClass.newInstance() sets the 
inital property values have your converter registered, and 
make sure the inital property in the XML for you nested 
DynaForm it set to the DynaForm you want to use. Then just 
implement the converter to do

public Object convert(Class type, Object value){
    return 
DynaActionFormClass.getDynaActionFormClass((String)value).newInstance();

}

I have not tested this yet as I would like a better way 
but I would call it a decent 'HACK'.

Matt,

On Wed, 5 Feb 2003 15:32:03 -0600 
  Mike Ash <mash@euronetworldwide.com> wrote:
>Guess its time to look at contributing...geez more coding 
>outside of
>work...wife is going to love it
>
>-----Original Message-----
>From: J Beginner [mailto:jbeginner2002@yahoo.com]
>Sent: Wednesday, February 05, 2003 3:31 PM
>To: Struts Users Mailing List
>Subject: RE: Lost in beans
>
>
>Yes, I am back to extending ActionForm and
>ValidatorForm.
>I hope that nested DynaForms will be supported in the
>near future.
>
>--- "Pani, Gourav" <gourav.pani@brightpoint.com>
>wrote:
>> You can extend the ValidatorForm and use the
>> validator framework.
>> 
>> -----Original Message-----
>> From: Mike Ash [mailto:mash@euronetworldwide.com]
>> Sent: Wednesday, February 05, 2003 4:25 PM
>> To: 'Struts Users Mailing List'
>> Subject: RE: Lost in beans
>> 
>> 
>> So if your not using dynaforms are you back to
>> extending actionform?  If so
>> are you not using the validator framework either?
>> 
>> -----Original Message-----
>> From: J Beginner [mailto:jbeginner2002@yahoo.com]
>> Sent: Wednesday, February 05, 2003 3:19 PM
>> To: Struts Users Mailing List
>> Subject: Re: Lost in beans
>> 
>> 
>> This is exactly the same as to what I am trying to
>> do...no luck so far.
>> I reverted back to using no DynaForms.
>> 
>> --- Mike Ash <mash@euronetworldwide.com> wrote:
>> > Is it possible or is there a better way to do
>> > something like
>> > 
>> > 
>> >    <form-beans>
>> >       <form-bean 
>> >             name="User" 
>> >            
>> >
>>
>type="org.apache.struts.validator.DynaValidatorForm">
>> >          <form-property name="fname"
>> > type="java.lang.String" />
>> >          <form-property name="lname"
>> > type="java.lang.String" />
>> > 	<form-bean
>> > 	    name="Addredd"
>> > 	   
>> >
>> type="org.apache.struts.validator.DynaValidatorForm"
>> > >
>> > 	    <form-property name="street"
>> > type="java.lang.String" />
>> > 	    <form-property name="city"
>> > type="java.lang.String" />
>> >   	</form-bean>
>> >         </form-bean>
>> >    <form-beans
>> > 
>> > 
>> > Basically looking for a way to nest beans in the
>> > struts config and use them
>> > in forms/actions/validation.
>> > 
>> > Thanks
>> > 
>> 
>> 
>> __________________________________________________
>> Do you Yahoo!?
>> Yahoo! Mail Plus - Powerful. Affordable. Sign up
>> now.
>> http://mailplus.yahoo.com
>> 
>>
>---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> struts-user-help@jakarta.apache.org
>> 
>>
>---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> struts-user-help@jakarta.apache.org
>> 
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: 
>struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: 
>struts-user-help@jakarta.apache.org


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message