http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html#syntax
On Thursday, 8 March 2012, Rural Hunter <ruralhun...@gmail.com> 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 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...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 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<lance.j...@googlemail.com> wrote: > > 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<lance.j...@googlemail.com> wrote: > > 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<ruralhun...@gmail.com> wrote: > > 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: > <form t:type="form" t:id="inputs"> > <t:errors/> > <table> > <tr> > <td>aaa:</td> > <td><input t:type="TextField" t:id="firstName" > > t:validate="maxlength=5"/></td> > > <td>(required, maxLength=10, letters only)</td> > </tr> > <tr> > <td></td> > <td><input type="submit" value="Display"/></td> > <td></td> > </tr> > </table> > </form> > > Then the page run with error: > CreatingValidators1:firstname (class > > org.apache.tapestry5.corelib.components.TextField) > > context:CreatingValidators1.tml, line 17 > 12<form t:type="form" t:id="inputs"> > 13<t:errors/> > 14<table> > 15<tr> > 16<td>aaa:</td> > 17<td><input t:type="TextField" t:id="firstName" > > t:validate=