[FIXED] [#936] [3.3] Portlet not rendering after URL change

Hybrid View

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

    [FIXED] [#936] [3.3] Portlet not rendering after URL change

    I add a portlet to a PortalColumn using JavaScript, the portlet contains a loader pointing to a URL.
    If I change the URL and move the the portlet to a different column, an empty portlet is rendered.

    Please see attached code, steps to reproduce.
    1. Click the add button.
    2. Click Change Url BUTTON.
    3. Move the portlet to another column.

    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script>
            var selectedPortlet = null;
            function addPortlet(portal, colLeft) {
                if (selectedPortlet == null) {
                    selectedPortlet = new Ext.app.Portlet({
                        title: "Test",
                        id: Ext.id(),
                        loader: {
                            url: "http://ext.net/",
                            renderer: "frame",
                            loadMask: {
                                showMask: true,
                                msg: "Loading Rules..."
                            }
                        },
                        height: 300
                    });
    
                    colLeft.add(selectedPortlet);
                }
            }
    
            function ChangeUrl() {
                if (selectedPortlet != null) {
                    selectedPortlet.load({
                        url: "http://www.bing.com/",
                        renderer: "frame",
                        loadMask: {
                            showMask: true,
                            msg: "Loading Rules..."
                        }
                    });
                }
            }
        </script>
    </head>
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server" DirectMethodNamespace="Bluebay.DirectMethods">
            <Listeners>
                <AjaxRequestComplete Handler="Ext.net.Mask.hide();" />
                <AjaxRequestException Handler="Ext.net.Mask.hide();" />
            </Listeners>
        </ext:ResourceManager>
    
        <form id="Form1" runat="server">
            <div>
                <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout" MinWidth="960">
                    <Items>
                        <ext:Panel ID="pnlContent" runat="server" Region="Center" BodyStyle="background-color: transparent;" ClientIDMode="Static">
                            <Items>
                                <ext:Button ID="Button1" runat="server" Text="Add">
                                    <Listeners>
                                        <Click Handler="addPortlet(#{ptlPortal}, #{colLeft});" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button2" runat="server" Text="Change URL">
                                    <Listeners>
                                        <Click Handler="ChangeUrl();" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Portal ID="ptlPortal" runat="server" BodyStyle="background-color: transparent;">
                                    <Items>
                                        <ext:PortalColumn ID="colLeft"
                                            runat="server">
                                        </ext:PortalColumn>
                                        <ext:PortalColumn ID="colCentre"
                                            runat="server">
                                        </ext:PortalColumn>
                                        <ext:PortalColumn ID="colRight"
                                            runat="server">
                                        </ext:PortalColumn>
                                    </Items>
                                </ext:Portal>
                            </Items>
                        </ext:Panel>
                    </Items>
                </ext:Viewport>
            </div>
        </form>
    </body>
    </html>
    Last edited by Daniil; Nov 17, 2015 at 9:55 AM. Reason: [FIXED] [#936] [3.3]
  2. #2
    Hi @paulschofield,

    Welcome to the Ext.NET forums and thank you for the report!

    Created an Issue.
    https://github.com/extnet/Ext.NET/issues/936

    It has been fixed in the repo.

    You can either update from SVN or grab just the override for this issue.

Similar Threads

  1. Replies: 0
    Last Post: Jul 23, 2013, 8:08 AM
  2. [CLOSED] TreeGrid not rendering correctly after nodes/columns change
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 07, 2010, 6:52 PM
  3. Replies: 4
    Last Post: Apr 08, 2010, 8:05 PM
  4. Replies: 0
    Last Post: Mar 03, 2010, 9:51 AM
  5. Add Portlet through Javascript
    By sunilaecs in forum 1.x Help
    Replies: 0
    Last Post: Apr 25, 2009, 3:17 AM

Tags for this Thread

Posting Permissions