commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <grahamdavid1...@yahoo.com>
Subject RE: [Validator] Merging ValidatorResources
Date Wed, 24 Mar 2004 14:41:05 GMT

--- Eric.Lewis@swissinfo.ch wrote:
> Ok, but then that means I can't have a static ValidatorResources
> variable
> :-/
> Is it costly to rebuild the ValidatorResources for every validation?

Well the idea is that the validator configuration files are parsed into
memory once and then the validations reuse the same ValidatorResources
object for the life of the app.  If that doesn't fit your use case, can
you explain your needs a bit more?

> 
> The code I mentioned was taken from "Programming Jakarta Struts" from
> O'Reilly, which has a section about using the Validator outside Struts.

LOL, that's not too helpful for those of us without the book ;-).  What
classes and methods from validator are being used to merge resources?  I
couldn't find any for resources but you can merge ValidatorResults.

David

> 
> Eric
> 
> -----Original Message-----
> From: David Graham [mailto:grahamdavid1980@yahoo.com]
> Sent: Mittwoch, 24. März 2004 15:24
> To: Jakarta Commons Users List
> Subject: Re: [Validator] Merging ValidatorResources
> 
> 
> 
> --- Eric.Lewis@swissinfo.ch wrote:
> > Hi
> > 
> > How can I (using the nightly build of 20040323) merge two
> > ValidatorResources? I want to have a static ValidatorResources
> variable
> > that
> > contains everything, but (as usual) I have two XML files, one with the
> > global validator rules and another one which is specific with the
> form.
> > Which means, I would load the first into the ValidatorResources only
> > once
> > and then according to the object to validate, I would add a specific
> > form
> > for that object.
> 
> The typical use case is to pass InputStreams for all of the xml files
> into
> the ValidatorResources constructor.
> 
> > I saw some code that can merge two ValidatorResources, but all of that
> > seems
> > deprecated...
> 
> What code are you referring to?
> 
> David
> 
> > 
> > Eric
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Finance Tax Center - File online. File on time.
> http://taxes.yahoo.com/filing.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message