title: GWT numberformat weird behaviour
body: <p>I have a GWT project for which the locale is set to fr. I have a custom text field that uses a  number format to validate and format the numerical inputs.</p>
  
  <p>The formatting works fine but not the input validation. Here is a snapshot of the method that validates that the new value is a valid percentage (this is called onValueChanged):</p>
  
  <pre><code>    private void validateNumber(String newVal){
      logger.debug("value changed, newVal="+newVal+", current="+current);
      // Attempt to parse value
      double val=0;
      try{
          val=Double.parseDouble(newVal);
      }catch(NumberFormatException e){
          logger.warn("parsing failed",e);
          try{
              val=getFormatter().parse(newVal);
          }catch(NumberFormatException ex){
              logger.warn("parsing with nb format failed",ex);
              // on failure: restore previous value
              setValue(current,false);
  
  
              return;
          }
      }
        //some check on min and max value here
  }
  </code></pre>
  
  <p>For example if the starting value is set by the program to "0.2" it will show up as 20,00 % hence using the correct decimal separator. 
  Now:</p>
  
  <ul>
  <li>if I input 0,1 I get a numberformat exception.</li>
  <li>if I input 0.1 it show as 10,00 %</li>
  <li>if I 10% (without the space before the '%'), I get a numberformat exception</li>
  </ul>
  
  <p>Do you know how I can modify the method to have 0,1 and 10% identified as valid inputs?</p>