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) {
                super.renderHead(varResponse);
                // starts parsley for this form
                if (this.findParent(ModalWindow.class) == null) {
                        varResponse
                               
.render(OnDomReadyHeaderItem.forScript(String.format("$('#%s').parsley();",
this.getMarkupId())));
                } else {
                
varResponse.render(OnDomReadyHeaderItem.forScript(String.format("$('#%s').closest('form').parsley();",
                                this.getMarkupId())));
                }
        }/

Is there a better way to do that, or is it OK?

Regards,

Gabriel.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Server-and-client-side-validation-tp4658242p4658773.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to