Found: 7.1.0
Ext.NET forum thread:
Generated client-side code is not including a required control: this argument to Ext.net.directRequest() calls.
The following code in Ext.NET 5:
<ext:button runat="server" text="Toast 2">
<directEvents>
<click OnEvent="Button2_Click">
<extraParams>
<ext:Parameter name="label" value="function() { return this.text; }" mode="Raw" />
</extraParams>
</click>
</directEvents>
</ext:button>
Results in:
Ext.create("Ext.button.Button", {
id: "ctl03",
renderTo: "App.ctl03_Container",
text: "Toast 2",
directEvents: {
click: {
fn: function (item, e) {
Ext.net.directRequest({
extraParams: {
"label": function () {
return this.text;
}
},
control: this
});
}
}
}
});
In Ext.NET 7 though, the button definition:
<ext-button text="Toast 2">
<directEvents>
<click actionName="Button2_Click">
<extraParams>
<ext-add key="label" value="function() { return this.text; }" mode="Raw" />
</extraParams>
</click>
</directEvents>
</ext-button>
Is generating:
Ext.create("Ext.button.Button", {
directEvents: {
click: {
fn: function (item, e) {
Ext.net.directRequest({
action: "click",
cleanRequest: true,
extraParams: {
label: function () {
return this.text;
}
}
});
}
}
},
id: "ctl02",
renderTo: "App.ctl02_Container",
text: "Toast 2"
});
Then, this in the direct event's extraParams scope becomes the javascript Window object, and it is not possible to reliably get data from the related component during pre- and post- direct event client-side tasks.
Found: 7.1.0
Ext.NET forum thread:
Generated client-side code is not including a required
control: thisargument toExt.net.directRequest()calls.The following code in Ext.NET 5:
Results in:
In Ext.NET 7 though, the button definition:
Is generating:
Then,
thisin the direct event'sextraParamsscope becomes the javascript Window object, and it is not possible to reliably get data from the related component during pre- and post- direct event client-side tasks.