PDA

View Full Version : [CLOSED] PartialExtView



Timothy
May 04, 2012, 1:28 PM
Hello,

Using the latest build from SVN the following code returned from my PartialExtView over AJAX does not evaluate?




Ext.net.ResourceMgr.load([], function(){Ext.net.addTo("TabSetupUser", [{border:false,xtype:"panel",items:[{html:"\r\n\t\t\t\t<h2>Users</h2>\r\n\t\t\t\t<p>Use the following section to manage the <i>Users</i> on the application:</p>\r\n\t\t\t",xtype:"container"},{store:{model:Ext.define(Ext.id(), {extend: "Ext.data.Model", fields:[{name:"Id"},{name:"FirstName",type:"string"},{name:"LastName",type:"string"},{name:"Email"}] }),storeId:"id2949c2e24bc1bda4",autoLoad:true,proxy:{type:"ajax",reader:{type:"json",idProperty:"Id",root:"data"},url:"/Management/User/Get"}},height:250,plugins:[{ptype:"rowediting"}],xtype:"grid",title:"Users",columns:{items:[{flex:1,dataIndex:"Email",text:"Email"}]}}]}]);});


Any suggestions?

Cheers,
Timothy

Timothy
May 04, 2012, 1:30 PM
Here is the code inside my partial razor page in case it helps:



@(Html.X().Panel()
.Border(false)
.Items(a =>
{
a.Add(Html.X().Container()
.Html(@"
<h2>Users</h2>
")
);
a.Add(Html.X().GridPanel()
.Height(250)
.Title("Users")
.Store(store =>
store.Add(Html.X().Store()
.Model(model =>
model.Add(Html.X().Model()
.Fields(fields =>
{
fields.Add(Html.X().ModelField()
.Name("Id")
);
fields.Add(Html.X().ModelField()
.Name("FirstName")
.Type(ModelFieldType.String)
);
fields.Add(Html.X().ModelField()
.Name("LastName")
.Type(ModelFieldType.String)
);
fields.Add(Html.X().ModelField()
.Name("Email")
);
} )
)
)
.Proxy(proxy =>
proxy.Add(Html.X().AjaxProxy()
.Reader(reader =>
reader.Add(Html.X().JsonReader()
.IDProperty("Id")
.Root("data")
)
)
.Url(Url.Action("Get", "User", new { Area = "Management" } ) )
)
)
)
)
.ColumnModel(model =>
{
model.Add(Html.X().Column()
.DataIndex("Email")
.Flex(1)
.Text("Email")
);
} )
.Plugins(plugin =>
{
plugin.Add(Html.X().RowEditing());
} )
);
} )
)


Cheers

Vladimir
May 04, 2012, 2:24 PM
Thank you for the report
Now resources under Razor should be handled correctly
Please update from SVN

Timothy
May 04, 2012, 2:32 PM
Confirmed. Thanks!

Cheers,
Timothy