Re: Validation messages from properties file not working.

2017-08-24 Thread Entropy
That's perfect.  Thanks so much.


Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and
wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

On Wed, Aug 23, 2017 at 3:56 PM, Sven Meier [via Apache Wicket] <
ml+s1842946n4678590...@n4.nabble.com> wrote:

> Hi,
>
> FormComponent has a special error() method for ValidationErrors.
>
> You're hitting another method on Component, that just accepts any
> serializable:
>
>  ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new
> ValidationError().addKey("CaptchaRequired"));
>
> Try the following instead:
>
>  ((WebMarkupContainer)
> form.get("wmcCaptchaError")).error(form.getString("CaptchaRequired"));
>
> Regards
> Sven
>
>
> Am 23.08.2017 um 19:18 schrieb Entropy:
>
> > Yeah, it's definitely related to the component that the
> > ComponentFeedbackPanel relates to.  If I use a TextField, it finds the
> > message perfectly.  I change it to a web markup container or
> hiddenfield,
> > and it fails to find the message.  Same name, same code doing the
> validation
> > and the adding of the validation key.
> >
> > I tried a TextField with visibility set to false and that didn't even
> show
> > the error (which makes sense).
> >
> > --
> > View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Validation-messages-from-properties-file-
> not-working-tp4678575p4678588.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678590=0>
> > For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678590=1>
> >
>
>
> -
> To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678590=2>
> For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678590=3>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/Validation-
> messages-from-properties-file-not-working-tp4678575p4678590.html
> To unsubscribe from Validation messages from properties file not working., 
> click
> here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678596.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: Validation messages from properties file not working.

2017-08-23 Thread Sven Meier

Hi,

FormComponent has a special error() method for ValidationErrors.

You're hitting another method on Component, that just accepts any 
serializable:


((WebMarkupContainer) form.get("wmcCaptchaError")).error(new 
ValidationError().addKey("CaptchaRequired"));


Try the following instead:

((WebMarkupContainer) 
form.get("wmcCaptchaError")).error(form.getString("CaptchaRequired"));


Regards
Sven


Am 23.08.2017 um 19:18 schrieb Entropy:

Yeah, it's definitely related to the component that the
ComponentFeedbackPanel relates to.  If I use a TextField, it finds the
message perfectly.  I change it to a web markup container or hiddenfield,
and it fails to find the message.  Same name, same code doing the validation
and the adding of the validation key.

I tried a TextField with visibility set to false and that didn't even show
the error (which makes sense).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678588.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




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



Re: Validation messages from properties file not working.

2017-08-23 Thread Entropy
Yeah, it's definitely related to the component that the
ComponentFeedbackPanel relates to.  If I use a TextField, it finds the
message perfectly.  I change it to a web markup container or hiddenfield,
and it fails to find the message.  Same name, same code doing the validation
and the adding of the validation key.

I tried a TextField with visibility set to false and that didn't even show
the error (which makes sense).

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678588.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: Validation messages from properties file not working.

2017-08-23 Thread Entropy
The properties file is in the same package as the page, and has the same
prefix name, LandingPage_Cp10.  Other errors added to TextFields and
whatnot from the SAME VALIDATOR are working that use messages from that
SAME FILE.  I even can add the same message to a regular textfield in that
same validator and it works fine.  There's definitely something about the
fact that it's not a normal textfield that messes it up.


Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and
wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx

On Wed, Aug 23, 2017 at 2:54 AM, Martin Grigorov-4 [via Apache Wicket] <
ml+s1842946n4678577...@n4.nabble.com> wrote:

