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

  • Home
  • SEARCH
  • 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 6252705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:51:13+00:00 2026-05-24T13:51:13+00:00

This is the code im using and im firing button click event once the

  • 0

This is the code im using and im firing button click event once the window show event is called. this works fine. but how to do the same without using Ext.getCmp

this is the line

Ext.getCmp('recent_refresh').fireEvent('click');

this is the code

 Ext.create('widget.window', {
      title: 'Activity',
      closable: true,
      closeAction: 'hide',
      width: 250,
      height: 300,
      bodyBorder: true,
      tbar: {
          xtype: 'toolbar',
          ui: 'plain',
          items: [{
              iconCls:'refresh',
              id: 'recent_refresh',
              listeners: {
                click: function(){ 
                      Ext.Ajax.request({
                          url: 'control.php',
                          params: {
                              'case': '18'
                          },
                          success: function(response){
                              var json =  Ext.decode(response.responseText);

                          }
                      });               
                }  
              }
          },
          '->',
          {
              xtype: 'displayfield',
              name: 'act_date',
              id: 'act_date',
              value: new Date(),
              formatValue: Ext.util.Format.dateRenderer('Y-m-d')
          }]
      },      
      layout:'accordion',
      border: false,
      items: [ grid1, grid2, grid3 ],
      listeners: {
            show: function() {      Ext.getCmp('recent_refresh').fireEvent('click'); }        
      }

}).show();

Regards

  • 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-24T13:51:14+00:00Added an answer on May 24, 2026 at 1:51 pm

    There are many ways to do this. One way is to make an assignment with the Ext.create call since Ext.create returns such a reference. The app namespace in the example below is a filler since any namespaces you are using are unknown from your text. Once you have the variable reference to the widget, you can get use it to get a reference to the top toolbar and then get a reference to the item you want inside of the toolbar.

        Ext.ns('app');
        app.activityWin = Ext.create('widget.window', {...}
        app.activityWin.getTopToolbar().get('recent_refresh').fireEvent('click');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using below code for javascript window Yes/No. It is firing twice. Is
Having this code: using (BinaryWriter writer = new BinaryWriter(File.Open(ProjectPath, FileMode.Create))) { //save something here
I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. }
I have this code: using DC = MV6DataContext; using MV6; // Business Logic Layer
I found this code using Google. private int RandomNumber(int min, int max) { Random
I get an error when I compile this code: using System; public struct Vector2
Suppose this C# code: using (MemoryStream stream = new MemoryStream()) { StreamWriter normalWriter =
I have this code (C#): using System.Collections.Generic; namespace ConsoleApplication1 { public struct Thing {
I am converting some Java code to C#. This code is using getGlyphOutline from
I'm using this code, to make a request to a given URL: private static

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.