PDA

View Full Version : [CLOSED] how to replace panel loader params on reload



susanz
Dec 09, 2014, 5:20 PM
I need reload a panel based on selection from a grid. This is how the panel loader is configured and showParamTab(processId) is handler called when grid is selected. How do I update the processId before reload?
Thanks
-szhang



X.Panel().Title("Define Parameters")
.ID ("ProcessParameterPanel")
.Disabled(true)
.BodyPadding(6)
.Loader(X.ComponentLoader()
.Url(Url.Action("LoadProcessParametersPanel", "Process", new { groupId = @ViewBag.GroupID }))
.Mode(LoadMode.Frame)
.AutoLoad(false)
.Params(new Parameter
{
Name = "processId",
Value = "App.ProcessListGridPanel.getSelectionModel().getSe lection()[0].get('Id')",
Mode = ParameterMode.Raw
})
.LoadMask(lm => lm.ShowMask = true)
) //end loader

<script>
var showParamTab = function (processId) {
alert(" selected processId = " + processId);

//var store =
// need reload ProcessParameterPanel with new processId, is there a way to update url param ?
App.ProcessParameterPanel.reload();

//App.ProcessParameterPanel.getLoader().load({ url: myUrl });

}
</script>

Daniil
Dec 10, 2014, 10:24 AM
Hi @susanz,

Please try:

App.ProcessParameterPanel.load();

If it doesn't work, please demonstrate how you call the showParamTab function.

susanz
Dec 10, 2014, 3:43 PM
Yes, This works! Thank you!
-szhang