> Hi,
>
> We need to know the location of the i18n file, the package structure and
> the component tree structure to be able to tell why Wicket cannot find it
> ...
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Aug 22, 2017 at 9:33 PM, Entropy <[hidden email]
> <http:///user/SendEmail.jtp?type=node=4678577=0>> wrote:
>
> > We have a javascript widget on our page that doesn't have a wicket form
> > component bound to it.  We just get the value from the request.  We have
> a
> > ComponentFeedbackPanel (CFP) because that's what we do with all of our
> > messages.  We fed a WebMarkupContainer (WMC) that is around the CFP in
> as
> > the Component for the CFP to relate to.  We add the validation message
> to
> > that WMC, and the error DOES show.
> >
> > However, for some reason it's not finding the validation key from the
> > property file.  Every other error done the same way DOES, so i have to
> > guess
> > that it's because we are binding to the WMC that it's not working?
> >
> > Properties File line:
> > CaptchaRequired=The CAPTCHA verification is required. Please complete it
> to
> > continue.
> >
> > Where we add the key (in an abstractformvalidator):
> > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new
> > ValidationError().addKey("CaptchaRequired"));
> >
> > Ideas?
> >
> >
> >
> > --
> > View this message in context: http://apache-wicket.1842946.
> > n4.nabble.com/Validation-messages-from-properties-file-
> > not-working-tp4678575.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678577=1>
> > For additional commands, e-mail: [hidden email]
> <http:///user/SendEmail.jtp?type=node=4678577=2>
> >
> >
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-wicket.1842946.n4.nabble.com/Validation-
> messages-from-properties-file-not-working-tp4678575p4678577.html
> To unsubscribe from Validation messages from properties file not working., 
> click
> here
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=>
> .
> NAML
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678585.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: Validation messages from properties file not working.

2017-08-23 Thread Martin Grigorov
Hi,

We need to know the location of the i18n file, the package structure and
the component tree structure to be able to tell why Wicket cannot find it
...

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Aug 22, 2017 at 9:33 PM, Entropy <blmulholl...@gmail.com> wrote:

> We have a javascript widget on our page that doesn't have a wicket form
> component bound to it.  We just get the value from the request.  We have a
> ComponentFeedbackPanel (CFP) because that's what we do with all of our
> messages.  We fed a WebMarkupContainer (WMC) that is around the CFP in as
> the Component for the CFP to relate to.  We add the validation message to
> that WMC, and the error DOES show.
>
> However, for some reason it's not finding the validation key from the
> property file.  Every other error done the same way DOES, so i have to
> guess
> that it's because we are binding to the WMC that it's not working?
>
> Properties File line:
> CaptchaRequired=The CAPTCHA verification is required. Please complete it to
> continue.
>
> Where we add the key (in an abstractformvalidator):
> ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new
> ValidationError().addKey("CaptchaRequired"));
>
> Ideas?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Validation-messages-from-properties-file-
> not-working-tp4678575.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
>
>


Validation messages from properties file not working.

2017-08-22 Thread Entropy
We have a javascript widget on our page that doesn't have a wicket form
component bound to it.  We just get the value from the request.  We have a
ComponentFeedbackPanel (CFP) because that's what we do with all of our
messages.  We fed a WebMarkupContainer (WMC) that is around the CFP in as
the Component for the CFP to relate to.  We add the validation message to
that WMC, and the error DOES show.

However, for some reason it's not finding the validation key from the
property file.  Every other error done the same way DOES, so i have to guess
that it's because we are binding to the WMC that it's not working?

Properties File line:
CaptchaRequired=The CAPTCHA verification is required. Please complete it to
continue.

Where we add the key (in an abstractformvalidator):
((WebMarkupContainer) form.get("wmcCaptchaError")).error(new
ValidationError().addKey("CaptchaRequired"));

Ideas?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575.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



Validation messages go missing in ajax form example

2013-05-03 Thread Taro Fukunaga
Hi,

I'm having a problem with validation in a form with ajax buttons. I am using
Wicket 6.7.0 and running Form Example: shows ajax form processing on my
local box (I downloaded Wicket 6.7.0 zip file and running it through
jettty). The scenario:

1) Type aaa for the name field and click submit via ajax button. Result: 

Name must be at least 4 characters
Email is required

2) Next I type  for the name filed and click submit via ajax button.
Result: no validation error messages are shown (not even for the email).

3) I type aaa again and click submit via ajax button. Result: no
validation error messages are shown.

Now I no longer get validation messages whenever I click the button.

Workaround: Erase the text for the name field and click the submit via
ajax button. Then type aaa. The validation message appears again.

Is this a known issue and what can I do to fix this?

Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-go-missing-in-ajax-form-example-tp4658545.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: Validation messages go missing in ajax form example

2013-05-03 Thread Sven Meier

Works fine here:  Messages show up with either button (and as you type too).

Sven

On 05/03/2013 11:11 PM, Taro Fukunaga wrote:

Hi,

I'm having a problem with validation in a form with ajax buttons. I am using
Wicket 6.7.0 and running Form Example: shows ajax form processing on my
local box (I downloaded Wicket 6.7.0 zip file and running it through
jettty). The scenario:

1) Type aaa for the name field and click submit via ajax button. Result:

 Name must be at least 4 characters
 Email is required

