[CLOSED] InputTextMask Change Mask Dynamically

Page 1 of 3 123 LastLast
  1. #1

    [CLOSED] InputTextMask Change Mask Dynamically

    Hi,

    Related with this thread: http://forums.ext.net/showthread.php?13752

    It seems that I've to do some changes to use it in v2.1 now.
    Because, changeMask method throws an exception inside
    element.purgeAllListeners();
    Exception
    Runtime Error in Microsoft JScript: Can not get value of property 'length': the object is null or undefined

    Code that throws exception
    purgeElement : function(element, eventName) {
                var dom = Ext.getDom(element),
                    i = 0, len;
    
                if (eventName) {
                    EventManager.removeListener(element, eventName);
                }
                else {
                    EventManager.removeAll(element);
                }
    
                if (dom && dom.childNodes) {
                    for (len = element.childNodes.length; i < len; i++) { //Here appears the error
                        EventManager.purgeElement(element.childNodes[i], eventName);
                    }
                }
            },
    Last edited by Daniil; Sep 25, 2012 at 5:03 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Ext.Net 2.1 has InputMask plugin. Please use it instead obsolete Ext.Net.UX.InputTextMask
    You can find sample in Examples Explorer
    branches\2.1\Ext.Net.Examples\Examples\Form\TextFi eld\InputMask\Default.aspx
  3. #3
  4. #4
    Hi,

    Should not you use the "dom" instead "element" within the following "if" statement?

    if (dom && dom.childNodes) {
        for (len = element.childNodes.length; i < len; i++) { //Here appears the error
            EventManager.purgeElement(element.childNodes[i], eventName);
        }
    }
  5. #5
    This function is internally called inside purgeAllListeners method of extjs.

    It could be a bug...
  6. #6
    Apologize, I thought it's your code.

    Yes, agree, it is a bug. I have reported to Sencha.
    http://www.sencha.com/forum/showthread.php?232530

    Please use the following fix for now.

    Fix
    <script type="text/javascript">
        Ext.EventManager.purgeElement = function(element, eventName) {
            var dom = Ext.getDom(element),
                i = 0, len;
    
            if (eventName) {
                Ext.EventManager.removeListener(element, eventName);
            }
            else {
                Ext.EventManager.removeAll(element);
            }
    
            if (dom && dom.childNodes) {
                for (len = dom.childNodes.length; i < len; i++) {
                    Ext.EventManager.purgeElement(dom.childNodes[i], eventName);
                }
            }
        }
    </script>
  7. #7
    Do you know when is planned an integred next ExtJS version with this bug an others?

    And taking advantage, is there any roadmap of Ext.NET v2.1

    Thanks!
  8. #8
    Quote Originally Posted by softmachine2011 View Post
    Do you know when is planned an integred next ExtJS version with this bug an others?
    Well, very soon from the moment when they will be fixed on ExtJS side.

    If it takes too much time, we will incorporate the fix (if exists) ourselves.

    Quote Originally Posted by softmachine2011 View Post
    And taking advantage, is there any roadmap of Ext.NET v2.1
    I will redirect the question to our manager.
  9. #9
    Quote Originally Posted by softmachine2011 View Post
    And taking advantage, is there any roadmap of Ext.NET v2.1
    I added the following note on the Download (http://ext.net/download/) page.

    Next Release?

    The next public release of Ext.NET Pro (version 2.1) is scheduled for mid-August 2012. The focus of the release will be on enhanced ASP.NET MVC support. A Preview of Ext.NET 2.1 is available to all Premium Support subscription members.
    Hope this helps.
    Geoffrey McGill
    Founder
  10. #10
    Ok, thanks for all
Page 1 of 3 123 LastLast

Similar Threads

  1. [CLOSED] Change text Mask
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 06, 2012, 12:21 PM
  2. [CLOSED] Change a UX InputTextMask dinamically
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Nov 07, 2011, 4:31 PM
  3. [CLOSED] vtypes dynamically add a mask
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 8
    Last Post: Mar 31, 2011, 2:31 PM
  4. [CLOSED] Changing inputtextmask Mask dynamically
    By Hari_CSC in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 01, 2010, 2:57 AM
  5. Changing event mask Msg dynamically
    By okutbay in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2010, 8:23 AM

Tags for this Thread

Posting Permissions