A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
I just meet a strange error with MaxLength Validator with tapestry 5.3.1. My test page is vary simple(copied from jump start): Page: aaa: t:validate="maxlength=5"/> (required, maxLength=10, letters only) Then the page run with error: CreatingValidators1:firstname (class org.apache.

Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Have you overridden the validation error message? Tapestry is having troubles showing an error message and is trying to push a string where an integer should go. Somewhere in the validation error message, there is a %d where it should be a %s. On Thursday, 8 March 2012, Rural Hunter wrote: > I

Re: Rendering components in Alerts

2012-03-08 Thread Magnus Kvalheim
Thanks Kalle, For alerts I created issue: https://issues.apache.org/jira/browse/TAP5-1863 For the more general renderer for blocks: https://issues.apache.org/jira/browse/TAP5-1864 --magnus On Wed, Mar 7, 2012 at 8:20 PM, Kalle Korhonen wrote: > On Wed, Mar 7, 2012 at 12:17 AM, Magnus Kvalhei

Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
No, I didn't set any validation message. Just the tml and java files for the page. 于 2012/3/8 17:41, Lance Java 写道: Have you overridden the validation error message? Tapestry is having troubles showing an error message and is trying to push a string where an integer should go. Somewhere in th

Re: [Tapestry5-jquery ajaxupload] How to change "Drop files here to upload" with button ?

2012-03-08 Thread ayok03
oke i realize bcos configuration i change to Worked!! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5546960.html Sent from the Tapestry - User mailing list archive at Nab

Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
What language are your error messages displaying in? Perhaps there is a bad format in one of the language property files. FYI, the validator is looking for a property named "maximum-string-length" On Thursday, 8 March 2012, Lance Java wrote: > Have you overridden the validation error message? >

ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Dragan Sahpaski
Hi, We have the following use case: A zone with a ZoneRefresh (located in another zone) is updated several times and then the outer zone is updated with another block. After the update, exceptions are constantly thrown by the javascript PeriodicUpdater on this line "zoneRefresh.fire(Tapestry.ZONE_R

Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Try overriding the error message using these instructions: http://tapestry.apache.org/forms-and-validation.html#FormsandValidation-CustomizingValidationMessages Set the error message to something like "no more than %d chars allowed in %s" On Thursday, 8 March 2012, Lance Java wrote: > What lang

Re: ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Taha Hafeez Siddiqi
Hi Dragan Great! Please open a Jira and attach the patch. Sent from my iPhone On Mar 8, 2012, at 4:05 PM, Dragan Sahpaski wrote: > Hi, > We have the following use case: > A zone with a ZoneRefresh (located in another zone) is updated several > times and then the outer zone is updated with an

Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
I didn't set any language in this test app. So tapestry might be using my locale(Chinese). Where can I find the default property setting for Chinese? 于 2012/3/8 18:14, Lance Java 写道: What language are your error messages displaying in? Perhaps there is a bad format in one of the language prop

Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
update: I found the valication messages. This is from ValidationMessages.properties: maximum-string-length=You may provide at most %d characters for %s. This is from ValidationMessages_zh_CN.properties: maximum-string-length=\u60a8\u6700\u591a\u80fd\u4e3a %s \u63d0\u4f9b\u81f3\u5c11 %d \u5b57\u7

Page refresh with FormFragments

2012-03-08 Thread Beat Durrer
Hi guys I'm using a RadioGroup which is linked to 3 FormFragments using the TriggerFragment mixin. When you select a radio, one of the 3 FormFragments is shown. To not loose the selection on Validation errors, I added a @Persist(PersistenceConstants.FLASH) onto the variable which holds the radio-v

Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
Looks like you've found a bug... please file a jira for it As a workaround, override the message using the link I sent previously with a valid error message. Cheers, Lance. On Thursday, 8 March 2012, Rural Hunter wrote: > update: > I found the valication messages. This is from ValidationMessage

Re: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Denis Stepanov
> The pattern that Paul and Thiago are suggesting works fine if that component > occurs a single time on a page. However, if you use it multiple times, the > client side zoneId (as well as the Tapestry JS initializers) are not unique > any more, which causes the same zone to be updated all the

Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
Yes, I overriden the message with the default English one and it works. But...to translate the message into Chinese in a better way, the order of the 2 parameters has to be reversed. Is there anyway to handle this situation? 于 2012/3/8 18:39, Lance Java 写道: Try overriding the error message us

Re: A strange error with MaxLength Validator

2012-03-08 Thread Taha Hafeez Siddiqi
You can change the ordering by using %2$s for second argument and %1$s for second argument. So something like "%2$s and %1$s" Please do file a JIRA. regards Taha On Mar 8, 2012, at 6:33 PM, Rural Hunter wrote: > Yes, I overriden the message with the default English one and it works. > But...t

Re: A strange error with MaxLength Validator

2012-03-08 Thread Rural Hunter
Ah, thanks. Now I understand the message in tapestry 5.2. 于 2012/3/8 21:08, Taha Hafeez Siddiqi 写道: You can change the ordering by using %2$s for second argument and %1$s for second argument. So something like "%2$s and %1$s" Please do file a JIRA. regards Taha On Mar 8, 2012, at 6:33 PM, Ru

Re: A strange error with MaxLength Validator

2012-03-08 Thread Lance Java
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax On Thursday, 8 March 2012, Rural Hunter wrote: > Ah, thanks. Now I understand the message in tapestry 5.2. > > 于 2012/3/8 21:08, Taha Hafeez Siddiqi 写道: > > You can change the ordering by using %2$s for second argument a

Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
Is it possible to redirect to another page from inside a void method annotated as follows: @OnEvent(value = EventConstants.ACTIVATE) public void initPage(Object[] parameters) { if(something goes wrong) { redirect to home page } } Thank you -- View this message

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Dragan Sahpaski
On Thu, Mar 8, 2012 at 4:17 PM, Javix wrote: > Is it possible to redirect to another page from inside a void method > annotated as follows: > Yes, @Inject Response response; @OnEvent(value = EventConstants.ACTIVATE) public void initPage(Object[] parameters) throws IOException{ i

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 12:17:47 -0300, Javix wrote: Is it possible to redirect to another page from inside a void method annotated as follows: Does it really need to be void? If you don't want to redirect, just return null. It's the same as returning void. -- Thiago H. de Paula Figueiredo In

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
I don't really know, the method signature was defined as void that's why I'm asking. And as it is void, in java these methods can not return anything. On 8 March 2012 16:50, Thiago H de Paula Figueiredo [via Tapestry] < ml-node+s1045711n5547914...@n5.nabble.com> wrote: > On Thu, 08 Mar 2012 12:17

SeleniumTestCase.waitForElementToDisappear() does not seem to work

2012-03-08 Thread Dragan Sahpaski
Hi, In TAP5-1492 [1] "New features for SeleniumTestCase" one of the added methods to SeleniumTestCase is waitForElementToDisappear. The commit [2] is by Howard on 31 Mar 2011. I want to use it but I just don't get how it could work. The Prototype hide() documentation [3] briefly says "Hides and r

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 12:53:26 -0300, Javix wrote: I don't really know, the method signature was defined as void that's why I'm asking. And as it is void, in java these methods can not return anything. Unless this method is overriding another one, just change its return type and do the right

Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
Hello, I'm using the Tapestry jQuery project with the full removal of prototype. I have some rather complex client side validation requiring the use of an error box. My question is whether it would be best to disable tapestry client side validation and solely use jquery validator or use both in con

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Emmanuel DEMEY
Hi In an older version, Tapestry5-jquery Validation mechanism was based on jquery Vallidator. But Clément removed all the stack, because the plugin was too big and too complex for our needed. Why don't you create your JavaScript Tapestry validator ? Do you need absolutely JQuery Validator ? Manu

Re: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Jochen Frey
My real concern is slightly different. It boils down to the fact that it is incredibly hard (if not impossible in certain situations) to determine the automatically generated ClientID of a component (that's embedded in the current component) during @SetupRender. This forces developers to mana

Re: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 13:46:47 -0300, Jochen Frey wrote: My real concern is slightly different. It boils down to the fact that it is incredibly hard (if not impossible in certain situations) to determine the automatically generated ClientID of a component (that's embedded in the current c

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Javix
Yeah, it works! I did as you told, - changed the method signature for Object and return MyClacc.class or null when needed. thanks a lot ! On 8 March 2012 17:04, Thiago H de Paula Figueiredo [via Tapestry] < ml-node+s1045711n5547946...@n5.nabble.com> wrote: > On Thu, 08 Mar 2012 12:53:26 -0300, Ja

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
I agree, it is pretty bulky and complex and I'm not opposed to using the tapestry validator, however I haven't found much documentation on how to create custom tapestry-jquery validators. The reason I chose to use the jQuery validator is for the following reasons, maybe you could tell me if this

Re: Hwo to redirect to another page from a vois @OnEvent method

2012-03-08 Thread Kalle Korhonen
What Thiago is saying, you can just return the page (class or instance) if you changed the return type: @OnEvent(value = EventConstants.ACTIVATE) public Object initPage(Object[] parameters) throws IOException{ if(something goes wrong) { return MyErrorPage.class; } Kalle

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
Without knowing jQuery Validator, I'd say the Tapestry client-side validation has the advantage of being added automatically based on the server-side validations added to a field. In addition, the error messages are ready to use out of the box and can be customized. Maybe you can even use b

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 13:56:04 -0300, George Christman wrote: I agree, it is pretty bulky and complex and I'm not opposed to using the tapestry validator, however I haven't found much documentation on how to create custom tapestry-jquery validators. Without having used tapestry-jquery yet (la

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Emmanuel DEMEY
As Thiago said, the main pros of Tapestry Validator, is that everything is configured on the server side. So you will have a server side and a client side validations configured at once. But, in fact, with all your requirements, you should use jQuery Validator. Just for your information, a tutori

Re: ComponentParameters - Binding Expressions - "component:"

2012-03-08 Thread Jochen Frey
I have considered @AfterRender (and tried it at some point), but I may have to revisit that since it's been a while and maybe I was missing something. ... and since you asked: We are building components by tightly integrating .java, .tml, and .js, so that they can be re-used by non specialists.

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
I figured I'd end up having to use jQuery. I found the downside to using jQuery is server side validation. I'm sure there must be a better way to do this, but I found myself handling dynamic server side validation with code like below. This uses the same db tables used in after render to set the cl

Re: ?t:lb=t being appended to query parameter

2012-03-08 Thread George Christman
Hi Howard, was I able to provide enough useful data? -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-lb-t-being-appended-to-query-parameter-tp5526503p5548536.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Server Side Validation with ajax form loop

2012-03-08 Thread David Canteros
Could you please do it? My english is not good (my natural language is spanish) and you already have the code with the issue. Tell me if you can't. Thanks! David -- David Germán Canteros 2012/3/6 George Christman > Sounds go

Re: Server Side Validation with ajax form loop

2012-03-08 Thread George Christman
Sure, not a problem. I'll file a bug in the morning. On Thu, Mar 8, 2012 at 2:58 PM, David Canteros [via Tapestry] < ml-node+s1045711n5548672...@n5.nabble.com> wrote: > Could you please do it? My english is not good (my natural language is > spanish) and you already have the code with the issue

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread Thiago H. de Paula Figueiredo
On Thu, 08 Mar 2012 14:06:49 -0300, Emmanuel DEMEY wrote: As Thiago said, the main pros of Tapestry Validator, is that everything is> configured on the server side. So you will have a server side and a client side validations configured at once. I forgot to mention that validations are a

Re: Tapestry client side validation vs jQuery Validator.

2012-03-08 Thread George Christman
Thiago, I'll have to look deeper into assigning validations automatically. That would be a life saver. I agree, Manu and team have done an excellent job with Tapestry-jQuery. It seems as if most ui components / plugins built today are being built in jQuery, so this plugin makes third party compon

Re: Hibernate/Tapestry5 - MySQL database

2012-03-08 Thread CHAUVEL
Thanks Guys! Finally I used a mapping file. Just the way it is. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Hibernate-Tapestry5-MySQL-database-tp5528748p5548925.html Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: ZoneRefresh mixin should cleanup after itself if the zone is destroyed

2012-03-08 Thread Dragan Sahpaski
Done, https://issues.apache.org/jira/browse/TAP5-1866 Please also see: https://issues.apache.org/jira/browse/TAP5-1867 which is a blocker for 1866. Cheers, Dragan Sahpaski On Thu, Mar 8, 2012 at 12:28 PM, Taha Hafeez Siddiqi < tawus.tapes...@gmail.com> wrote: > Hi Dragan > > Great! Please ope

Re: Programmatical page/component rendering

2012-03-08 Thread Charles Roth
Could someone expand (expound?) more on rendering a Tapestry 5 component *inside* a java class? For example, I have an application I'm rewriting (from an ancient-god-help-me-C-program) in Tapestry. It's a venerable forum tool that lets users put "macros" in their posts. Each macro is rather like

Re: Programmatical page/component rendering

2012-03-08 Thread Thiago H. de Paula Figueiredo
I guess you could solve the problem another way: process the macros before the content is sent for Tapestry to render. Once I had a similar problem to solve (macros) and that's how I solved it. Tapestry templates were never meant to be used by users, just by developers. So, if you need temp

Re: tapestry5-db-migrations

2012-03-08 Thread Taha Hafeez Siddiqi
Thanks Christian The only reservation we have against Liquibase is xml. There is a groovy support but I am not sure how good it is. But I think it is the only way to go :-( regards Taha On Mar 5, 2012, at 8:12 PM, derkoe wrote: > > Taha Hafeez wrote >> >> I was looking for something like r

Re: Simple CMS / content editor component

2012-03-08 Thread Kalle Korhonen
For the brave souls, there's now http://svn.codehaus.org/tynamo/trunk/tapestry-editablecontent/ and the initial snapshots available at https://nexus.codehaus.org/content/groups/snapshots-group/org/tynamo/tapestry-editablecontent/0.0.1-SNAPSHOT/. Kalle On Sat, Feb 18, 2012 at 8:53 AM, Kalle Korho

Re: Simple CMS / content editor component

2012-03-08 Thread Lenny Primak
Sounds great! Thanks! On Mar 8, 2012, at 11:49 PM, Kalle Korhonen wrote: > For the brave souls, there's now > http://svn.codehaus.org/tynamo/trunk/tapestry-editablecontent/ and the > initial snapshots available at > https://nexus.codehaus.org/content/groups/snapshots-group/org/tynamo/tapestry