[FIXED] [#938] [3.3] ComponentLoader for Component doesn't work

  1. #1

    [FIXED] [#938] [3.3] ComponentLoader for Component doesn't work

    Hello,

    Example:

    @using Ext.Net;
    @using Ext.Net.MVC;
    
    @{
        Layout = null;
        
        var X = Html.X();
    }
    
    <!DOCTYPE html>
    
    <html>
    <head>
        <title>Test</title>
    </head>
    <body>
        @(Html.X().ResourceManager().Theme(Theme.CrispTouch))
    
    @(X.Component()
        .Width(500)
        .Height(500)
        .Tpl(X.XTemplate()
            .Html("{Data}")
        )
        .Loader(X.ComponentLoader()
            .Url(Url.Action("GetData", "ExtNet"))
            .Mode(LoadMode.Data)
        )
    )
    </body>
    </html>
    using System.Web.Mvc;
    using Ext.Net;
    using Ext.Net.MVC;
    using ExtNetTest.Test.Models;
    using System.Collections.Generic;
    
    namespace ExtNet.Test.Controllers
    {
        public class ExtNetController : Controller
        {
            public ActionResult Index()
            {
                return this.View();
            }
    
            public ActionResult GetData()
            {
                return Json(new { Data = 10 }, JsonRequestBehavior.AllowGet);
            }
        }
    }
    Last edited by Daniil; Nov 18, 2015 at 6:03 AM. Reason: [FIXED] [#938] [3.3]
  2. #2
    Hi Yury,

    Thank you for the report!

    Created an Issue:
    https://github.com/extnet/Ext.NET/issues/938

    By default auto loading is triggered on the AfterLayout event. Though, it is a Container's event only and a Component doesn't have it. So, a workaround is to set .TriggerEvent("AfterRender") for the ComponentLoader's config.

    That has been fixed in the repo. The fix will go to the 3.3 release.

Similar Threads

  1. [CLOSED] [#675] ComponentLoader loading component with plugins
    By anup in forum 3.x Legacy Premium Help
    Replies: 4
    Last Post: Feb 04, 2015, 11:22 AM
  2. Replies: 6
    Last Post: Oct 07, 2014, 6:51 PM
  3. POST Request with ComponentLoader not work
    By retailItalia in forum 2.x Help
    Replies: 2
    Last Post: Nov 19, 2013, 9:39 PM
  4. [CLOSED] Click listener doesn't exist within Node component
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 06, 2012, 12:21 PM
  5. Replies: 1
    Last Post: Mar 13, 2012, 12:17 PM

Posting Permissions