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]
> 
> > For additional commands, e-mail: [hidden email]
> 
> >
>
>
> -
> To unsubscribe, e-mail: [hidden email]
> 
> For additional commands, e-mail: [hidden email]
> 
>
>
>
> --
> 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
> 
> .
> 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]
> > 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]
> 
> > For additional commands, e-mail: [hidden email]
> 
> >
> >
>
>
> --
> 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
> 
> .
> 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  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
>
>


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: 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/


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



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]



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]