[CLOSED] Change Listener has different behavior in version 2.x than in 1.x

  1. #1

    [CLOSED] Change Listener has different behavior in version 2.x than in 1.x

    I have two projects, one with Ext.NET 1.x and one with 2.x.

    I run the following code in both the Ext.NET 1.x and the 2.x project:

           <ext:TextField 
                        ID="txtUsername" 
                        runat="server" 
                        FieldLabel="Username" 
                        EmptyText="Enter your username"
                        AnchorHorizontal="100%">
                    <Listeners>
                        <Change Handler="console.log('changed');" />
                    </Listeners>
          </ext:TextField>
    In 1.x, the change event fires only when you lose focus (on blur) and there has been a text change ? This works as expected.

    In 2.x, the change event fires every single time a key is pressed.

    On a related note, I?ve also noticed that
    <SpecialKey Handler="alert('I am special');? />
    Fires only in 1.x, and it does not fire in 2.x.

    Maybe I?m using it incorrectly, or there?s a change in 2.x that isn?t mentioned in the change log. Please let me know.

    Thanks!
    Last edited by Daniil; Mar 29, 2012 at 2:51 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Yes, it has been changed and not listed in the changelog. We will add a respective item, thanks for the report.

    Please note that it's documented in ExtJS docs:

    Ext.NET v1 / ExtJS v3
    Fires just before the field blurs if the field value has changed.
    http://docs.sencha.com/ext-js/3-4/#!...d-event-change

    Ext.NET v2 / ExtJS v4
    Fires when a user-initiated change is detected in the value of the field.
    http://docs.sencha.com/ext-js/4-0/#!...d-event-change

    Quote Originally Posted by MacGarnicle View Post
    On a related note, I?ve also noticed that
    <SpecialKey Handler="alert('I am special');? />
    Fires only in 1.x, and it does not fire in 2.x.
    Please start a new forum thread.
  3. #3
    Thank you for your response.

    The Ext.JS documentation is extremely helpful.

    As for the special key, it actually does fire - I must have mixed something up yesterday.

    What does behave differently though (as I notice) is the way I interact with objects. I had "btnLogin.fireEvent('click')" in the Handler for version 1.x. This doesn't work in 2.x. Now I find I have to use "Ext.getCmp('btnLogin').fireEvent('click')".

    If you would like, I can start a new thread about that.

    Thanks.
  4. #4
    Yes, please start a new forum thread.

Similar Threads

  1. Combobox - Change of behavior
    By IFLOW in forum 2.x Help
    Replies: 2
    Last Post: Jul 18, 2012, 10:52 AM
  2. Replies: 1
    Last Post: Feb 10, 2011, 8:27 AM
  3. [CLOSED] [1.0] Change in radio button behavior - inputvalue
    By betamax in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 18, 2010, 4:02 PM
  4. [CLOSED] [1.0] MultiSelect Change Listener
    By Ben in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 04, 2009, 8:02 AM
  5. version 0.52 and 0.53 change my theme
    By MrMp3 in forum 1.x Help
    Replies: 6
    Last Post: Jun 24, 2008, 11:19 AM

Posting Permissions