Re: Customizing Error / Validation messages

2011-11-15 Thread anant . asty
Thanks that workes perfectly
-Original Message-
From: Igor Vaynberg 
Date: Tue, 15 Nov 2011 07:20:44 
To: 
Reply-To: users@wicket.apache.org
Subject: Re: Customizing Error / Validation messages

the javadoc says the key to use is PatternValidator not pattern. to make it
specific to a field use fieldid.PatternValdiator, in your case you can see
from the log that one of the keys that is tried is  zip.PatternValidator

-igor

On Mon, Nov 14, 2011 at 12:03 PM, anantasthana  wrote:

> Here is the Log messages
> I am not sure what it is doing
>
> DEBUG - AbstractShiroFilter- No FilterChainResolver configured.
> Returning original FilterChain.
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'zip.PatternValidator'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorPanel.vendorForm.zip.zip.PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> INFO  - PropertiesFactory  - Loading properties files from
>
> file:/C:/Users/AAsthana/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Aspen/WEB-INF/classes/com/aspen/web/html/vendor/VendorEditPage.properties
> with loader
> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@a606e6
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorForm.zip.zip.PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> INFO  - PropertiesFactory  - Loading properties files from
>
> file:/C:/Users/AAsthana/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Aspen/WEB-INF/classes/com/aspen/web/html/vendor/VendorEditPanel.properties
> with loader
> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@a606e6
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.zip.PatternValidator';
> class:
> 'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'org.apache.wicket.markup.html.form.TextField'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'zip.PatternValidator'
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'zip.PatternValidator'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorPanel.vendorForm.zip.zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> INFO  - PropertiesFactory  - Loading properties files from
>
> file:/C:/Users/AAsthana/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Aspen/WEB-INF/classes/com/aspen/web/WebAppDescriptor.properties
> with loader
> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@a606e6
> INFO  - PropertiesFactory  - Loading properties files from
>
> jar:file:/C:/Users/AAsthana/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Aspen/WEB-INF/lib/wicket-core-1.5.2.jar!/org/apache/wicket/Application.properties
> with loader
> org.apache.wicket.resource.IsoPropertiesFilePropertiesLoader@a606e6
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorForm.zip.zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> &

Re: Customizing Error / Validation messages

2011-11-15 Thread Igor Vaynberg
lidator';
> class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'org.apache.wicket.validation.validator.PatternValidator'; locale: 'en_US';
> Style: 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'PatternValidator'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorPanel.vendorForm.zip.PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorForm.zip.PatternValidator';
> class: 'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US';
> Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
> 'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
> 'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
> 'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
> 'org.apache.wicket.markup.html.form.TextField'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'PatternValidator'
> DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
> zip]]'; key: 'PatternValidator'
> DEBUG - ponentStringResourceLoader - key:
> 'vendorPanel.vendorForm.zip.PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
> 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
> Variation:
> 'null'
> DEBUG - ponentStringResourceLoader - component: '[Form [Component id =
> vendorForm]]'; key: 'zip'
> DEBUG - ponentStringResourceLoader - key: 'vendorPanel.vendorForm.zip';
> class: 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style:
> 'null'; Variation: 'null'
> DEBUG - ponentStringResourceLoader - key: 'zip'; class:
> 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
> Variation: 'null'
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4040704.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Customizing Error / Validation messages

2011-11-14 Thread anantasthana
he.wicket.validation.validator.PatternValidator'; locale: 'en_US';
Style: 'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
zip]]'; key: 'PatternValidator'
DEBUG - ponentStringResourceLoader - key:
'vendorPanel.vendorForm.zip.PatternValidator'; class:
'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'vendorForm.zip.PatternValidator';
class: 'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US'; Style:
'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
'com.aspen.web.html.vendor.VendorEditPage$1'; locale: 'en_US'; Style:
'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'zip.PatternValidator'; class:
'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
'org.apache.wicket.markup.html.form.Form'; locale: 'en_US'; Style: 'null';
Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
'org.apache.wicket.markup.html.form.TextField'; locale: 'en_US'; Style:
'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
zip]]'; key: 'PatternValidator'
DEBUG - ponentStringResourceLoader - component: '[TextField [Component id =
zip]]'; key: 'PatternValidator'
DEBUG - ponentStringResourceLoader - key:
'vendorPanel.vendorForm.zip.PatternValidator'; class:
'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null'; Variation:
'null'
DEBUG - ponentStringResourceLoader - key: 'PatternValidator'; class:
'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null'; Variation:
'null'
DEBUG - ponentStringResourceLoader - component: '[Form [Component id =
vendorForm]]'; key: 'zip'
DEBUG - ponentStringResourceLoader - key: 'vendorPanel.vendorForm.zip';
class: 'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style:
'null'; Variation: 'null'
DEBUG - ponentStringResourceLoader - key: 'zip'; class:
'com.aspen.web.html.vendor.VendorEditPage'; locale: 'en_US'; Style: 'null';
Variation: 'null'

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4040704.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Customizing Error / Validation messages

2011-11-14 Thread anantasthana
SO it says it is Loading the Properties file in the debug messages
I have the key as 
pattern =${label} is not a valid zip
but it still shows the regular expression should i try ${pattern} = zip is
invalid ??
Good work on getting I.5.3 released


