[CLOSED] Object undefined

  1. #1

    [CLOSED] Object undefined

    Hi,
    i have this
    <ext:Hidden ID="idedizione" runat="server" Text="3"></ext:Hidden>
    <ext:TreePanel 
                ID="TreePanel1" 
                runat="server" 
                Title="Tree" 
                Height="500"
                Width="200"
                Border="false">
                <Store>
                    <ext:TreeStore runat="server">
                        <Proxy>
                            <Reader>
                                        <ext:JsonReader RootProperty="oggetti"></ext:JsonReader>
                                    </Reader>
                                    <ExtraParams>
                                        <ext:StoreParameter Value="#{idedizione}.getValue()" Name="idedizione" Mode="Raw" />
                                    </ExtraParams>
                        </Proxy>
                    </ext:TreeStore>
                </Store>
                <Root>
                    <ext:Node NodeID="0" Text="Root" />
                </Root>
            </ext:TreePanel>
    But #{idedizione}.getValue() return "Cannot read property 'getValue' of undefined".

    I've tried to set parameter in Page_Load but no parameter was added to url...
    Last edited by Daniil; Nov 11, 2015 at 8:57 AM. Reason: [CLOSED]
  2. #2
    Hi @maurox,

    For some reason an <ext:AjaxProxy> definition is missed in your code snippet.

    I could not reproduce the error.

    Maybe, the Hidden control is not created yet by the time when a TreeStore initiates the first load request. Though, it is only a guess. To say something certain, we should be able to reproduce it locally. Could you, please, provide a full test case that we could copy, paste and run without any changes from our side and reproduce the issue?
  3. #3
    i'm sorry for mistake.
    My treestore is:
    <ext:TreeStore ID="TreeStore1" runat="server" AutoLoad="true">
                            <Proxy>
                                <ext:AjaxProxy Url="/handler/TreeHandler.ashx">
                                    <Reader>
                                        <ext:JsonReader RootProperty="oggetti"></ext:JsonReader>
                                    </Reader>
                                </ext:AjaxProxy>
                                <ExtraParams>
                                        <ext:StoreParameter Value="#{idedizione}.getValue()" Name="idedizione" Mode="Raw" />
                                </ExtraParams>
                            </Proxy>
                            <Model>
                                <ext:Model ID="Model1" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="IDEdizione"></ext:ModelField>
                                        <ext:ModelField Name="IDOpera"></ext:ModelField>
                                        <ext:ModelField Name="IDOggetto"></ext:ModelField>
                                        <ext:ModelField Name="IDFaseCorrente"></ext:ModelField>
                                        <ext:ModelField Name="NArchivioOpera"></ext:ModelField>
                                        <ext:ModelField Name="TitoloOpera"></ext:ModelField>
                                        <ext:ModelField Name="IconaSupporto"></ext:ModelField>
                                        <ext:ModelField Name="NArchivioOggetto"></ext:ModelField>
                                        <ext:ModelField Name="TitoloAlbero"></ext:ModelField>
                                        <ext:ModelField Name="FaseCorrente"></ext:ModelField>
                                        <ext:ModelField Name="OrdineAlbero"></ext:ModelField>
                                        <ext:ModelField Name="IDFlussoProduzione"></ext:ModelField>
                                        <ext:ModelField Name="IDReferente"></ext:ModelField>
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:TreeStore>
  4. #4
    This code snippet throws an exception as well.

    Also it is not a full test case anyways.
  5. #5
    For me is a little bit complicated to provide you a full test case.

    But i've found my error: Root node has
    Expanded="true"
    and this on page load automatically load without store parameters (it seems).
    Set
    Expanded="false"
    on root node fixed my problem.

    Thanks

Similar Threads

  1. Replies: 4
    Last Post: Jun 12, 2014, 9:09 PM
  2. [CLOSED] Ext.getCmp return undefined is not an object
    By farisqadadeh in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Aug 27, 2012, 11:50 PM
  3. [CLOSED] Object undefined at store parameter
    By mcfromero in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 14, 2012, 6:33 PM
  4. 'rendered': object is null or undefined
    By Mohammad in forum 1.x Help
    Replies: 0
    Last Post: Jan 28, 2012, 10:31 AM
  5. Undefined is null or not an object???
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Mar 09, 2009, 11:11 AM

Posting Permissions