Hi,

did you put the properties in src/main/java or src/main/resources? 

You have to but it into resources if no additional maven settings are applied. 

So create a package with the same name in resources and name the properties 
file the same as the class 

src/main/java/my/package/MyValidator.java
src/main/resources/my/package/MyValidator.properties

kind regards

Tobias

> Am 27.12.2015 um 21:24 schrieb Štefan Šimík <[email protected]>:
> 
> Thank you for tip Martin ...
> I tried both YourValidator.properties or YourValidator.utf8.propertiesit
> right now, but the feedback message was empty string ("") in both cases.
> 
> I found one working solution:
> Call setMessage(...) on validator, which provides validation message, if no
> key is found in properties files.
> 
> But solution with using standard *.properties file would be still nicer for
> me, if possible.
> 
> On Sun, Dec 27, 2015 at 8:25 PM, Martin Grigorov <[email protected]>
> wrote:
> 
>> Hi,
>> 
>> I don't have my IDE with me now, so I can't verify but
>> YourValidator.properties staying next to YourValidator.class should work.
>>> On Dec 27, 2015 8:28 PM, "Štefan Šimík" <[email protected]> wrote:
>>> 
>>> I have separate *.jar containing custom form-component validators.
>>> (in the *.jar file, there are only validators - no other Components, no
>>> WebPage(s),
>>> no WebApplication)
>>> 
>>> MY QUESTION:
>>> Which *.properties file should I create for these validators, so the
>>> validator classes
>>> and their default messages can be contained together in one *.jar?
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to