On 04.08.2009, at 16:04, Felix Gilcher wrote:

Hi Michal,

You certainly can do that. You can modify the FPF settings in the view by modifying the config. The (default) FPF config is stored in the attribute namespace 'org.agavi.filter.FormPopulationFilter' in the requests attributes, so it can be retrieved by calling

$this->context->getRequest()- >getAttributes('org.agavi.filter.FormPopulationFilter');

You can then modify the rules according to your needs and write them back. There is currently no way to do this in the FPF configuration.

There is, in fact.

In your "((multi_)?field_)?error_messages" setting, you can have a whole bunch of XPath rule blocks.

Simply do something like:

self::${htmlnsPrefix}input[ancestor::${htmlnsprefix}fo...@id='fubar']...

to target an element inside a form with id "fubar" (could also use class attributes or any other element in the DOM).

That way you can do targeted rules for those special cases (as long as there is something unique in the markup that you can use to detect the situation).

Obviously, such a specific rule must be at the top of the rules list to prevent more generic rules from matching first.

HTH,

- David

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to