Re: Server and client side validation

2013-05-14 Thread Martin Grigorov
Hi Gabriel, On Tue, May 14, 2013 at 12:43 AM, Gabriel Landon glan...@piti.pf wrote: Hi Martin, It does work with the following code: /return $('#%s').closest('form').parsley( 'validate' );/ Thank you very much. To find out whether the form is in a ModalWindow or not, I've used the

Re: Server and client side validation

2013-05-14 Thread Gabriel Landon
Martin, Thank you it was even easier than I though. /// starts parsley for this form (or the root form) final Form? form = (Form?) component; varResponse.render(OnDomReadyHeaderItem.forScript(String.format($('#%s').parsley();, form.getRootForm() .getMarkupId(;/

Re: Server and client side validation

2013-05-13 Thread Gabriel Landon
Hi Martin, It does work with the following code: /return $('#%s').closest('form').parsley( 'validate' );/ Thank you very much. To find out whether the form is in a ModalWindow or not, I've used the following code: /@Override public void renderHead(final IHeaderResponse varResponse) {

Re: Server and client side validation

2013-05-08 Thread Cedric Gatay
Hi, I've not yet tried to plug it inside a modal window. But I see no reason for it to fail. Le 7 mai 2013 20:15, Gabriel Landon glan...@piti.pf a écrit : Hi Cedric, Yes I've seen what you have done. Did you manage to make it works with forms in ModalWindow? Regards, Gabriel. --

Re: Server and client side validation

2013-05-08 Thread Martin Grigorov
Hi Gabriel, I guess ParsleyJS checks that the parameter for #validate() is a 'form' element. Since this is a nested form Wicket transforms it to a DIV, because otherwise the HTML will not be valid. Wicket knows how to deal with submitting nested forms but you have to do some manual work for

Re: Server and client side validation

2013-05-07 Thread Cedric Gatay
Hi Gabriel, the spin-off from Martin's blog post is available on Maven Central (via Sonatype OSS services). It depends on JSR303 though. Regards, __ Cedric Gatay (@Cedric_Gatay http://twitter.com/Cedric_Gatay) http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr On Tue,

Re: Server and client side validation

2013-05-07 Thread Gabriel Landon
Hi Cedric, Yes I've seen what you have done. Did you manage to make it works with forms in ModalWindow? Regards, Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Server-and-client-side-validation-tp4658242p4658631.html Sent from the Users forum mailing

Re: Server and client side validation

2013-05-06 Thread Gabriel Landon
Martin, That's a great project! That's exactly what I've been waiting for! It would be very nice to have it in wicketstuff so we could upload it with maven and maybe extend it. Regards, Gabriel. -- View this message in context:

Re: Server and client side validation

2013-05-06 Thread Gabriel Landon
Martin, I've create a ParsleyRangeValidator and a ParsleyLengthValidator very easily thanks to your code. I've also create ParsleyForm that initializes Parsley in the RenderHead and a ParsleyAjaxButton that validates Parsley on submit. I only have one problem with forms in a ModalWindow. As the

Re: Server and client side validation

2013-04-30 Thread Cedric Gatay
Hi, Your blog post helped me write my first version of the integration between JSR303 (bean-validation) and client side validation using parsley.js. You can find the current work on this Github repository: https://github.com/code-troopers/wicket-jsr303-parsley Regards, __ Cedric Gatay

Re: Server and client side validation

2013-04-30 Thread Martin Grigorov
Thanks for sharing, Cedric! Well done! On Tue, Apr 30, 2013 at 9:19 AM, Cedric Gatay gata...@gmail.com wrote: Hi, Your blog post helped me write my first version of the integration between JSR303 (bean-validation) and client side validation using parsley.js. You can find the current work

Re: Server and client side validation

2013-04-24 Thread Cedric Gatay
Thanks Martin, I was just wondering how I could do that. Nice library and nice integration with Wicket. Regards Le 24 avr. 2013 18:07, Martin Grigorov mgrigo...@apache.org a écrit : Hi, I just posted a new article at http://wicketinaction.com/2013/04/server-and-client-side-validation/ about