Hi Brad,

> For my application, I wanted to use a central properties file 
> for the validation messages. 

I was looking to do this exact same thing. My version is here:

http://www.mail-archive.com/wicket-user@lists.sourceforge.net/msg01977.html

Sadly I got no feedback on it. To achieve what you are trying to do you can
create a validator resource key factory that creates resource keys based on
just the class name of the validator and then you add your factory and the
properties file into the wicket Settings object as a string resource and you
are done. BTW wicket localizers will look in <application-name>.properties
file as a last resort, this is where I keep my error messages.

Igor



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Brad Pardee
> Sent: Tuesday, July 19, 2005 7:04 PM
> To: wicket-user@lists.sourceforge.net
> Subject: [Wicket-user] Replacing messaging strategy in 
> AbstractValidator
> 
> For my application, I wanted to use a central properties file 
> for the validation messages.  As oppposed to overriding all 
> the validators, I made changes to AbstractValidator to allow 
> the setting of a global or instance based strategy object for creating
> the messages.   As it might be useful or might
> generate some discussion, I've attached it to this message.  
> I thinks its backward compatible, but its mostly untested 
> (that will change over the next couple of days).  I won't be 
> offended if you decide its worthless :) 
> 
> BTW, I was wondering about the dom4j dependancy.  The only 
> place its used is in
> wicket.util.string.Strings.toString() as follows:
> 
> else if (object instanceof Node)
> {
>   return ((Node)object).getText();
> }
> 
> Is this just an artifact?  I'm trying to keep my application 
> size to a minimum so I end up just commenting it out so I can 
> exclude the dom4j.jar.  Any chance you might get rid of it or 
> is there some future plans for it?  I just can't be bothered 
> have to comment it out each time I grab a new release :)
> 
> -Brad
> 




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to