struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pat Quinn" <>
Subject Re: Preparing Multiple DynaValidatorForm?s with one action
Date Mon, 06 Oct 2003 21:53:21 GMT
Cheers guys I kinda knew this was the response Id get separate actions it 
is then

>From: Adam Hardy <>
>Reply-To: "Struts Users Mailing List" <>
>To: Struts Users Mailing List <>
>Subject: Re: Preparing Multiple DynaValidatorForm?s with one action
>Date: Mon, 06 Oct 2003 23:16:21 +0200
>Hi Pat,
>are you sure you've got the best approach? Trying to shoe-horn two forms 
>into one request tells me generally (when it happens to me) that I should 
>refactor the design of whatever use-case I'm working on.
>If I have a submit to one action mapping that on success must forward to 
>another action mapping with a completely different form, I use a re-direct. 
>Of course it drops all the data in-between but you're better off in the 
>long run.
>On 10/06/2003 06:09 PM Pat Quinn wrote:
>>I currently have an action (Action A) which is associated with 
>>Action_Form_A ( i.e. org.apache.struts.validator.DynaValidatorForm) i want 
>>to forward to another tile definition which requires Action_Form_B. I want 
>>to initialise a List in Action_Form_B how can i do this as the action i'm 
>>currently in only knows about ACTION_FORM_A. I only want to intialise 
>>actionforms within a common action i'll have seperate action to deal with 
>>I've tried casting the inbound Action Form to type DynaValidator and 
>>calling the relevant set methods but this fails as you'd expect as its 
>>referencing ACTION_FORM_A only.
>>Next i tried to create a new instance of DynaValidator & called 
>>DynaValidatorForm dynaForm2 = new DynaValidatorForm();
>>dynaForm2.set("name", "Joe Bloggs";
>>This too fails with a nullpointer... i could forward to another action 
>>which prepares the actionform for the next view... is there another way i 
>>could do this?
>>Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>struts 1.1 + tomcat 5.0.12 + java 1.4.2
>Linux 2.4.20 RH9
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Add photos to your messages with MSN 8. Get 2 months FREE*.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message