Results 1 to 4 of 4

Thread: SpinnerField with empty text causes ParseException

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member feelinforyou's Avatar
    Join Date
    Dec 2012
    Posts
    100
    Vote Rating
    4
      0  

    Default SpinnerField with empty text causes ParseException

    Required Information

    Version(s) of Ext GWT
    Ext GWT 3.0.1

    Browser versions and OS
    (and desktop environment, if applicable)
    • every browser


    Virtual Machine
    No

    Description
    Clicking a SpinnerButton of a SpinnerField with emtpy Text causes a ParseException

    Run mode
    development mode

    Steps to reproduce the problem
    1. </i>
    2. Start running in development mode in Eclipse
    3. Open app in browser
    4. Click the Spinnerbutton


    Expected result
    No ParseException

    Actual result
    ParseException

    Test case
    Code:
    final SpinnerField<Integer> spResult = new SpinnerField<Integer>(new IntegerPropertyEditor());
    spResult.setEmptyText("emptyText");
    spResult.setAllowBlank(false);
    spResult.setMinValue(0);
    spResult.setMaxValue(6);
    Helpful Information

    Debugging already done
    • none


    Possible fix
    No empty Text

  2. #2
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    I'm having an hard time reproducing this issue. Here is the entrypoint I've been using:
    Code:
    public class Test implements EntryPoint {
    
      public void onModuleLoad() {
        SpinnerField<Integer> field = new SpinnerField<Integer>(new IntegerPropertyEditor());
        
        field.setEmptyText("emptyText");
        field.setAllowBlank(false);
        field.setMinValue(0);
        field.setMaxValue(6);
        
        RootPanel.get().add(field);
      }
    }
    I then launched the page (tested in ff and chrome), click the spinner button (tested up btn, down btn, and the input itself), and then click out. An error is displayed in two cases - the input itself (since allowBlank is false, and there is no value), and down (this might be a bug, but it isn't a ParseException, it is still the "This field is required message"). No error is displayed at all when clicking up.

    Can you confirm that it isn't a parse exception, but just the allow blank message? And that you expect that clicking down will automatically draw zero?

  3. #3
    Sencha Premium Member feelinforyou's Avatar
    Join Date
    Dec 2012
    Posts
    100
    Vote Rating
    4
      0  

    Default

    I can confirm, that it isn't a parse exception. I can't reproduce the bug with the code of you. There must be an other problem in my application.

    To your second question. I think that this is a question of designing the SpinnerField. I think it will be a good behaviour if the value is null and then if i click the down btn the value will be 0.

    In my application i was switching from the SpinnerField to a ComboBox. And thats because of the behaviour of the SpinnerField. In a ComboBox i need two clicks to select the value 6 for example. In a SpinnerField i need six clicks.

    Lock at the SpinnerField in GXT 2.2.6. You can click and hold the mouse button an the value is changing.
    http://www.sencha.com/examples-2/#forms

    In GXT 3.0.1 you have to click all the time. It's maybe a BUG?!
    http://www.sencha.com/examples/#Exam...e:formsexample

  4. #4
    Sencha User
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    Thanks - as in your other threads, please open a new bug for a new issue - holding the mouse down is not really related the the thread at hand. This issue is filed as EXTGWT-2799.

    We will consider the issue of selecting the default value (zero) when no text is entered and a minimum is set, but I'm not sure we'll commit to a particular resolution on that now.

    As far as more clicks to do the same thing in ComboBox vs SpinnerField, isn't that sort of the point? If the value was 10, you'd have ten clicks to select the value (assuming integers) in a spinner field, but again two clicks in a ComboBox. Even in the case of http://www.sencha.com/examples-2/#forms, I'd challenge you to select 00.6 or 06.0 in two clicks consistently even with holding the mouse down - these are different types of fields and are meant to be interacted with differently. ComboBox is good at selecting from a list, whereas SpinnerField is good at making small modifications to existing values.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •