Just for information if you are using a custom component then i guess parameters, ComponentResources gives also access to parameter definition and annotations...
2010/6/22 Jim O'Callaghan <jc1000...@yahoo.co.uk> > Thanks Christophe - that should be enough to get me going. I don't think > @DataType would cover my scenario - I am using the same custom component to > render a type in multiple classes to allow transparent retrieval from a db > depending on some user setting - the type makes the selection of data to > display transparent to the user / developer, but can vary greatly in length > across different consumers. > > -----Original Message----- > From: Christophe Cordenier [mailto:christophe.corden...@gmail.com] > Sent: 22 June 2010 08:55 > To: Tapestry users > Subject: Re: Access validation constraints within custom component > > Hi > > @DataType is not sufficient to define your display ? Are you constraints > dynamic ? > > Anayway, have you looked at the PropertyAccess service that gives you all > information on object properties including their annotations through the > AnnotationProvider interface. I guess that combining some tweaks in > beanblocksource overrides and property analysis, you should achieve your > goal. > > > 2010/6/22 Jim O'Callaghan <jc1000...@yahoo.co.uk> > > > Christophe, > > > > I'm trying to render a multiline textarea for input if the minlenght or > > maxlenght specified in an @validate annotation is over n, otherwise a > text > > field, to save having to use t:parameter in my templates, where the size > of > > a field is a good indicator of what control would be most useful. > > > > -----Original Message----- > > From: Christophe Cordenier [mailto:christophe.corden...@gmail.com] > > Sent: 22 June 2010 07:29 > > To: Tapestry users > > Subject: Re: Access validation constraints within custom component > > > > Hi > > > > 2010/6/21 Jim O'Callaghan <j...@peritussolutions.com> > > > > > Is there a way to access validation constraints within custom > components? > > > Ex. min length / max length specified using the @Validate annotation on > > > fields? I'm trying to render different output depending on some > > > constraints. Thanks. > > > > > > > Can you give more details about 'render different output' ? Different > > components, different messages, different client validation behavior... > > > > > > > > > > > > > > > > Regards, > > > > > > Jim. > > > > > > > > > > > > -- > > Regards, > > Christophe Cordenier. > > > > Developer of wooki @wookicentral.com > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > -- > Regards, > Christophe Cordenier. > > Developer of wooki @wookicentral.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Christophe Cordenier. Developer of wooki @wookicentral.com