Hi Michal,I would recommend against doing that. The only thing you'll have as an advantage would be that you don't have to specify the error message twice. On the other side you increase maintenance overhead by having action logic stashed away in an unexpected place.
cheers felix On Jul 21, 2009, at 4:34 PM, Michal Charemza wrote:
On 1 Jul 2009, at 15:58, Mathias Böttcher wrote:Regarding the error message. You can retrieve possible from a validator using its getErrorMessage method. The validator can be accessed by using getChild method of the ValidationManager. I'm not sure if that's the way the problem should be solved... especially with translation in mind.Would a solution to this be at actually save the record with with the unique field *inside* the validator code? Therefore any database exception can be caught in the validator and "thrown" as an Agavi validation error. Therefore all validation messages and code is in the same place. This seems to cross the validation/action boundary however: it doesn't feel right for something "permanent" to actually happen inside the validator. Michal. _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
-- Felix Gilcher Bitextender GmbH Paul-Heyse-Str. 6 D-80336 München T: +49 89 57 08 15 16 F: +49 89 57 08 15 17 M: +49 172 840 88 28 [email protected] http://bitextender.com/ Amtsgericht München, HRB 174280 Geschäftsführer: David Zülke, Florian Clever
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
