Like Thiago said, you need to do the following from serverside @Inject private FieldValidatorSource source;
@InjectComponent private Field yourField; public FieldValidator getDynamicConstraints() { return source.createValidators(yourField, "required", null); } yourField will be the id of the field in the tml you are trying to validate. Replace require with max and your constraint. I'm using 5.4 and the method signature appears to have changed a bit, so I'm not sure what null is. Then I believe all you need to do is call the dynamicConstraints from your t:validate like so t:validate="prop:getDynamicConstraints()" Hopefully this gets you closer. On Fri, Oct 24, 2014 at 10:54 AM, Name Surname <wintertime0...@outlook.com> wrote: > Hello, yes it's true I may not be very good with proper words to explain > my situation but let me try it once again. > > What I need is following: I have a method that returns some value, now I > want that value to be put into validate, something like: > validate="max=${broj}" which returns value max based on return value from > getBroj function. I hope it is more clear to you now. > > > Date: Fri, 24 Oct 2014 09:59:31 -0400 > > Subject: Re: Putting property values in Validate > > From: gchrist...@cardaddy.com > > To: users@tapestry.apache.org > > > > I think he's having a very difficult time distinguishing the difference > > between serverside and clientside and how they interact with each other. > > > > > > > > On Fri, Oct 24, 2014 at 9:44 AM, Thiago H de Paula Figueiredo < > > thiag...@gmail.com> wrote: > > > > > By the way, why do you need a value from server-side while validating > in > > > JavaScript? In most scenarios, this doesn't make sense. What exactly > is the > > > logic you want to implement? > > > > > > By the way, recommended reading for you: How to Ask Questions the Smart > > > Way: http://www.catb.org/esr/faqs/smart-questions.html > > > > > > > > > On Fri, 24 Oct 2014 10:50:45 -0200, Thiago H de Paula Figueiredo < > > > thiag...@gmail.com> wrote: > > > > > > On Fri, 24 Oct 2014 10:10:26 -0200, Name Surname < > > >> wintertime0...@outlook.com> wrote: > > >> > > >> I have made a Q in Tap so if anyone is willing to help thank you! > > >>> > > >>> http://stackoverflow.com/questions/26547184/assigning- > > >>> passing-value-from-java-function-to-js-jquery-function > > >>> > > >> > > >> You question in StackOverflow is *completely different* from the one > you > > >> posted here. Your question here never mentioned that validation is > > >> comparing a field value with another HTML field value in JavaScript. > Your > > >> question here was about dynamic server-side validation constraints. > This > > >> way, we can never answer your questions correctly because you never > post > > >> them completely here and we'll eventually end up losing the will to > help > > >> you. > > >> > > >> > > > > > > -- > > > Thiago H. de Paula Figueiredo > > > Tapestry, Java and Hibernate consultant and developer > > > http://machina.com.br > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > > > > > > > -- > > George Christman > > www.CarDaddy.com > > P.O. Box 735 > > Johnstown, New York > > -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York