Hello @mehdy!
Do you require to determine the view name from code behind? If it's always going to be the same, you can just go ahead and specify the view name/path in a
Component Loader. In your example, I dismissed the panel right within the window and assigned the loader to the window. The window code in the View became:
<ext-window id="Window1"
title="Edit View"
bodyPadding="18"
modal="true">
<loader>
<ext-componentLoader renderer="frame" autoLoad="false" url="t63190_modalView" />
</loader>
</ext-window>
Then in code behind you can just remove the
"// what to do here ??? to fill the window or pane;"
, the window will be filled by another View, right? If we fill it here, it means we'll using an action to fill the window; it's not what I believe you want.
In case you want to pass some parameters you can get from client side (the record being edited, for instance), you can just feed it to the loader via parameters and get on the view's
Get()
method via
this.Request.Query["parameter_name"]
.
In case you require to resolve the view name from code behind, you'd want to do something like this (again, next to the "what to do here" comment in your model code):
this.X().AddScript("App.Winpanel.getLoader.url = 'my_view_path_here'")
Sorry for throwing these pieces around, I hope they serve as guidelines to solve potential challenges you may face developing your page (interaction back and forth) and, as I'm not sure whether you'll need them or not, full samples would be a bit misleading.
Let us know if you still can't get the hang of it or get stuck somewhere!
Also, notice that's a full view. Partial Views rendering, like it used to be in Ext.NET 5 (with
PartialViewResult etc), is not supported yet.
Hope this helps!