How to reload a portlet after changing a componenloader

  1. #1

    How to reload a portlet after changing a componenloader

    I have a portlet which a want to reload using javascript.

    This is the portlet:
    portlets.Add(
    
          new Portlet
                {
                     ID = "West1",
                     Loader = Html.X().ComponentLoader()
                     .Url(Url.Action("Portlet"))
                     .Mode(LoadMode.Script)
                     .Params(new { containerid = "West1" })
    
                 }
    
          );
    I call a javascript function in which I change the url of the componentloader:

    var changeChart = function () {
            
               App.West1.loader.url = "/Dashboard/HistoryPortlet/";
              // App.West1.reload();
            };
    I want to change the line App.West1.reload(); to something that works. I tried
    App.West1.load(); but it does not work. Is there a way to force the loader to load again?
  2. #2
    Hello!

    This forum should be used only for publishing members' Examples and Extras like extensions or samples of some solutions. We are moving this thread to 2.x Community forum.

    About your question, you should use load method of ComponentLoader: http://docs.sencha.com/extjs/4.2.1/#...er-method-load
  3. #3

    Tried load method but result displayed is just script

    I tried the following:

     Ext.get('West1').load({
                  url: '/Dashboard/HistoryPortlet/',
                  //scripts: true,
                  renderer: "script",
                  params: {
                      containerid : "West1"
                  }
              });
    I am getting the following output:
    Click image for larger version. 

Name:	1.PNG 
Views:	10 
Size:	32.5 KB 
ID:	7087

    The result should be:
    Click image for larger version. 

Name:	2.PNG 
Views:	12 
Size:	31.1 KB 
ID:	7088

Similar Threads

  1. Replies: 4
    Last Post: Sep 03, 2013, 5:22 PM
  2. Replies: 0
    Last Post: Jul 23, 2013, 8:08 AM
  3. GridView Header. Changing it look when reload page
    By grosenblatt in forum 1.x Help
    Replies: 2
    Last Post: Nov 29, 2010, 6:14 PM
  4. Replies: 4
    Last Post: Apr 08, 2010, 8:05 PM
  5. Replies: 0
    Last Post: Mar 03, 2010, 9:51 AM

Tags for this Thread

Posting Permissions