Ext.NET icon indicating copy to clipboard operation
Ext.NET copied to clipboard

`extraParams` mis-assigned to the `ext-ajaxProxy` component

Open fabriciomurta opened this issue 4 years ago • 0 comments

Found: 7.2.0 Ext.NET Forums' thread: Parameters in ajax-proxy store

The following syntax causes an error upon accessing the page:

<ext-store autoLoad="false">
    <proxy>
        <ext-ajaxProxy url="some_path_to/Data">
            <extraParams>
                <ext-add key="par1" value="1" mode="Value" />
            </extraParams>
        </ext-ajaxProxy>
    </proxy>
</ext-store>

The error is:

LayoutException: Unexpected element 'DirectEventParameterTagHelper' nested into 'ServerProxyExtraParamsPropertyTagHelper'.

So it seems the server proxy components somehow assign the ext-add tag to the Ext.Net.TagHelpers.Core.DirectEventParameterTagHelper tag helper.

To avoid the issue, it is enough to just use custom config:

<ext-store autoLoad="false">
    <proxy>
        <ext-ajaxProxy url="some_path_to/Data">
            <customConfig>
                <ext-add key="extraParams">
                    <ext-add key="par1" value="80" mode="Value" />
                </ext-add>
            </customConfig>
        </ext-ajaxProxy>
    </proxy>
</ext-store>

fabriciomurta avatar Jun 08 '21 21:06 fabriciomurta