Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    19
    Vote Rating
    0
    egotec is on a distinguished road

      0  

    Default How to set NumberFormat for NumberField

    How to set NumberFormat for NumberField


    Hello.

    Do you know how to set NumberFormat for NumberFields?

    How could I change the decimal separator? I didn't find anything in the API.

    I'm wondering why GXT don't use the GWT-NumberFormat..
    In this example GXT displays another value then GWT (locale=de)
    Code:
    		numberField = new NumberField();
    
    		double test = 12.6d;
    
    		NumberFormat f = NumberFormat.getDecimalFormat();
    		Window.alert("ui="+f.format(test)); // Displays 12,6
    		numberField.setValue(test); // Displays 12.6
    Thanks.

  2. #2
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    1
    Vote Rating
    0
    rocknick is on a distinguished road

      0  

    Default


    I had the same issue. To get it to correctly display the decimal separator, I found that the format had to be explicitly set on the number field.
    So your example code would now be:
    Code:
      numberField = new NumberField();
      
      double test = 12.6d;
      
      NumberFormat f = NumberFormat.getDecimalFormat();
      Window.alert("ui="+f.format(test)); // Displays 12,6
      
      numberField.setFormat( NumberFormat.getDecimalFormat() );
      numberField.setValue(test); // will display 12,6

    Hope this fixes it for you.

Similar Threads

  1. Replies: 0
    Last Post: 2 Jul 2009, 7:02 AM
  2. How to set the length of a textfield or numberfield
    By skbach in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 4 Aug 2008, 1:23 PM
  3. how to set numberfield max value dynamically
    By mxu in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 18 Jan 2008, 4:12 PM

Thread Participants: 1

Tags for this Thread