You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Chris Colman <ch...@stepaheadsoftware.com> on 2012/02/12 22:08:57 UTC

StringResources in forms based on 'variation'

I configure StringResources for forms using the FormClass.properties
file and this works well.
 
Different strings can be provided for lang, locale etc.,
 
Is it possible to provide a different string based on the markup
'variation'
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software

 
pagebloom - your business & your website growing together
 
Sydney: (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120     
Email: chrisc@stepahead.com.au <ma...@stepahead.com.au> 
Website:
http://www.pagebloom.com <blocked::http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/> 
 
 

Re: StringResources in forms based on 'variation'

Posted by Andrea Del Bene <an...@gmail.com>.
Hi,

you can consider to use Style element used by Wicket for skinning 
application. For more information read this

https://cwiki.apache.org/WICKET/localization-and-skinning-of-applications.html
> What I am trying to do is tailor the validator messages based on the
> variation.
>
> My scenario:
>
> Some clients want log in forms with "Username/Password" others want some
> with "Email/Password" and still others want some with "Member
> Number/Security Code".
>
> I handle all the different types of log in forms with a single wicket
> LoginPanel.java file but different variations - functionally they are
> all the same but the wording on the screen is different.
>
> The wording that the validators use should reflect the fields in each of
> the different variations.
>
> For example on a Username/Password variation the username's Required
> validator message should be:
>
> "Please enter your username."
>
> And not
>
> "Please enter your email address."
>
> If the properties files could support string definitions based on
> variation as well as locale then this would be quite easy to do.
>
> At the moment I can work around this using string definitions like:
>
> Please enter your ${label}
>
> and call setLabel on each form component passing in variation dependent
> names but the ideal solution would be to specify these labels in a
> variation specific way in the properties file.
>
>
> ________________________________
>
> From: Chris Colman [mailto:chrisc@stepaheadsoftware.com]
> Sent: Monday, 13 February 2012 8:09 AM
> To: users@wicket.apache.org
> Subject: StringResources in forms based on 'variation'
>
> I configure StringResources for forms using the FormClass.properties
> file and this works well.
>
> Different strings can be provided for lang, locale etc.,
>
> Is it possible to provide a different string based on the markup
> 'variation'
>
> Yours sincerely,
>
> Chris Colman
>
> Pagebloom Team Leader,
> Step Ahead Software
>
>
> pagebloom - your business&  your website growing together
>
> Sydney:           (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120
> Email: chrisc@stepahead.com.au<ma...@stepahead.com.au>
> Website:
> http://www.pagebloom.com<blocked::http://www.pagebloom.com/>
> http://develop.stepaheadsoftware.com
> <blocked::http://develop.stepaheadsoftware.com/>
>
>
>


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


RE: StringResources in forms based on 'variation'

Posted by Chris Colman <ch...@stepaheadsoftware.com>.
What I am trying to do is tailor the validator messages based on the
variation. 
 
My scenario:
 
Some clients want log in forms with "Username/Password" others want some
with "Email/Password" and still others want some with "Member
Number/Security Code".
 
I handle all the different types of log in forms with a single wicket
LoginPanel.java file but different variations - functionally they are
all the same but the wording on the screen is different. 
 
The wording that the validators use should reflect the fields in each of
the different variations.
 
For example on a Username/Password variation the username's Required
validator message should be:
 
"Please enter your username."
 
And not
 
"Please enter your email address."
 
If the properties files could support string definitions based on
variation as well as locale then this would be quite easy to do.
 
At the moment I can work around this using string definitions like:
 
Please enter your ${label}
 
and call setLabel on each form component passing in variation dependent
names but the ideal solution would be to specify these labels in a
variation specific way in the properties file.
 
 
________________________________

From: Chris Colman [mailto:chrisc@stepaheadsoftware.com] 
Sent: Monday, 13 February 2012 8:09 AM
To: users@wicket.apache.org
Subject: StringResources in forms based on 'variation'
 
I configure StringResources for forms using the FormClass.properties
file and this works well.
 
Different strings can be provided for lang, locale etc.,
 
Is it possible to provide a different string based on the markup
'variation'
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software


pagebloom - your business & your website growing together
 
Sydney:           (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120     
Email: chrisc@stepahead.com.au <ma...@stepahead.com.au> 
Website:
http://www.pagebloom.com <blocked::http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/>