Apr 22, 2020, 5:33 PM
[CLOSED] Browser issue with migrated code
Hi Fabricio (?),
We have code on a button that works in Chrome, but not in the new Edge (the one that is mostly Chrome with a skin on it)
But in Edge, it only shows the outer ID="winCustomViews" segment, the ascx control is nowhere to be seen and there are no errors in the console.
In that first piece of code there is this line:
Can you provide any guidance? This is suddenly more important than my other issues as we plan on upgrading our users to the new version of our site running on Edge, while leaving them with Chrome 61 running our old site to fall back on while we work out any kinks in the new version.
Thank you for any help!
Bob Graham
We have code on a button that works in Chrome, but not in the new Edge (the one that is mostly Chrome with a skin on it)
<ext:Button runat="server" Text="Custom Views" ID="btnCustomViews" Icon="Cog">
<Menu>
<ext:Menu runat="server" ShowSeparator="false">
<Items>
<ext:MenuItem ID="btnCreateCustomView" runat="server" Text="Create View">
<Listeners>
<Click Handler="createCustomViews(); #{mode}.setValue('add'); #{winCustomViews}.show();" />
</Listeners>
This calls this item:<ext:Window
ID="winCustomViews"
runat="server"
Frame="true"
Title="Define Custom Views2"
Width="520"
Height="300"
Modal="true"
Hidden="true"
Layout="Fit"
Maximizable="true">
<Loader AutoLoad="true" Url="~/WebUI/Purchasing/CustomViews.aspx" Mode="Frame" runat="server" ReloadOnEvent="true" TriggerEvent="show">
<LoadMask ShowMask="true" />
<Params>
<ext:Parameter Name="viewId" Value="#{viewId}.getValue()" Mode="Raw" />
<ext:Parameter Name="viewText" Value="#{viewText}.getValue()" Mode="Raw" />
<ext:Parameter Name="Meta" Value="#{txtJSON}.getValue()" Mode="Raw" />
<ext:Parameter Name="GConfig" Value="Ext.encode(App.mrpActionGrid.getState())" Mode="Raw" />
<ext:Parameter Name="FilterConfig" Value="Ext.encode(App.mrpActionGrid.filterHeader.getValue())" Mode="Raw" />
<%-- <ext:Parameter Name="FilterConfig" Value="#{FilterConfig}.getValue()" Mode="Raw" />--%>
<ext:Parameter Name="mode" Value="#{mode}.getValue()" Mode="Raw" />
</Params>
</Loader>
</ext:Window>
Which contains this markup:html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<ext:ResourceManager runat="server"></ext:ResourceManager>
<ext:UserControlLoader Path="~/WebUI/Controls/CustomViews.ascx" runat="server">
</ext:UserControlLoader>
</div>
</form>
</body>
</html>
which is supposed to load this control:<ext:Panel
runat="server"
Layout="FitLayout"
Width="500"
Height="250">
<Items>
<ext:FormPanel
ID="fpanelCustomView"
runat="server"
Title="Details"
BodyPadding="5"
ButtonAlign="Right"
Layout="Column">
<Items>
<ext:FieldContainer
runat="server"
Layout="HBoxLayout" ID="FieldContainer3">
<FieldDefaults LabelAlign="Right" LabelWidth="100" />
<Items>
<ext:ComboBox runat="server" ID="txtType" Name="Type" FieldLabel="Type" MarginSpec="15 0 0 5" Text="Application" Width="300" Hidden="true">
<Items>
<ext:ListItem Text="Action" Value="1" />
<ext:ListItem Text="Application" Value="2" />
</Items>
</ext:ComboBox>
</Items>
</ext:FieldContainer>
...<snip>
<Click Fn="closeViewsWindow" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</Items>
<Listeners>
<AfterLayout Fn="OnLookupLoad" />
</Listeners>
</ext:Panel>
And this (horrible kludge) of code works fine in new Chrome (remember I am embroiled in a massive EXT 2.5.3 -> Ext 5 migration)But in Edge, it only shows the outer ID="winCustomViews" segment, the ascx control is nowhere to be seen and there are no errors in the console.
In that first piece of code there is this line:
<Click Handler="createCustomViews(); #{mode}.setValue('add'); #{winCustomViews}.show();" />
Is that line still valid EXT markup? I can't find a relevant example on the examples site showing this method of loading subcontent at multiple levels while also passing parameters. Usually when something like this misbehaves there is some kind of error shown in the console window.Can you provide any guidance? This is suddenly more important than my other issues as we plan on upgrading our users to the new version of our site running on Edge, while leaving them with Chrome 61 running our old site to fall back on while we work out any kinks in the new version.
Thank you for any help!
Bob Graham
Last edited by fabricio.murta; Apr 23, 2020 at 6:43 PM.
Reason: Solution found