Re: Properties file for *.jar full of custom validators

2015-12-27 Thread Štefan Šimík
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 
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"  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?
> >
>


Properties file for *.jar full of custom validators

2015-12-27 Thread Štefan Šimík
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?


Re: Properties file for *.jar full of custom validators

2015-12-27 Thread Martin Grigorov
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"  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?
>


Re: Properties file for *.jar full of custom validators

2015-12-27 Thread Tobias Soloschenko
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 :
> 
> 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 
> 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"  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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org