[CLOSED] After update from SVN: "Cannot read property 'success' of undefined"

  1. #1

    [CLOSED] After update from SVN: "Cannot read property 'success' of undefined"

    So after updating from SVN I get the following error when I search in a ComboBox:

    Cannot read property 'success' of undefined
    See this picture:

    Click image for larger version. 

Name:	delme.png 
Views:	56 
Size:	9.3 KB 
ID:	2655

    There is no problem with the code as it worked before SVN update.

    The ComboBox looks like this:

    <ext:ComboBox runat="server" AutoWidth="true" EmptyText="Search" Icon="User" FieldLabel="Search"
        ID="ComboBox_Customer_Search"
        DisplayField="CustomerName"
        ValueField="CustomerId"
        TypeAhead = "false"
        HideTrigger = "false"
        EnableKeyEvents = "true"
        MinChars = "1"
        LoadingText="Searching..."
        ForceSelection="false"
        ItemSelector="tr.list-item">
        <Template ID="Template1" runat="server">
            <Html>
                <tpl for=".">
                    <tpl if="[xindex] == 1">
                        <table class="cbStates-list">
                            <tr>
                                <th>Searchstring</th>
                                <th>CustomerName</th>
                                                            <th>ID</th>
                            </tr>
                    </tpl>
                    <tr class="list-item">
                        <td style="padding:3px 0px;">{SearchText}</td>
                        <td>{CustomerName}</td>
                        <td>{CustomerPnr}</td>
                    </tr>
                    <tpl if="[xcount-xindex]==0">
                        </table>
                    </tpl>
                </tpl>
            </Html>
        </Template>
        <Store>
            <ext:Store ID="Store_Customer_Search" runat="server" AutoLoad="false" OnRefreshData="Store_Customer_Search_Refresh">
                <Proxy>
                    <ext:PageProxy />
                </Proxy>
                <Reader>
                    <ext:ArrayReader>
                        <Fields>
                            <ext:RecordField Name="CustomerId" />
                            <ext:RecordField Name="SearchText" />
                            <ext:RecordField Name="CustomerName" />
                            <ext:RecordField Name="CustomerPnr" />
                        </Fields>
                    </ext:ArrayReader>
                </Reader>
            </ext:Store>
        </Store>
        <Listeners>
            <Select Handler="Ext.net.DirectMethods.CustomerSelected()" />
        </Listeners>
    </ext:ComboBox>
    I do not Select anything, so the CustomerSelected() is not called.
    Last edited by Daniil; May 01, 2011 at 10:16 PM. Reason: [CLOSED]
  2. #2
    Hi,

    I cannot reproduce it. Here is my test case

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    
        <script runat="server">
            private void Store_Customer_Search_Refresh(object sender, StoreRefreshDataEventArgs e)
            {
                var list = new object[]
                    {
                        new object[]{1, "text", "name", "pnr"}              
                                   
                    };
                Store_Customer_Search.DataSource = list;
                Store_Customer_Search.DataBind();
            }
        </script>
    
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server"  />
        <ext:ComboBox runat="server" AutoWidth="true" EmptyText="Search" Icon="User" FieldLabel="Search"
            ID="ComboBox_Customer_Search" DisplayField="CustomerName" ValueField="CustomerId"
            TypeAhead="false" HideTrigger="false" EnableKeyEvents="true" MinChars="1" LoadingText="Searching..."
            ForceSelection="false" ItemSelector="tr.list-item">
            <Template ID="Template1" runat="server">
                <Html>
                <tpl for=".">
                    <tpl if="[xindex] == 1">
                        <table class="cbStates-list">
                            <tr>
                                <th>Searchstring</th>
                                <th>CustomerName</th>
                                                            <th>ID</th>
                            </tr>
                    </tpl>
                    <tr class="list-item">
                        <td style="padding:3px 0px;">{SearchText}</td>
                        <td>{CustomerName}</td>
                        <td>{CustomerPnr}</td>
                    </tr>
                    <tpl if="[xcount-xindex]==0">
                        </table>
                    </tpl>
                </tpl>
                </Html>
            </Template>
            <Store>
                <ext:Store ID="Store_Customer_Search" runat="server" AutoLoad="false" OnRefreshData="Store_Customer_Search_Refresh">
                    <Proxy>
                        <ext:PageProxy />
                    </Proxy>
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="CustomerId" />
                                <ext:RecordField Name="SearchText" />
                                <ext:RecordField Name="CustomerName" />
                                <ext:RecordField Name="CustomerPnr" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <Listeners>
                <Select Handler="Ext.net.DirectMethods.CustomerSelected()" />
            </Listeners>
        </ext:ComboBox>
        </form>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Apr 29, 2011 at 4:33 PM.
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Ok, weird.

    What does the error mean? Success is a property of... what? Something in ext?
  4. #4
    Hi,

    It is difficult to say. I guess that ajax request is initiated by store (PageProxy) but response is incorrect.
    Can you provide full text of response?
    Vladimir Shcheglov
    Sr. Developer
  5. #5
    hey,
    it seems that the error I get is this error that I posted before (post #4)

    http://forums.ext.net/showthread.php...ill-solve-this

    It was hard to see it until I get the break in VS.
    I just updated from SVN, and tried again. Problem solved. Thanks =)

Similar Threads

  1. Replies: 1
    Last Post: Jun 26, 2012, 12:29 PM
  2. Replies: 2
    Last Post: Apr 10, 2012, 1:08 PM
  3. [CLOSED] Cannot read property "childNodes" of undefined
    By jlosi in forum 1.x Premium Help
    Replies: 4
    Last Post: Jun 02, 2011, 7:07 PM
  4. [CLOSED] GridPanel / Renderer : Property "undefined"?
    By wagger in forum 1.x Premium Help
    Replies: 4
    Last Post: May 03, 2011, 9:50 PM
  5. Replies: 12
    Last Post: Apr 13, 2011, 4:28 PM

Tags for this Thread

Posting Permissions