Feb 10, 2011, 6:23 PM
[CLOSED] MVC Portal / Portlet RenderExtPartial Issue
Hi,
I'm trying to load the content of each portlet in a portal by using Html.RenderExtPartial. Although this does render the content, it places it in the first column even though I have 3 columns defined.
I guess the target control Id is confused? Is there a better way to load the portlets?
Eventually I'd like to load these dynamically. It did cross my mind that a neat feature would be to extend AutoLoad so it can work in "PartialView" mode.
The View:
I'm trying to load the content of each portlet in a portal by using Html.RenderExtPartial. Although this does render the content, it places it in the first column even though I have 3 columns defined.
I guess the target control Id is confused? Is there a better way to load the portlets?
Eventually I'd like to load these dynamically. It did cross my mind that a neat feature would be to extend AutoLoad so it can work in "PartialView" mode.
The View:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Master/PageStyle.Master"
Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="Ext.Net.MVC" %>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<ext:Viewport ID="Viewport1" runat="server" Layout="Fit">
<Items>
<ext:Portal ID="Portal1" runat="server" Border="false" Layout="Column" Stateful="true">
<Items>
<ext:PortalColumn ID="PortalColumn1" runat="server" Cls="x-column-padding" ColumnWidth=".33"
Layout="Anchor">
<Items>
<ext:Portlet ID="Portlet1" runat="server" Title="Portlet 1">
<Content>
<%= Html.RenderExtPartial("LogoPortlet") %>
</Content>
</ext:Portlet>
</Items>
</ext:PortalColumn>
<ext:PortalColumn ID="PortalColumn2" runat="server" Cls="x-column-padding" ColumnWidth=".33"
Layout="Anchor">
</ext:PortalColumn>
<ext:PortalColumn ID="PortalColumn3" runat="server" Cls="x-column-padding-right"
ColumnWidth=".33" Layout="Anchor">
<Items>
<ext:Portlet ID="Portlet3" runat="server" Title="Portlet 3">
<Content>
<%= Html.RenderExtPartial("FeedPortlet") %>
</Content>
</ext:Portlet>
</Items>
</ext:PortalColumn>
</Items>
</ext:Portal>
</Items>
</ext:Viewport>
</asp:Content>
The LogoPortlet:<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<ext:Panel ID="Panel1" runat="server" Height="300" Title="Title" Header="true" Width="400">
<Items>
</Items>
</ext:Panel>
The FeedPortlet:<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<ext:Panel ID="Panel1" runat="server" Height="300" Title="RSS Feed">
<Items>
</Items>
</ext:Panel>
Last edited by Daniil; Feb 10, 2011 at 7:58 PM.
Reason: [CLOSED]