Change Locale on Validators
---------------------------
Key: PIVOT-155
URL: https://issues.apache.org/jira/browse/PIVOT-155
Project: Pivot
Issue Type: Improvement
Affects Versions: 1.2, 1.3
Reporter: Sandro Martini
Assignee: Greg Brown
Priority: Minor
Fix For: 1.3
Unable to change the Locale used in Validators.
For example, in TextInputValidatorTest, in the textinputFloatRange I've seen
that giving inputs in the current Locale all works good, but I haven't find a
way to change the Locale, or to set a different format to validators ... how
can i do this ?
Maybe the simplest thing could be to set a different Locale and let validators
using it, in this case all the application would use only a Locale, but i think
this is a common case (only a few times i had to manage more locales in the
same application, showing more at the same time to the same user ... ). The
best could be to have new settings alive without having to restart the
application.
I have to run my applications in a multi-locale environment (but any user with
its default or chosen locale) ... thanks.
As a sample, a portion of code that uses this could go for example in
TextInputValidatorTest.
Hints for the implementation:
(1) make DecimalValidator not abstract - the reason it is currently abstract is
a historical hold-over
(2) make the DecimalValidator constructors public
(3) modify the various *Validator classes to have extra constructors that take
a Locale parameter.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.