PDA

View Full Version : [CLOSED] Migrating a MVC App from v1 to v2



RCN
Apr 10, 2012, 4:32 PM
The following example was implemented using V1


<ext:Panel ID="Panel1" runat="server" Title="example">
<AutoLoad Url="/Compartilhado/Test/">
<Params>
<ext:Parameter Name="containerId" Value="#{Panel1}" Mode="Value" />
</Params>
</AutoLoad>
</ext:Panel>




public ContentResult Test(string containerId)
{
ContentResult cr = new ContentResult();

Button b = new Button() { Text = "Test", Icon = Icon.Add };

cr.Content = string.Format(@"<script>{0}</script>", b.ToScript(RenderMode.AddTo, containerId));

return cr;
}


I´m trying to migrate to version 2.0 but i was not able to accomplish it. Any ideas to make it work?



<ext:Panel ID="Panel1" runat="server" Title="example">
<Loader ID="Loader2" runat="server" AutoLoad="true" Url="/Example/Test/">
<Params>
<ext:Parameter Name="containerId" Value="Panel1" Mode="Value" />
</Params>
</Loader>
</ext:Panel>

Daniil
Apr 10, 2012, 4:42 PM
Hi,

We suggest the following way.
http://forums.ext.net/showthread.php?18300&p=78972&viewfull=1#post78972

Daniil
Apr 10, 2012, 7:05 PM
By the way, to get your initial code working you should set up

Scripts="true"
for the Loader.

The following

<ext:Parameter Name="containerId" Value="#{Panel1}" Mode="Value" />
with #{} syntax will work after updating from SVN.