Martin Grigorov-4 wrote:
> 
> Enable DEBUG logging for
> org.apache.wicket.resource.loader.ComponentStringResourceLoader and
> see whether your .properties file is asked at all.
> 
> On Mon, Nov 14, 2011 at 10:44 AM,  <anant.asty@> wrote:
>> I tried that it still does not work for some reason I have
>> VendorPage.class VendorPage.html and VendorPage.properties
>> Containing pattern = ${label} is invalid zip. It still shows me the
>> default message. Am I missing a step or doing some thing wrong?
>> --Original Message--
>> From: Martin Grigorov
>> To: users@.apache
>> ReplyTo: users@.apache
>> Subject: Re: Customizing Error / Validation messages
>> Sent: Nov 14, 2011 1:09 AM
>>
>> Hi,
>>
>> On Mon, Nov 14, 2011 at 8:50 AM, anantasthana <anant.asty@> wrote:
>>> I am using pattern validator and i on a page named VendorPage and have a
>>> properties file with keys
>>> pattern= Zip
>>> I am using the pattern validator to validate zip code so i want the
>>> message
>>> to say ... is not a valid zip
>>> I dont know if i am doing smoe thing wrong or missing some thing but i
>>> can
>>> not get the message to display correctly.
>>> Thanks
>>
>> Create file VendorPage.properties and put it next to VendorPage.html
>> (make sure it is copied next to VendorPage.class at build time) and
>> put a line like:
>> pattern = ${label} is not a valid zip
>>
>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@.apache
>>> For additional commands, e-mail: users-help@.apache
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>>
>>
>>
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4040652.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Customizing Error / Validation messages

2011-11-14 Thread Martin Grigorov
Enable DEBUG logging for
org.apache.wicket.resource.loader.ComponentStringResourceLoader and
see whether your .properties file is asked at all.

On Mon, Nov 14, 2011 at 10:44 AM,   wrote:
> I tried that it still does not work for some reason I have VendorPage.class 
> VendorPage.html and VendorPage.properties
> Containing pattern = ${label} is invalid zip. It still shows me the default 
> message. Am I missing a step or doing some thing wrong?
> --Original Message--
> From: Martin Grigorov
> To: users@wicket.apache.org
> ReplyTo: users@wicket.apache.org
> Subject: Re: Customizing Error / Validation messages
> Sent: Nov 14, 2011 1:09 AM
>
> Hi,
>
> On Mon, Nov 14, 2011 at 8:50 AM, anantasthana  wrote:
>> I am using pattern validator and i on a page named VendorPage and have a
>> properties file with keys
>> pattern= Zip
>> I am using the pattern validator to validate zip code so i want the message
>> to say ... is not a valid zip
>> I dont know if i am doing smoe thing wrong or missing some thing but i can
>> not get the message to display correctly.
>> Thanks
>
> Create file VendorPage.properties and put it next to VendorPage.html
> (make sure it is copied next to VendorPage.class at build time) and
> put a line like:
> pattern = ${label} is not a valid zip
>
>
>>
>>
>> --
>> View this message in context: 
>> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Customizing Error / Validation messages

2011-11-14 Thread anant . asty
I tried that it still does not work for some reason I have VendorPage.class 
VendorPage.html and VendorPage.properties
Containing pattern = ${label} is invalid zip. It still shows me the default 
message. Am I missing a step or doing some thing wrong?
--Original Message--
From: Martin Grigorov
To: users@wicket.apache.org
ReplyTo: users@wicket.apache.org
Subject: Re: Customizing Error / Validation messages
Sent: Nov 14, 2011 1:09 AM

Hi,

On Mon, Nov 14, 2011 at 8:50 AM, anantasthana  wrote:
> I am using pattern validator and i on a page named VendorPage and have a
> properties file with keys
> pattern= Zip
> I am using the pattern validator to validate zip code so i want the message
> to say ... is not a valid zip
> I dont know if i am doing smoe thing wrong or missing some thing but i can
> not get the message to display correctly.
> Thanks

Create file VendorPage.properties and put it next to VendorPage.html
(make sure it is copied next to VendorPage.class at build time) and
put a line like:
pattern = ${label} is not a valid zip


>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




Re: Customizing Error / Validation messages

2011-11-14 Thread anant . asty
Thanks I will try that. 
--Original Message--
From: Martin Grigorov
To: users@wicket.apache.org
ReplyTo: users@wicket.apache.org
Subject: Re: Customizing Error / Validation messages
Sent: Nov 14, 2011 1:09 AM

Hi,

On Mon, Nov 14, 2011 at 8:50 AM, anantasthana  wrote:
> I am using pattern validator and i on a page named VendorPage and have a
> properties file with keys
> pattern= Zip
> I am using the pattern validator to validate zip code so i want the message
> to say ... is not a valid zip
> I dont know if i am doing smoe thing wrong or missing some thing but i can
> not get the message to display correctly.
> Thanks

Create file VendorPage.properties and put it next to VendorPage.html
(make sure it is copied next to VendorPage.class at build time) and
put a line like:
pattern = ${label} is not a valid zip


>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




Re: Customizing Error / Validation messages

2011-11-14 Thread Martin Grigorov
Hi,

On Mon, Nov 14, 2011 at 8:50 AM, anantasthana  wrote:
> I am using pattern validator and i on a page named VendorPage and have a
> properties file with keys
> pattern= Zip
> I am using the pattern validator to validate zip code so i want the message
> to say ... is not a valid zip
> I dont know if i am doing smoe thing wrong or missing some thing but i can
> not get the message to display correctly.
> Thanks

Create file VendorPage.properties and put it next to VendorPage.html
(make sure it is copied next to VendorPage.class at build time) and
put a line like:
pattern = ${label} is not a valid zip


>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Customizing Error / Validation messages

2011-11-13 Thread anantasthana
I am using pattern validator and i on a page named VendorPage and have a
properties file with keys 
pattern= Zip 
I am using the pattern validator to validate zip code so i want the message
to say ... is not a valid zip
I dont know if i am doing smoe thing wrong or missing some thing but i can
not get the message to display correctly.
Thanks


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Customizing-Error-Validation-messages-tp4038582p4038582.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org