After 2 days of trying to figure it out, it decided to start working.


----- Original Message -----
From: [EMAIL PROTECTED]
Date: Sunday, December 7, 2003 1:05 am
Subject: Config help

> 
> I am using MappingDispatchAction and am attempting to pre-populate 
> a DynaValidatorForm in a setup action. Without validation, the 
> form does show it prepopulated, but upon enterring data, it gets 
> into my submit action.  With Validation it does validate in my 
> submit action and returns errors which I print out.   The data 
> again reaches my submit and past my validate, but fails to show 
> back in the redisplayed form in error.
> 
> I have looked through the forums and docs and know it has been 
> covered.  I am seeking an extra eye because I can't seem to figure 
> out what is going wrong.   If you don't mind can you take a quick 
> look.  I have tried many variations and think it is something 
> simple I am doing wrong.
> 
> Thank you for any help.  Below are my details.
> 
> John
> 
> 
> 
> 
> Tools:  Post Struts 1.1, Velocity FormTool (updated to work with 
> post struts 1.1).
> 
> 
> 
> Inside my setup action:
> 
>        // @Test place a piece of data into the form and see if it 
> comes out other side.
>        DynaValidatorForm form = (DynaValidatorForm)baseForm;
>        form.set(CtlConstants.FORM_TITLE, "Test Title Data");
>        request.setAttribute(mapping.getName(), form);
>        return mapping.findForward("editpage");
>        
>        
>        
> Inside my submit action:
> 
>       DynaValidatorForm form = (DynaValidatorForm)baseForm;
>       ActionMessages errors = new ActionMessages();
>       errors = form.validate(mapping, request);
>       // form values show up here, but not in returned form.
>       if (! errors.isEmpty())
>        {
>            this.saveErrors(request, errors);
>            request.setAttribute(mapping.getName(), form);
>            return new ActionForward(mapping.getInput());
>        }
> 
>        
> Inside my struts-config.xml:
> 
>        <action path="/exec/post/wizard/page1/setup"
>                    
> type="com.jb.controller.services.jobpost.wizard.Step1Action"       
>             parameter="setupPage"
>                    name="/exec/post/wizard/page1/submit/form"
>                    validate="false"
>                    scope="request">
>            <forward    name="editpage"
>                        redirect="false"
>                        path="/WEB-
> INF/templates/exec/post/wizard/wizardstep1.vm"/>            
> <forward    name="failure"
>                        redirect="false"
>                        path="/action/pub/systemError" />
>        
>    
>    
>        <action path="/exec/post/wizard/page1/submit"
>                    
> type="com.jb.controller.services.post.wizard.Step1Action"          
>          parameter="submitPage"
>                    name="/exec/jobpost/wizard/page1/submit/form"
>                    input="/WEB-
> INF/templates/exec/post/wizard/wizardstep1.vm"                    
> validate="false"                    scope="request">
>            <forward    name="thispage"
>                        redirect="false"
>                        path="/WEB-
> INF/templates/exec/post/wizard/wizardstep1.vm"/>            
> <forward    name="nextpage"
>                        redirect="false"
>                        path="/action/exec/post/wizard/page2/setup"/>
>            <forward    name="failure"
>                        redirect="false"
>                        path="/action/pub/systemError" />
>        
> 
> 
> -------------------------------------------------------------------
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to