On Thu, 21 Nov 2013 15:55:33 -0200, George Christman
<gchrist...@cardaddy.com> wrote:
Hello, I'm trying to build a custom validator but noticed some changes
regarding the js in 5.4.
Does anybody know of a simple approach to handling the js piece of the
code?
javaScriptSupport.require("t5/core/validation");
writer.attributes(DataConstants.VALIDATION_ATTRIBUTE, true,
"data-validate-maxscale", constraintValue.toString(),
"data-maxscale-message", buildMessage(formatter,
field, constraintValue));
I'm sorry, I'm not sure I know what you're asking. Anyway, just think that
the data you need to perform the validation client-side now follows the
way better approach of being located in data-* attributes instead of
variables. Now just make your validation JavaScript code search for
elements with the data-* attributes you're adding and add the validation
hooks to them. Have you checked how the Tapestry validators are written?
That's what I'd do until the documentation about it isn't available.
I'm not sure if I should be using coffee or what I'm suppose to be doing.
You don't need to use CoffeeScript yourself.
--
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