[CLOSED] Mask position when loading Panel's content

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Mask position when loading Panel's content

    Last edited by Daniil; Oct 17, 2012 at 5:00 AM. Reason: [CLOSED]
  2. #2
    Hi Raphael,

    I understand your problem, but where should a mask appear if no height?

    I tried to put the Panel inside a Viewport with FitLayout. A mask appears to be positioned properly - in the center.

    Maybe, in your case with more complex layout, you need to defer loading for some milliseconds. Unfortunately, I can't say more without a sample to reproduce.
  3. #3
    If the _pnl MinHeight is not set, the ViewPort is rendered properly.

    1 - View
    <ext:Panel ID="_pnl" PreventHeader="true" MinHeight="100" Border="false" runat="server">
        <Loader ID="Loader1" Url="/Example/FuncAbc/" Mode="Component" AutoLoad="true" runat="server">
            <LoadMask ShowMask="true" />
        </Loader>
    </ext:Panel>
    2 - Action
    
    public ContentResult FuncAbc()
    {
        Thread.Sleep(TimeSpan.FromSeconds(10));
        ContentResult r = new ContentResult();
    
    
        Viewport vwp = new Viewport
        {
            ID = "_vwp",
            Border = false,
            Layout = "BorderLayout",
        };
    
    
        Panel pnlCenter = new Panel
        {
            Title = "Center Region",
            Icon = Icon.Application,
            Html = "Content",
            Border = false,
            Collapsible = false,
            Split = true,
            Region = Region.Center
        };
        vwp.Items.Add(pnlCenter);
    
        Panel pnlSouth = new Panel
        {
            Title = "South Region",
            Icon = Icon.Application,
            Html = "Content",
            Border = false,
            Collapsible = true,
            Split = true,
            Region = Region.South,
            TitleCollapse = true,
            Floatable = false,
            Height = 300,
        };
    
        vwp.Items.Add(pnlSouth);
    
        Panel pnlEastRoot = new Panel
        {
            Collapsible = true,
            Border = false,
            Floatable = false,
            Split = true,
            Frame = true,
            TitleCollapse = true,
            Layout = "accordion",
            BodyStyle = "margin-top:-5px;",
            Region = Region.East,
            Width = 300,
            MinWidth = 100,
            Weight = 10
        };
        vwp.Items.Add(pnlEastRoot);
    
        Panel pnlEast1 = new Panel
        {
            Title = "East 1",
            Icon = Icon.Application,
            Html = "Content",
            Border = false,
            Collapsible = true,
            Flex = 1,
            TitleCollapse = true
    
        };
        pnlEastRoot.Items.Add(pnlEast1);
    
        Panel pnlEast2 = new Panel
        {
            Title = "East 2",
            Icon = Icon.Application,
            Html = "Content",
            Collapsible = true,
            Border = false,
            Flex = 1,
            TitleCollapse = true
        };
        pnlEastRoot.Items.Add(pnlEast2);
    
        r.Content = ComponentLoader.ToConfig(vwp);
    
        return r;
    }
  4. #4
    A Viewport must be a top level container on the page within <body> or <form runat="server">. It is wrong to load it into a Panel and can cause unpredictable consequences even if it works at the first glance.
    Last edited by Daniil; Oct 16, 2012 at 5:47 PM.
  5. #5
    I understand your point, but unfortunately - in my scenario - the creation of the ViewPort occurs at server-side. is there another approach to load the ViewPort, like a "Loader", and thus it does not require a Panel to perform the load?
  6. #6
    Please clarify where do you need to render a Viewport to?

    Maybe you need to load an iframe with a Viewport to this Panel?
  7. #7
  8. #8
    Daniil, if you agree with this approach, please mark this thread as closed.
  9. #9
    I totally agreed with this approach. Setting up a Viewport with BorderLayout on the page and loading its regions via Loader is a common and good practice.
  10. #10
    There is an update regarding the best way to accomplish this task: http://forums.ext.net/showthread.php...ll=1#post93218
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Autoloading content in a static position
    By craig2005 in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Mar 18, 2011, 1:03 PM
  2. Tab Panel Content Loading
    By xMAC in forum 1.x Help
    Replies: 5
    Last Post: Dec 10, 2010, 7:07 AM
  3. Replies: 2
    Last Post: Mar 09, 2010, 12:55 PM
  4. How to position the loading mask
    By borgx in forum 1.x Help
    Replies: 0
    Last Post: Feb 25, 2010, 3:38 AM
  5. Dynamic loading content page into Panel
    By wildspirit in forum 1.x Help
    Replies: 2
    Last Post: Feb 04, 2009, 5:59 PM

Posting Permissions