Re: Updating a Zone with Actionlink doesn't work (Return type can not be handled)

2010-06-22 Thread SakshiAgarwal
Hi Did u get the solution to ur problem. I am facing the same problem component event handler method returned the value Block[Body of Photos:photozone, at context:Photos.tml, line 28]. Return type org.apache.tapestry5.internal.structure.BlockImpl can not be handled regards sakshi -- View this

Re: Access validation constraints within custom component

2010-06-22 Thread Christophe Cordenier
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.

RE: Access validation constraints within custom component

2010-06-22 Thread Jim O'Callaghan
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

Re: Access validation constraints within custom component

2010-06-22 Thread Christophe Cordenier
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

RE: Access validation constraints within custom component

2010-06-22 Thread Jim O'Callaghan
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

Re: Access validation constraints within custom component

2010-06-22 Thread Christophe Cordenier
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

RE: Access validation constraints within custom component

2010-06-22 Thread Jim O'Callaghan
Thanks Christophe. I ended up using: @Environmental private PropertyEditContext context; ... and then: context.getAnnotation(Validate.class); ... in my custom field to get what I needed. This appears to work okay. Thanks for your help. Regards, Jim. -Original Message- From:

Re: Access validation constraints within custom component

2010-06-22 Thread Christophe Cordenier
2010/6/22 Jim O'Callaghan jc1000...@yahoo.co.uk Thanks Christophe. I ended up using: You're welcome ! @Environmental private PropertyEditContext context; ... and then: context.getAnnotation(Validate.class); So you have define you own BeanEditor... ... in my custom field

Re: Updating a Zone with Actionlink doesn't work (Return type can not be handled)

2010-06-22 Thread Thiago H. de Paula Figueiredo
On Tue, 22 Jun 2010 03:09:56 -0300, SakshiAgarwal sakshi.a...@gmail.com wrote: Hi Hi! Did u get the solution to ur problem. I am facing the same problem component event handler method returned the value Block[Body of Photos:photozone, at context:Photos.tml, line 28]. Return type

How to run JS function after zone update?

2010-06-22 Thread matt22
How to run JS function after zone update? div t:type=zone id=formZone ... /div I want to do something like: $('formZone').observe(onLoad, function(){alert('vvv');}) ...but of course, div dont have onLoad... Simply to run my own JS function after every zone update. thanks in advance --

Re: How to run JS function after zone update?

2010-06-22 Thread matt22
i have this solution: $('formZone').observe(tapestry:zoneupdated, function(){alert('vvv');}) -- View this message in context: http://old.nabble.com/How-to-run-JS-function-after-zone-update--tp28959337p28959455.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: Wanted: example of AJAX in a client-side validator

2010-06-22 Thread Katia Aresti Gonzalez
I have an example with a mixin ... it's in not very very simple, but i can simplify the mixin for your example... ^_^ 2010/6/20 Geoff Callender geoff.callender.jumpst...@gmail.com Surely someone has an example of this? On 18/06/2010, at 12:51 PM, Geoff Callender wrote: Thanks, Thiago, but

Re: How to run JS function after zone update?

2010-06-22 Thread Juan E. Maya
This is described in the component's documentation: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Zone.html On Tue, Jun 22, 2010 at 2:26 PM, matt22 s...@zoznam.sk wrote: i have this solution: $('formZone').observe(tapestry:zoneupdated,

Re: Updating a Zone with Actionlink doesn't work (Return type can not be handled)

2010-06-22 Thread SakshiAgarwal
Hi, Thanks a lot for the reply. It works now. I have been struggling hard to make zone work with Form Submit component. I read on http://www.infoq.com/articles/tapestry5-intro, how to make AJAX request. So accordingly from my attached Photos.tml file, I should make onSuccessFromDisapprovePhoto