Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8887053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:42:40+00:00 2026-06-14T21:42:40+00:00

I have four files: layout.html //contains ext resources layout.js //contains my panel partial.html //contains

  • 0

I have four files:

layout.html //contains ext resources
layout.js //contains my panel
partial.html //contains <script src="partial.js">
partial.js //contains a component

I have this panel configured in my layout.js:

var myPanel = Ext.widget('panel',{
    title: 'Load HTML into panel',
    html: 'initial',
    width: 300,
    height: 300,
    loader: {
        url: 'partial.html',
        renderer: 'html',
        scripts: true,
        autoLoad: true
    },
    renderTo: Ext.getBody()
});

And this code in my partial.js

Ext.onReady(function(){

    var myDynPanel = Ext.widget('panel',{
        title: 'Is this working',
        html: 'Dynamic test',
        //renderTo: 'myDynPnl'
    });

});

I want to render myDynPanel inside my myPanel. I am aware that the renderer config on the loader can be set to component, but I’m working with C#.NET MVC and I’m getting partial views results as HTML.

My solution now is create a <div id="myDynPnl"></div> inside partial.html and render the dynamic panel to the div. But I don’t want to use id in my page.

What is the best way to accomplish this. Thanks in advance.

using:
ExtJS 4.1.2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:42:41+00:00Added an answer on June 14, 2026 at 9:42 pm

    After a month we created a solution :).

    Have a question? Ask it!

    PartialViewLoader.js

    Ext.define('PartialViewLoader', {
        mixins: {
            observable: 'Ext.util.Observable'
        },
        constructor: function(config) {
            this.mixins.observable.constructor.call(this, config);
            this.addEvents(
                'loaded'
            );
        },
        load: function(config) {
            var component;
    
            if (this.url == undefined) {
                component = this.loadFunction(config);
                this.fireEvent('loaded', component);
            }
            else {
                Ext.Loader.loadScript({
                    url: this.url,
                    onLoad: function() {
                        component = this.loadFunction(config);
                        this.fireEvent('loaded', component);
                    },
                    //onError: function(r) {},
                    scope: this
                });
            }
        }
    });
    

    Index.js

    Ext.define('MyView', {
        extend: 'Ext.panel.Panel',
        alias: 'widget.myview',
    });
    

    Index.cshtml

    @model MyNameSpace.MyModel
    Ext.create('PartialViewLoader', {
        url: '~/Scripts/Index.js',
        loadFunction: function(config){
            return Ext.create('MyView', Ext.apply(config, {}));
        }
    })
    

    Js File

    Ext.Ajax.request({
        scope: this,
        method: 'POST',
        url: '~/Views/Index', //controller action that returns a partial view (Index.cshtml)
        //params: {},
        success: function (response) {
            var loader = Ext.decode(response.responseText);
    
            loader.on('loaded', function (cmp) {
                //this.add(cmp); //Custom logic
            });
            loader.load();
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a batch script that dynamically creates some files and generates four files
I have a four WAR files which are modules of application. How I can
I have two disks as .vmdk files, and four as .vdi files. I can
I want to split a file(suppose a mp3) into four parts.I have tried this
i have four tables user-question contains two columns: questionID, userID, the questions that the
I have a main activity with this layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
I have four files containing C code. Headers.h - (contain all necessary) headers AddStudent.h
I have some databases that have four files each; one for PRIMARY, IDX, IMAGE,
I have four java files in my folder. They are all in the same
I have a Git repo that I have deleted four files from using rm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.