FYI ---------- Forwarded message ---------- From: Niall Pemberton <[EMAIL PROTECTED]> Date: Feb 14, 2007 8:48 PM Subject: Re: shale-validator.jar and commons-validator.jar both contains different validateUtilities.js To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
On 2/14/07, Hasan Turksoy <[EMAIL PROTECTED]> wrote:
thanks for your reply Niall.. when i looked into both jars with care, it seems the best solution is; removing trim methods from validator scripts and use the shale's validateUtilities.js file (it contains trim method - it's reasonable because trim is a utility method and every validator script can use it from here)... But IMO, validateUtilities.js file must be in commons-validator.jar... this protects two headed implementations in the future...
I have applied the Shale customizations to the validatorUtilities.js http://issues.apache.org/jira/browse/VALIDATOR-223 http://svn.apache.org/viewvc?view=rev&revision=507611 http://issues.apache.org/jira/browse/VALIDATOR-224 http://svn.apache.org/viewvc?view=rev&revision=507685 Niall
hasan On 2/14/07, Niall Pemberton <[EMAIL PROTECTED]> wrote: > > On 2/14/07, Hasan Turksoy <[EMAIL PROTECTED]> wrote: > > hi all, > > > > it seems that; shale-validator.1.0.4.jar and > > commons-validator.1.3.1.jarboth including > > validateUtilities.js file at org.apache.shale.org path... > > > > what's bad is; these two validateUtilities.js are different.. so, > > commons-validator's validator scripts trying to use shale-validator's > > validateUtilities.js instead of their own validateUtilities.js file > because > > of the class path mechanism... > > > > why they are different? AND which one of these validateUtilities.js file > > should i use? OR am i doing something wrong? > > Until you raised it I wasn't aware of this and it would be more > appropriate to ask the Shale developers why they provided a customized > version of the script. Having said that, looking at their subversion > repository[1] and the changes they made - it appears to be for the > following Jira issue tickets: > > https://issues.apache.org/struts/browse/SHALE-194 > https://issues.apache.org/struts/browse/SHALE-248 > > SHALE-194 is obviously a workaround for the ids generated by JSF for > components. > > SHALE-248 I'm not sure about - the trim() method has been in > validateRequired.js for a long time and is still there in Validator > 1.3.1 - it probably should be in validateUtilities.js but my guess is > they experienced a problem (probably if the "required" validator is > not utilized and therefore the JavaScript for it not rendered). > > As to your question of which should you use - for SHALE-194 it looks > like you need to use the Shale version - but better if you confirm > this with Shale: > > http://shale.apache.org/mail-lists.html > > Niall > > [1] http://tinyurl.com/2wwhj2 > > > thanks for your interest.. > > > > hasan > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >