If a TextField has both a translator and validators defined, is the
input passed from the validators the output of the translators?
I have been trying to get something like this working in 4.1.2 (todays
snapshot) that worked fine in 4.0.
<input jwcid="@TextField" value="ognl:percent"
validators="validators:required,min=1,max=100"
translator="translator:percentTranslator"
displayname="Percent Input"/>
My percentTranslator is registering the dojo events necessary to call:
translatePercentage:function(value) {
dojo.log.warn("enter translatePercentage");
if(!value){return 0;}
var result = parseFloat(value.replace(/%/,''));
dojo.log.warn("result=" + result);
return result;
}
which simply strips any '%' signs out of the input value and returns a
Float (which is probably unnecessary).
When I submit my test form, I do see the log messages in Firebug as
expected, and it definitely is returning the value without a % however I
get a dojo validation popup that states the value is non-number, and
does not meet the min/max criteria.
Is there any way to find out what value is being passed to min/max?
Thanks in advance for any help.
Tony Nelson
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]