[CLOSED] Dynamically adding view to panel MVC

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Dynamically adding view to panel MVC

    Good day,

    I am having some issues dynamically adding a view to a panel since i upgrade to version 1.1. The code below worked using the 1.0 assemblies. Not sure what i need to change to get this working again. The call panel.load({ scripts: true, params: { containerId: 'panelProperties' }, url: url }); is no longer calling the action on the controller. I was able to dynamically load different panels using version 1.0 calling different controller urls.


        <ext:Viewport ID="Viewport1" runat="server" Layout="Border">
            <Items>
                <ext:TabPanel  runat="server" Width="300" MinWidth="300" MaxWidth="300"  IDMode="Explicit" Region ="West" >
                        <Items>
                            <ext:Panel    ID="panelWorkflows" runat="server" Title="Workflows" Layout="Fit">
                                <Items>
                                </Items>
                             </ext:Panel>
    
                            
                        </Items>
                        <Listeners>
                            
                        </Listeners>
                    </ext:TabPanel>
    
                <ext:Panel Frame="false" runat="server" Layout="Fit" AutoScroll="true"  LabelAlign="Left" Title="Templates" MonitorResize="true"  Region="Center" >
    
                    <Content>
                            <div id="graphSideBar" class="sideBar">
                            </div>
    
                            <div id="graphContainer" class="graph">
                            </div>
                    </Content>
    
                    <Items>
                    </Items>
    
                    </BottomBar>
                    <Listeners>
                        
                    </Listeners>
                </ext:Panel>
    
                <ext:Panel ID="panelProperties" runat="server"  Width= "350" Closable="false" HideCollapseTool="true" Collapsible= "true" Collapsed="true" Title="Properties"  Hidden="true" Layout="Form" AutoScroll="true"  MonitorResize="false"  Region="East" >
                      <AutoLoad    
                            AutoDataBind="true"
                            Url='/sample'                                            
                            ShowMask="true" 
                            MaskMsg="Loading Panel..."                          
                            MonitorComplete="false" NoCache="true"
                            >                             
                      </AutoLoad>                 
                </ext:Panel>
            </Items>
            <Listeners>
                 <Render Handler="" />
                 
           </Listeners>
        </ext:Viewport>
    The view to load on the panel

    <ext:Panel 
            ID="windowProperties" 
            runat="server" 
            Width="350"
             Height="510"
            Cls="items-view" 
            Layout="Fit"       
            Border="false">
                
               
                <Items>
    
                    
                </Items>
                
                <Listeners>
                   <Render Handler="" />
               </Listeners>
    </ext:Panel>




    This javascmethod is triggered on a button click

    ShowProperties: function () {
    
            WorkflowGraphHelper.initializingStatePropertiesWindow = true;
    
            var panel = panelProperties;
            panel.removeAll();
            var url = '/Flow/ShowProperties';
            panel.load({ scripts: true, params: { containerId: 'panelProperties' }, url: url });
            panel.setTitle('State Properties');
            panel.show();
            panel.expand(true);
            Viewport1.doLayout()
    
        },

    The controller action that should be triggered.

     public ActionResult ShowProperties(String containerId)
            {
                Ext.Net.MVC.PartialViewResult partialViewResult = new Ext.Net.MVC.PartialViewResult(containerId);
                partialViewResult.RenderMode = RenderMode.AddTo;
                partialViewResult.ViewName = "StateProperties";
                return partialViewResult;
    
            }
    Last edited by Daniil; Oct 14, 2011 at 6:21 PM. Reason: [CLOSED]

Similar Threads

  1. Replies: 4
    Last Post: Mar 07, 2012, 3:52 PM
  2. [CLOSED] Razor syntax for adding a partial view to a Panel
    By machinableed in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 23, 2012, 9:55 AM
  3. Replies: 0
    Last Post: Dec 29, 2010, 10:36 PM
  4. Replies: 0
    Last Post: Nov 17, 2010, 9:32 PM
  5. [CLOSED] Adding tree view to panel?
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 09, 2008, 11:27 AM

Tags for this Thread

Posting Permissions