[CLOSED] how to replace panel loader params on reload

  1. #1

    [CLOSED] how to replace panel loader params on reload

    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().getSelection()[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>
    Last edited by Daniil; Dec 11, 2014 at 7:20 AM. Reason: [CLOSED]
  2. #2
    Hi @susanz,

    Please try:
    App.ProcessParameterPanel.load();
    If it doesn't work, please demonstrate how you call the showParamTab function.
  3. #3
    Yes, This works! Thank you!
    -szhang

Similar Threads

  1. [CLOSED] MVC - Panel - Loader
    By thchuong in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 15, 2014, 4:09 PM
  2. Panel Loader example in Razor
    By basder in forum 2.x Help
    Replies: 4
    Last Post: Mar 24, 2014, 3:34 PM
  3. Replies: 4
    Last Post: Sep 03, 2013, 5:22 PM
  4. [CLOSED] Reload window content when user loader dynamically
    By rthiney in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 28, 2013, 4:43 AM
  5. [CLOSED] LoadMask on Panel without Loader
    By Patrick_G in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 19, 2013, 2:27 AM

Posting Permissions