[CLOSED] Ext.getCmp return undefined is not an object

  1. #1

    [CLOSED] Ext.getCmp return undefined is not an object

    we face a strange problem with EXT where all Ext.getCmp returns undefined is not an object , wht make me shocked the Ext.get is working fine , can you please advise what make this happen and how to fix , quick response appreciated.
    Last edited by Daniil; Sep 03, 2012 at 6:05 PM. Reason: [CLOSED]
  2. #2

    Hard to say. Could you provide any code snippet and any more details?
  3. #3

    the code is huge but here is important note

    Hi danel,

    the code is huge and im trying to simpplify an example of wht i have but i want to note we used HTML5 tags header section and footer in our master page is this affectd the getcmp function.
  4. #4
    Please clarify where are getCmp() calls?
  5. #5

    all getcmp calls inside <section> HTML5 tag

    all getcmp calls we have inside <section> HTML5 tag and the Ext.get also , but the Ext.get is working fine, also we womder do we have to upgrade to EXT.NET V2.
  6. #6
    I guess the ExtJS components are not registered yet in ComponentMgr, i.e. the script to create these components are not executed yet.

    You should call Ext.getCmp() after execution of the Ext.onReady() script.

    After this:
    <ext:ResourcePlaceHolder runat="server" Mode="Script" />
    <script type="text/javascript">
        Ext.onReady(function () {
            // Ext.getCmp(...) calls
    Or, maybe, within a ResourceManager DocumentReady listener.
    Last edited by Daniil; Aug 27, 2012 at 5:10 AM.
  7. #7

    still not working

    Hi daniel,

    thanks for reply but it still not working for some Ext controls we have , i wana note that ext.getcmp is working on ext.ready and on normal javascripts tags for the most of ext controls we have by now but still not working on either onready and on normal scripts tags for alot of controls we have but working with Ext.get.

    watining ur prompt reply
  8. #8
    I am unable to reproduce. Unfortunately, I have no idea what can be wrong on your end.

    I would double ensure you pass correct ids to the getCmp() method.

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>
        <form runat="server">
            <ext:ResourceManager runat="server" />
                <script type="text/javascript">
                    var showText = function () {
            <ext:TextField ID="TextField1" runat="server" />
            <ext:Button ID="Button1" runat="server" Text="Show Text">
                    <Click Fn="showText" />
  9. #9

    i put the code of the rendered page.

  10. #10
    Sorry, we have no ability to investigate 3000 lines of output without possibility to run a sample
    Please provide simple test sample which can be run on our side without any changes

Similar Threads

  1. Replies: 4
    Last Post: Oct 01, 2012, 10:58 AM
  2. [CLOSED] Object undefined at store parameter
    By mcfromero in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 14, 2012, 7:33 PM
  3. 'rendered': object is null or undefined
    By Mohammad in forum 1.x Help
    Replies: 0
    Last Post: Jan 28, 2012, 11:31 AM
  4. [CLOSED] [1.0] WebMethod return coolite object
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 20, 2010, 7:33 AM
  5. Undefined is null or not an object???
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2009, 12:11 PM

Posting Permissions