Nov 21, 2011, 1:40 PM
[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
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>
Last edited by Daniil; Nov 21, 2011 at 2:10 PM.
Reason: [CLOSED]