Re: Validation based on condition

2010-03-18 Thread Jagadesh Paladugula
Thanks Christophe. Its working :) One more doubt, When I don't want to add validation, I am returning null, in this case page is not getting rendered. Should I need to create a new validator "Optional", make this as default validator; Regards, Jagadesh On Thu, Mar 18, 2010 at 1:01 PM, Christoph

Re: Validation based on condition

2010-03-18 Thread Christophe Cordenier
@Inject private FieldValidatorSource source; @InjectComponent private Field yourField; public FieldValidator getDynamicConstraints() { return source.createValidators(yourField, "required", null); } Note that this is how we generally use Tapestry Services by injecting them. Have a look at the A

Re: Validation based on condition

2010-03-18 Thread Jagadesh Paladugula
Hi Christophe, Could you please give me a sample implementation. Regards, Jagadesh On Thu, Mar 18, 2010 at 12:39 PM, Christophe Cordenier < christophe.corden...@gmail.com> wrote: > Hi > > Try with fielvalidtorsource service to build your conditional constraints. > > Regards > Christophe cordeni

Re: Validation based on condition

2010-03-18 Thread Christophe Cordenier
Hi Try with fielvalidtorsource service to build your conditional constraints. Regards Christophe cordenier Le 18 mars 2010 à 06:59, Jagadesh Paladugula m> a écrit : Hi Everyone, I have a form which is getting generated dynamically based on some values in database. I want to add validat