Thanks Julien, Waiting for the latest release...
Thanks and Regards Crishantha Nanayakkara -----Original Message----- From: Julien Mercay [mailto:[EMAIL PROTECTED] Sent: Saturday, June 14, 2003 5:07 AM To: OXF Users Subject: Re: Javascript Validations with Struts Validator Framework Hi Crishantha, Struts uses the html:javascript tag library to copy the JavaScript code from the validator-rules.xml to the final HTML page. OXF implements similar a tab library in the form of an XSLT stylesheet. OXF 2.0, due in a few days, will support the html:javascript as well as the html:message tags. Regards, Julien Crishantha Nanayakkara wrote: > Hi, > > If we use Struts Validator Framework for front end Javascript Validations, > How do we invoke those JavaScript methods from XSL pages?(which are defined > in the validator-rules.xml - see below) > m > > A portion of validator-rules.xml > > <validator name="required" > classname="org.apache.struts.validator.FieldChecks" > method="validateRequired" > methodParams="java.lang.Object, > org.apache.commons.validator.ValidatorAction, > org.apache.commons.validator.Field, > org.apache.struts.action.ActionErrors, > javax.servlet.http.HttpServletRequest" > msg="errors.required"> > > <javascript><![CDATA[ > function validateRequired(form) { > var bValid = true; > var focusField = null; > var i = 0; > var fields = new Array(); > oRequired = new required(); > for (x in oRequired) { > var field = form[oRequired[x][0]]; > > if (field.type == 'text' || > field.type == 'textarea' || > field.type == 'file' || > field.type == 'select-one' || > field.type == 'radio' || > field.type == 'password') { > > var value = ''; > > > > Here, in above portion of code how do we invoke the validateRequired(form) > method from client end Javascripts? > > ------------------------- > Thanks and Regards > Crishantha Nanayakkara > Software Engineer > www.virtusa.com > > _______________________________________________ > oxf-users mailing list > [EMAIL PROTECTED] > http://mail.orbeon.com/mailman/listinfo/oxf-users _______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users _______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
