You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sigmar Muuga <me...@gmail.com> on 2010/03/25 07:11:30 UTC

Weird feedback message formats

Hello,
how to customize error / feedback messages in wicket?
At the moment wicket displays quite stupidly password errors:
"mysecret" is too short and so on.

I would like to use translated field labels in feedback messages instead of
field names, that are not so user friendly.

Sigmar

Re: Weird feedback message formats

Posted by Xavier López <xa...@gmail.com>.
Hi  Sigmar,

I went fine just setting the component's Label with setLabel().
This method sets a Model which will be used instead of the wicket:id in the
built-in validator's error messages.

Cheers,
Xavier

2010/3/25 Sigmar Muuga <me...@gmail.com>

> Hello,
> how to customize error / feedback messages in wicket?
> At the moment wicket displays quite stupidly password errors:
> "mysecret" is too short and so on.
>
> I would like to use translated field labels in feedback messages instead of
> field names, that are not so user friendly.
>
> Sigmar
>



-- 
"Klein bottle for rent--inquire within."

Re: Weird feedback message formats

Posted by ayman elwany <ay...@gmail.com>.
is this solution could be used for feedback messages in feedback panels
instead of the componenet/field path as resource key ??

On Thu, Mar 25, 2010 at 8:18 AM, Martin Makundi <
martin.makundi@koodaripalvelut.com> wrote:

> Use same label localization property name as wicket component id:
>
> Application.properties:
> mysecret=My password
>
> <label><wicket:message key="mysecret"/></label>: <input
> type="password" wicket:id="mysecret"/>
>
>
>
> Ofcourse there are other ways too, but the above is way simplest.
>
>
> http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
>
> **
> Martin
>
> 2010/3/25 Sigmar Muuga <me...@gmail.com>:
> > Hello,
> > how to customize error / feedback messages in wicket?
> > At the moment wicket displays quite stupidly password errors:
> > "mysecret" is too short and so on.
> >
> > I would like to use translated field labels in feedback messages instead
> of
> > field names, that are not so user friendly.
> >
> > Sigmar
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Weird feedback message formats

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Use same label localization property name as wicket component id:

Application.properties:
mysecret=My password

<label><wicket:message key="mysecret"/></label>: <input
type="password" wicket:id="mysecret"/>



Ofcourse there are other ways too, but the above is way simplest.

http://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html

**
Martin

2010/3/25 Sigmar Muuga <me...@gmail.com>:
> Hello,
> how to customize error / feedback messages in wicket?
> At the moment wicket displays quite stupidly password errors:
> "mysecret" is too short and so on.
>
> I would like to use translated field labels in feedback messages instead of
> field names, that are not so user friendly.
>
> Sigmar
>

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