Feb 09, 2017, 2:41 AM
[FIXED] [#1436] [4.2.1] .Icon & .UI will cause "Invalid regular expression flags" error in browser
When we use .UI & .Button under Ext.NET 4.2.0, the browser will have "Invalid regular expression flags" error.
We have checked the response data of partial view request. the error message should be caused from this line.(url data is not single quoted)
Ted
We have checked the response data of partial view request. the error message should be caused from this line.(url data is not single quoted)
{script:"Ext.net.ResourceMgr.registerIcon([\"Add\",\"Delete\",\"Disk\"]);
Ext.net.ResourceMgr.load([{url:\"/Scripts/Settings/MIBrandModelMgmt.js\"},
{url:/uipack/aria/extui-aria-all-css3-embedded-css/ext.axd?v=4.2.0,mode:\"css\"}],
function(){Ext.ComponentManager.onAvailable(\"ContientPanel\",function(){Ext.net.addTo(\"ContientPanel\",
our view codes@using ResMgmt.Helpers;
@model ResMgmt.Models.BrandModelModel
@{
MvcResourceManager.RegisterGlobalScript("~/Scripts/Settings/MIBrandModelMgmt.js");
ViewBag.Title = "å»*牌型號è¨*定";
var X = Html.X();
var gpItemSet = X.GridPanel()
.ID("PanelItemSetGrid")
.AnchorHorizontal("80%")
.Title("å»*牌列表")
.Region(Region.West)
.Width(300)
.Split(true)
.ForceFit(true)
.TopBar(
X.Toolbar()
.Items(
X.Button()
.Text("新增")
.Icon(Icon.Add)
.Width(80)
.UI(UI.Success)
.Handler("handlerMIBrandModelMgmt.onCreate();"),
X.Button()
.Text("刪除")
.Icon(Icon.Delete)
.Width(80)
.UI(UI.Success)
.Handler("handlerMIBrandModelMgmt.onDelete();"),
X.Button()
.Text("儲å*˜")
.Icon(Icon.Disk)
.Width(80)
.UI(UI.Success)
.Handler("handlerMIBrandModelMgmt.onSave();")
)
)
.BottomBar(
X.PagingToolbar()
.HideRefresh(true)
);
}
@(
X.Panel()
.ID("PanelBrandModelMgmt")
.Closable(true)
.AutoScroll(true)
.Defaults(new Parameter("Margin", 10))
.Title("通信器æå»*牌型號è¨*定")
.Layout(LayoutType.Fit)
.Items(
X.Container()
.Layout(LayoutType.Border)
.Defaults(new Parameter("Margin", 5))
.Items(
gpItemSet
)
)
)
our partial view action codespublic ActionResult MIBrandModelMgmt(string containerId)
{
var result = new Ext.Net.MVC.PartialViewResult
{
ViewName = "MIBrandModelMgmt",
ContainerId = containerId,
RenderMode = RenderMode.AddTo
};
BrandModelModel model = new BrandModelModel();
model.EquipTypes = _uom.IrCodes
.GetEquipTypes()
.ToList()
.Select(c => new CodeModel(c))
.ToList();
result.Model = model;
Ext.Net.X.GetCmp<TabPanel>(containerId).SetLastTabAsActive();
return result;
}
Ted
Last edited by fabricio.murta; Feb 09, 2017 at 5:37 PM.