Hi there,

as soon as you forward, the "old" requestdata (the one with the  
validation errors) is replaced by a new requestdata, since a forward  
is a new request. There is a mail on the list where David discribes  
this (I think you'll find it via the googlegroup search) 
http://groups.google.com/group/agavi-users

But maybe you could setup an error view, which loads the right  
template (input) and fills the form with the old requestdata and it  
errors.

Basicly something like this

Show Inputform -(submit to action)-> Error occurs in validation -->  
handle*Error() of action is called -(sets view to Error)-> Error View  
load Inputtemplate, fills form via FPF --> show Inputform again with  
Errors etc.

Cheers
Benjamin



Am 03.03.2009 um 09:39 schrieb Liutauras:

> Hi all,
>
> ADT Debug tool is'nt loaded at all when i made POST to ForwardAction
> which is forwarding  to  another  SubAction..
>
> i want be able with FooForwardView, forward to some other
> MyFooXInputSubaction with all $rd data, and i can see this subaction  
> is
> executed and has
> validation errors (with
> $this->container->getValidationManager()->getErrors();) ,
> BUT problem is that what i dont see any Error message printed on the
> bottom of the form.. How to solve?
> I cant use native Routing approuch here because  i got  60 routes  
> with 2
> sub action each has New and Edit,  and them are identical except  
> Action
> and Name and Pattern so its a big waste of routing.xml space ~35KB for
> it, and need time to make changes to all routes if needed.
>
> This forward rounting route is used to forward to some SubActions with
> Input Forms and different Validations files, all SubActions i can Call
> by $url_path which is checked by Callback:
> (Callback by $url_path from DB gets SubActionName to whitch i have to
> forward)
>
>              <route action="Forward" name=".forward"
>                     pattern="^/(url_path:\w+)">
>                <callbacks>
>                  <callback class="CategoryExistsRoutingCallback" />
>                </callbacks>
>                <routes>
>                  <route action=".New" name=".new" pattern="^(/)?$" />
>                  <route action=".Edit" name=".edit"
>                         pattern="^/id:(id:\d+)$">
>                    <callbacks>
>                      <callback class="ProductExistsRoutingCallback" />
>                    </callbacks>
>                  </route>
>                </routes>
>              </route>
>            </routes>
>          </route>
>
> To print errors i am using in global filters:
>
> <filter name="FormPopulationFilter" class="AgaviFormPopulationFilter">
>
>  <ae:parameter name="methods">
>    <ae:parameter>write</ae:parameter>
>  </ae:parameter>
>
>  <ae:parameter name="output_types">
>    <ae:parameter>html</ae:parameter>
>  </ae:parameter>
>
>  <ae:parameter name="error_messages">
>    <ae:parameter name="self::${htmlnsPrefix}form">
>    <ae:parameter name="location">before</ae:parameter>
>    <ae:parameter name="container"><![CDATA[<div class="errors">$ 
> {errorMessages}</div>]]></ae:parameter>
>    <ae:parameter name="markup"><![CDATA[<p class="error">$ 
> {errorMessage}</p>]]></ae:parameter>
>    </ae:parameter>
>  </ae:parameter>
>
> </filter>
>
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users


_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to