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 6616811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:37:41+00:00 2026-05-25T20:37:41+00:00

i m working with extjs designer 1.2. I have a button on panel that

  • 0

i m working with extjs designer 1.2. I have a button on panel that opens window on click. The window has grid for which i have applied renderer as following in js file . The problem is renderer works well when the window opens up for first time, but when i close window & reopen it, the effect goes off.

Ext.define('MyApp.view.TestWindow', {
    extend: 'MyApp.view.ui.TestWindow',

initComponent: function() {
    var me = this;
    me.callParent(arguments);

}

 });

==========================================================================

Ext.define('MyApp.view.TestPanel', {
    extend: 'MyApp.view.ui.TestPanel',

initComponent: function() {
    var me = this;
    me.callParent(arguments);
    Ext.data.StoreManager.lookup('Test').load();
    me.down('button[id=testbutton]').on('click',me.onTestBtnClick,me); 
},

onTestBtnClick:  function(){

    var win = new Ext.create('MyApp.view.TestWindow');
    win.show();
    win.down('#testgrid').columns[0].renderer=function(val){
         return '<span style="color:red;">' + val + '</span>';
        }

}
});

Observation : When i use renderer in ui.js i.e. the file generated by exporting project from designer, i dont face above stated problem. What can be solution for this problem?

  • 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-05-25T20:37:42+00:00Added an answer on May 25, 2026 at 8:37 pm

    I’ve resolved similar issues caused by the closeAction config option of my Ext.Window (MyApp.view.TestWindow in your case) being set to hide, instead of destroy (Ext JS 4 default). Your illustrated button click event handler instantiates a new Ext.Window (MyApp.view.TestWindow in your case) every time it is fired. If these instances are not created and destroyed properly you may experience DOM ID contention and undesirable results.

    If your goal is to persist such instances a better approach, regardless of the state of your current config options, would be for you to relocate your instantiation logic to a global scope and only manage the showing and hideing of this component in your button click event handler.

    Because you have not provided the underlying MyApp.view.TestWindow logic, I am only left to assume that the root cause of your issue does pertain to a combination of either misconfigured config options and/or component instance management, ultimately resulting in components contending for the same DOM ID.

    Another thing to be mindful of is the use of statically defined id config options. If you are statically defining an id config option on any component you must ensure that those components are either singletons, or their instances assigned in a global scope for reuse. Again, this all boils down to proper component management.

    Lastly, it is also a possibility that the use of my suggestion does not reveal any glaring issues specific to your MyApp.view.TestWindow. If this is the case, inspect and ensure that none of the underlying MyApp.view.TestWindow child components (grid, column model, column, etc.) are culprit.

    EDIT

    Below is an example:

    Ext.define('MyApp.view.TestPanel', {
        extend: 'MyApp.view.ui.TestPanel',
    
    initComponent: function() {
        var me = this;
        me.callParent(arguments);
        Ext.data.StoreManager.lookup('Test').load();
        me.down('button[id=testbutton]').on('click',me.onTestBtnClick,me);
    
        me.testWindow = new Ext.create('MyApp.view.TestWindow');
        me.testWindow.down('#testgrid').columns[0].renderer=function(val){
            return '<span style="color:red;">' + val + '</span>';
        }
    },
    
    onTestBtnClick:  function(){
        var me = this;
        me.testWindow.show();
    }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i m working with extjs designer 1.2. I have a button on panel that
I have a button with a working listener in an ExtJs Data Grid. I
So here's the case that I'm working on: I have an ExtJS grid of
I have ExtJS View-Port panel , that contain center panel, that contain tablpanel ,
I am working on my first project using ExtJS. I have a Data Grid
In our application, we have a window containing a Grid and two buttons -
I'm working with a long form/survey in extjs which calls a script which then
I am using a star rating plugin with ExtJS that is working well, but
I'm working with extjs 2.2.1, having a bit of a trouble adding a button
I have an ExtJs Grid with CheckBoxSelectionModel . Selecting the header checkbox checks all

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.