2) Next I type  for the name filed and click submit via ajax button.
Result: no validation error messages are shown (not even for the email).

3) I type aaa again and click submit via ajax button. Result: no
validation error messages are shown.

Now I no longer get validation messages whenever I click the button.

Workaround: Erase the text for the name field and click the submit via
ajax button. Then type aaa. The validation message appears again.

Is this a known issue and what can I do to fix this?

Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-go-missing-in-ajax-form-example-tp4658545.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




-
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-15 Thread Igor Vaynberg
';
 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-15 Thread anant . asty
Thanks that workes perfectly
-Original Message-
From: Igor Vaynberg igor.vaynb...@gmail.com
Date: Tue, 15 Nov 2011 07:20:44 
To: users@wicket.apache.org
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 anant.a...@gmail.com 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:
 'com.aspen.web.WebAppDescriptor'; locale: 'en_US'; Style: 'null';
 Variation:
 'null'
 DEBUG - ponentStringResourceLoader - key: 'zip.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:
 '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

Re: Customizing Error / Validation messages

2011-11-14 Thread Martin Grigorov
Hi,

On Mon, Nov 14, 2011 at 8:50 AM, anantasthana anant.a...@gmail.com 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 anant.a...@gmail.com 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
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 anant.a...@gmail.com 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
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.a...@gmail.com 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 anant.a...@gmail.com 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 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,  lt;anant.asty@gt; 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 lt;anant.asty@gt; 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 anantasthana
 - 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



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



Validation messages for required fields using form id

2011-03-24 Thread mwilber
So I had a need to inject a custom validation message for a required text
component when the field value is not present. No problem I said, looking at
some wiki pages and other online content, I found that it should be easily
added as any other i18n property:

..Required=My custom message.

However, debugging through the only keys the MessageSource seems to go
through are:
.Required
Required

So, debugging through I see that the MessageSource inner class of
FormComponent works by allowing the FormComponent to inject a prefix to the
key, which would then look for the following keys:
..Required
.Required
Required

So is the form Id no longer used?

Digging further I can see that the default implementation in FormComponent
to get a prefix is to ask the form for a validation prefix, which by turn
returns null. So even if I override this method in the Form to return the
form id, it's still only going to look through:
..Required
.Required
Required

So did the original property name I saw online ever work?
..Required=My custom message.

I'm on 1.4.2 (old I know), but nothing appears to have change in this arena
on 1.4.16 either.


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-for-required-fields-using-form-id-tp3403212p3403212.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: Validation messages for required fields using form id

2011-03-24 Thread mwilber
Would it be true that the entire form id from the page level down is needed?

tabs.panel. for instance? That seems to work.

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Validation-messages-for-required-fields-using-form-id-tp3403212p3403612.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: Validation messages for required fields using form id

2011-03-24 Thread Martin Grigorov
On Thu, Mar 24, 2011 at 9:01 PM, mwilber matt.wil...@gmail.com wrote:

 Would it be true that the entire form id from the page level down is
 needed?

 tabs.panel. for instance? That seems to work.

 All of them should work.
More specific ones have bigger priority.


  --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Validation-messages-for-required-fields-using-form-id-tp3403212p3403612.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 http://jweekend.com/


Localizing validation messages

2010-11-26 Thread Josh Kamau
Hi there

I have a very simple question

How do i localize/i18n a message like is 'sdfasdf' not a valid Integer. It
doest fall under any of the validators that i know e.g Required,
NumberValidator.Range. etc


regards.
Josh


Validation Messages

2010-06-07 Thread Brian Mulholland
This is probably a stupid question, but when I set up a validation
like required or a custom validator, I want the label in the message
to reflect a value other than the Id of the component.  How can I set
that to a value I'd prefer?

Brian Mulholland

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



Re: Validation Messages

2010-06-07 Thread Igor Vaynberg
first call setlabel on your formcomponent with the value that you want
to show up, then in the error message template use ${label} variable.

-igor

On Mon, Jun 7, 2010 at 10:54 AM, Brian Mulholland
blmulholl...@gmail.com wrote:
 This is probably a stupid question, but when I set up a validation
 like required or a custom validator, I want the label in the message
 to reflect a value other than the Id of the component.  How can I set
 that to a value I'd prefer?

 Brian Mulholland

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



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



Wicket validation messages

2009-04-16 Thread adam . parchimowicz

Hey,

