Not egzactly what i mean, i was not very clear i see..,
in other words ForwardAction accepts all request data, i have simple 
validation (which checks nothing at all) for that i made validator to 
look like:
      
     <validator class="string" method="write" name="accept_all_params" 
required="false">
        <arguments base="data[]">
          <argument />
        </arguments>
      </validator>

And Item_id when Edit'ing
      <validator class="number" name="id_err" required="false"
                 translation_domain=".errors">
        <arguments>
          <argument>item_id</argument>
        </arguments>
      </validator>


So i can get All data from request in data[] array, because all inputs 
names are like data[name_foo], data[name_next_foo], .. etc.

All time my requests going to ForwardAction which all time in own View's 
makes:
return $this->createForwardContainer('PostingItem', 
$category_arr['sub_action'] . '.New', $rd); or for .Edit:
return $this->createForwardContainer('PostingItem', 
$category_arr['sub_action'] . '.Edit', $rd);
/* $rd - contains all data from ForwardAction, and is processed further 
for Real validation in SubAction's */
 

And all validations of data[] elements are made in created 
ForwardContainers SubAction.
And this forwarded action validates all data well, if data invalid i got 
called handleError.
I can sea errors in SubAction template by:
<?php print_r_($container->getValidationManager()->getErrors()); ?>

But why automatic Error printing stuff of AgaviFormPopulationFilter, 
doesnt work in this Forward to SubAction case?
Should i use manual errors printing in InputTemplates of SubActions, 
where is many about 60 Input tpls, and better to make it automatic.
Its possible at all to make it work? Or i fail?
Thanx for your time, guys.


My global filters look's like this file, its working well only when 
Forward is not used..

      <filter class="AgaviFormPopulationFilter" name="FormPopulationFilter">

        <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">&lt;div
            class="errors"&gt;${errorMessages}&lt;/div&gt;</ae:parameter>

            <ae:parameter name="markup">&lt;p
            class="error"&gt;${errorMessage}&lt;/p&gt;</ae:parameter>
          </ae:parameter>
        </ae:parameter>
      </filter>


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

Reply via email to