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:chr...@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: chr...@stepahead.com.au <mailto://chr...@stepahead.com.au> 
Website:
http://www.pagebloom.com <blocked::http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/> 
 
 

Reply via email to