I was browsing Wicket documentation and found the at some point you've  
changed the way that Wicket locates validation messages. Along with the  
change any javadoc comment informing how it is supposed to work disappeared  
(the latest found trace was 1.3.0  
http://wicket.sourceforge.net/wicket-1.0/apidocs/wicket/markup/html/form/validation/AbstractValidator.html  
nothing found after that). I've enabled debugging for resources localizer  
but couldn't figure it out from there. However I've noticed it changes the  
set of resource keys it tries to look up while it changes properties files  
it searches for. It also doesn't seem to even try to find anything in  
package properties file.


If any piece of documentation exists please point me to it (I've even  
browsed the increasingly famous Wicket in Action with no success :))


-A


RE: Validation Messages

2008-10-22 Thread Kai Mütz
Thank you, but it seems that only found resources are logged. Meanwhile I
have found out that I have to use a key like this:

myform.tabs.panel.myfield=My Field

where tabs is the id of my tabbed panel. But I haven't found a log message
that points to a missing key myform.tabs.panel.myfield.

Kai

Igor Vaynberg mailto:[EMAIL PROTECTED] wrote:
 log4j.logger.org.apache.wicket.resource=DEBUG

 should do it afair.

 -igor


 On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz [EMAIL PROTECTED]
 wrote:

 Hi,

 I have some problems with validation messages. Normally I set my
 validation messages within the property files like this:

 Required='${label}' is required
 StringValidator.maximum='${label}' [...] ${maximum} [...]

 myform.myfield=My Field

 and got (as expected) 'My Field' is required if I do not fill
 myfield.

 A problem occurs with a form which contains a tapped panel. The
 validator does not find the resource and I got the message 'myfield'
 is required. Is there a possibility to find out which resource key
 the validator uses to find the resource? And in which property files
 the validator is searching?

 Thanks in advance,
 Kai



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation Messages

2008-10-22 Thread Igor Vaynberg
try org.apache.wicket.Localizer

-igor

On Wed, Oct 22, 2008 at 1:55 AM, Kai Mütz [EMAIL PROTECTED] wrote:
 Thank you, but it seems that only found resources are logged. Meanwhile I
 have found out that I have to use a key like this:

 myform.tabs.panel.myfield=My Field

 where tabs is the id of my tabbed panel. But I haven't found a log message
 that points to a missing key myform.tabs.panel.myfield.

 Kai

 Igor Vaynberg mailto:[EMAIL PROTECTED] wrote:
 log4j.logger.org.apache.wicket.resource=DEBUG

 should do it afair.

 -igor


 On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz [EMAIL PROTECTED]
 wrote:

 Hi,

 I have some problems with validation messages. Normally I set my
 validation messages within the property files like this:

 Required='${label}' is required
 StringValidator.maximum='${label}' [...] ${maximum} [...]

 myform.myfield=My Field

 and got (as expected) 'My Field' is required if I do not fill
 myfield.

 A problem occurs with a form which contains a tapped panel. The
 validator does not find the resource and I got the message 'myfield'
 is required. Is there a possibility to find out which resource key
 the validator uses to find the resource? And in which property files
 the validator is searching?

 Thanks in advance,
 Kai



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Validation Messages

2008-10-21 Thread Kai Mütz
Hi,

I have some problems with validation messages. Normally I set my validation
messages within the property files like this:

Required='${label}' is required
StringValidator.maximum='${label}' [...] ${maximum} [...]

myform.myfield=My Field

and got (as expected) 'My Field' is required if I do not fill myfield.

A problem occurs with a form which contains a tapped panel. The validator
does not find the resource and I got the message 'myfield' is required. Is
there a possibility to find out which resource key the validator uses to
find the resource? And in which property files the validator is searching?

Thanks in advance,
Kai



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation Messages

2008-10-21 Thread Igor Vaynberg
log4j.logger.org.apache.wicket.resource=DEBUG

should do it afair.

-igor

On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz [EMAIL PROTECTED] wrote:

 Hi,

 I have some problems with validation messages. Normally I set my validation
 messages within the property files like this:

 Required='${label}' is required
 StringValidator.maximum='${label}' [...] ${maximum} [...]

 myform.myfield=My Field

 and got (as expected) 'My Field' is required if I do not fill myfield.

 A problem occurs with a form which contains a tapped panel. The validator
 does not find the resource and I got the message 'myfield' is required.
 Is
 there a possibility to find out which resource key the validator uses to
 find the resource? And in which property files the validator is searching?

 Thanks in advance,
 Kai



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]