[CLOSED] Context Menu in the tree is not seen, it shows the shadow

  1. #1

    [CLOSED] Context Menu in the tree is not seen, it shows the shadow

    Hi all,

    I am using Context Menu in the tree but, i am not able to see any text of the context Menu but the shadow of it.
    I am attaching the screen shot of it and My code is

    <ext:Viewport ID="vpLocationTree" runat="server" Layout="BorderLayout">
            <Items>
                <ext:Menu runat="server" ShowSeparator="true" ID="CompanyMenu">
                    <Items>
                        <ext:MenuItem ID="mnuCreate" runat="server" Text="Create Child Company" Icon="BulletHome">
                            <Listeners>
                                <Click Handler="Ext.EventBroker.RaiseEvent('LoadCompanyDetails',{ url: '/Company/Company/' +  Ext.GLOBAL_STORE.SelectedCompanyId + '/' + 'View', nocache: true, scripts: true, mode: 'iframe'});
                                        Ext.EventBroker.RaiseEvent('SelectedCompanyChanged','New');" />
                            </Listeners>
                        </ext:MenuItem>
                        <ext:MenuItem ID="mnuDelete" runat="server" Text="Delete Company" Icon="Cross">
                            <Listeners>
                                <Click Handler="Company.DeleteCompany();" />
                            </Listeners>
                        </ext:MenuItem>
                    </Items>
                    <Listeners>
                        <BeforeShow Handler="DisableDeleteMenuItem({mnuDelete:#{mnuDelete}});" />
                    </Listeners>
                </ext:Menu>
                <ext:Panel ID="Panel1" runat="server" Region="Center">
                    <Items>
                        <ext:TreePanel Height="600" Layout="Fit" ID="CompanyTreePnl" Lines="true" runat="server"
                            Draggable="false" Frame="false" UseArrows="false" AutoScroll="true" Animate="true"
                            EnableDD="false" CollapseFirst="false" ContainerScroll="true" Border="false"
                            RootVisible="false" AutoDataBind="true" AutoDestroy="true">
                            <Loader>
                                <ext:TreeLoader DataUrl="/Common/GetTree" PreloadChildren="true">
                                    <BaseAttributes>
                                        <ext:Parameter Name="nodeType" Value="node" Mode="Value" />
                                    </BaseAttributes>
                                    <BaseParams>
                                        <ext:Parameter Name="Feature" Value="Company" Mode="Value" />
                                        <ext:Parameter Name="companyId" Value="Ext.GLOBAL_STORE.SelectedCompanyId" Mode="Raw" />
                                    </BaseParams>
                                    <Listeners>
                                        <Load Handler="#{CompanyTreePnl}.getNodeById('0').childNodes[0].select();" />
                                    </Listeners>
                                </ext:TreeLoader>
                            </Loader>
                            <TopBar>
                                <ext:Toolbar ID="tbTree" runat="server">
                                    <Items>
                                        <ext:Button ID="btnExpandAll" runat="server" Text="Expand All">
                                            <Listeners>
                                                <Click Handler="#{CompanyTreePnl}.expandAll();" />
                                            </Listeners>
                                        </ext:Button>
                                        <ext:Button ID="btnCollapseAll" runat="server" Text="Collapse All">
                                            <Listeners>
                                                <Click Handler="#{CompanyTreePnl}.collapseAll();" />
                                            </Listeners>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                            <Listeners>
                                <ContextMenu Handler="if((Ext.GLOBAL_STORE.SelectedModule == 'User') || (Ext.GLOBAL_STORE.SelectedModule == 'Company')){
                                debugger;
                                #{CompanyMenu}.node = node;
                                node.select();
                                Ext.GLOBAL_STORE.SelectedCompanyId=node.id;
                                Ext.GLOBAL_STORE.SelectedTreeNode=node;
                                #{CompanyMenu}.showAt(e.getXY());}" 
                                />
                                <Click Handler="Ext.GLOBAL_STORE.SelectedCompanyId = node.id;
                                                Ext.GLOBAL_STORE.SelectedCompanyName= node.text;
                                                Ext.GLOBAL_STORE.SelectedTreeNode = node;
                                                Ext.EventBroker.RaiseEvent('SelectedCompanyChanged',undefined);" />
                            </Listeners>
                            <Root>
                                <ext:AsyncTreeNode NodeID='0' Draggable="false" Icon="BuildingKey" Expanded="false">
                                </ext:AsyncTreeNode>
                            </Root>
                        </ext:TreePanel>
                    </Items>
                </ext:Panel>
            </Items>
            <Listeners>
                <BeforeRender Handler="Ext.onReady(function ()
                 { Ext.GLOBAL_STORE = parent.Ext.GLOBAL_STORE;
                   Ext.EventBroker = parent.Ext.EventBroker;
                   Ext.GLOBAL_STORE.TreePanel = #{CompanyTreePnl};
                   Ext.EventBroker.SubscribeEvent(document.title,'RefreshCompanyTree',#{CompanyTreePnl},ReloadCompanyTree);
                   });" />
            </Listeners>
        </ext:Viewport>
    Attached Thumbnails Click image for larger version. 

Name:	ContextMenu.jpg 
Views:	38 
Size:	93.3 KB 
ID:	3473  
    Last edited by Daniil; Nov 21, 2011 at 2:10 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please move an <ext:Menu> out from a Viewport's Items.

    You can directly place an <ext:Menu> into <form> or <body>.
  3. #3
    Thank you it worked...

Similar Threads

  1. Replies: 0
    Last Post: Mar 29, 2012, 12:50 PM
  2. Replies: 1
    Last Post: Feb 17, 2012, 12:38 PM
  3. Context menu on tree grid
    By Mr.Techno in forum 1.x Help
    Replies: 20
    Last Post: Nov 17, 2011, 10:18 AM
  4. [CLOSED] Context Menu in the Tree panel
    By Shanth in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 23, 2011, 2:02 PM
  5. Replies: 0
    Last Post: Aug 31, 2009, 4:46 AM

Posting Permissions