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.

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default [FNR] TextField Validation

    [FNR] TextField Validation


    I have a TextField with an EmptyValidator. I want to validate it after pressing the Enter-Key, so here my code:
    Code:
      public void onModuleLoad()
        {
            VerticalLayoutContainer mainPanel = new VerticalLayoutContainer();
            mainPanel.setPixelSize(500, 300);
            mainPanel.setBorders(true);
    
            final TextField validateTextField = new TextField();
            validateTextField.addValidator(new EmptyValidator<String>());
            final TextField dummyTextField = new TextField();
    
            TextButton button = new TextButton("validate");
            button.addSelectHandler(new SelectHandler()
            {
    
                @Override
                public void onSelect(SelectEvent event)
                {
                    validateTextField.validate();
                }
            });
    
            new KeyNav(validateTextField)
            {
                @Override
                public void onEnter(NativeEvent evt)
                {
                    validateTextField.validate();
                }
            };
    
            mainPanel.add(validateTextField, new VerticalLayoutData(1, -1));
            mainPanel.add(dummyTextField, new VerticalLayoutData(1, -1));
            mainPanel.add(button, new VerticalLayoutData(1, -1));
    
            mainPanel.forceLayout();
            RootLayoutPanel.get().add(mainPanel);
    }
    I enter my first TextField, type something, and press return => validation fails ("field is empty").
    It seems like the typed text was ignored and the previous value (initially empty) is beeing validated. I know I could use the setAutoValidate() method - but I only want to validate my TextField after pressing return.

  2. #2
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
    raivis is on a distinguished road

      0  

    Default


    I took your code and placed it in empty project. It seams like validation fails on ff and ie, but passes on chrome and safari.
    I noticed one more glitch - it validates when i hit Enter for the first time, but nothing happens when i hit it second time, cursor stays blinking in a text field and no validation icon appears. On enter event itself is being executed, but nothing happens.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    87
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Can you verify that this bug is still present in the beta1 release that went out yesterday?

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    45
    Vote Rating
    0
    raivis is on a distinguished road

      0  

    Default


    I confirm I tried it with 3.0.0 Beta1 version that can be downloaded from here:

    http://www.sencha.com/products/extgwt/download/

    To be sure I tried it one more time at home on another pc with fresh copy of eclipse, beta1 and completely new project.



  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    With 3.0, a field's value is not updated until the field is blurred. So when the enter key is pressed the value has not been updated so validation runs on the old value. When you click the validate button, the field is blurred and this works correctly.

    We have added a new finishEditing method to field that can be used when the enter key is pressed. This code works with the latest SVN code:

    Code:
        new KeyNav(validateTextField) {
          @Override
          public void onEnter(NativeEvent evt) {
            evt.preventDefault();
            validateTextField.finishEditing();
          }
        };
    The evt.preventDefault() is needed for some browsers as the enter key causes the application to reload.

    The new code will go out next week in our next release.

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    54
    Vote Rating
    0
    DarekKay is on a distinguished road

      0  

    Default


    Quote Originally Posted by darrellmeyer View Post
    With 3.0, a field's value is not updated until the field is blurred. So when the enter key is pressed the value has not been updated so validation runs on the old value. When you click the validate button, the field is blurred and this works correctly.
    This explains the problem - but this approach is not really well designed. For example: the setAutoValidate(true) method doesn't work correctly. Here a simplier code:
    Code:
    public void onModuleLoad()
        {
            VerticalLayoutContainer mainPanel = new VerticalLayoutContainer();
            mainPanel.setPixelSize(500, 300);
            mainPanel.setBorders(true);
    
            final TextField validateTextField = new TextField();
            validateTextField.setAutoValidate(true);
            validateTextField.addValidator(new EmptyValidator<String>());
    
            mainPanel.add(validateTextField, new VerticalLayoutData(1, -1));
            RootLayoutPanel.get().add(mainPanel);
    }
    A TextField with an EmptyValidator and AutoValidation. The problem is: since the value doesn't get updated till the field gets blurred, the AutoValidation doesn't work at all (the previous empty string get's validated on each key press and of course results in an error marker).

  7. #7
    Sencha Premium Member
    Join Date
    Mar 2013
    Location
    Japan
    Posts
    8
    Vote Rating
    2
    kdewa is on a distinguished road

      0  

    Default


    Hi.
    I have a same problem on gxt3.0.4.
    Does anyone have a workaround?

  8. #8
    Sencha Premium Member
    Join Date
    Mar 2013
    Location
    Japan
    Posts
    8
    Vote Rating
    2
    kdewa is on a distinguished road

      0  

    Default


    I've found out that my problem is caused by following issue:
    http://www.sencha.com/forum/showthread.php?256859

    Thank you.