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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:45:33+00:00 2026-06-06T06:45:33+00:00

I what to share some events from my application to be shared across the

  • 0

I what to share some events from my application to be shared across the views and controllers.
For example, event: “updates from server are available”.
To do that I can fireEvent(“updatesAvailable”) in the controller, but that makes other components to subscribe to that particular controller that fires that event.

What I want is to have a singleton object that will keep all application logic events subscriptions.

Currently I see that I can solve the problem with having one shared view instance and subscribe all to it. But I would like to know is there is one out of the box Event Dispatcher that is aware about all events inside the application.

  • 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-06T06:45:36+00:00Added an answer on June 6, 2026 at 6:45 am

    As far as I understand you want to use pattern ‘Event Bus’?
    You could use the ‘global’ and single object that exists in every ST2 application – Ext.Viewport. At least I’m creating in my app and till now nothing is bad.
    Note, the best place to create event handler is controller’s init() method.

    Ext.define('Myapp.controller.ActivitiesController', {
    
    extend : 'Ext.app.Controller',
    
    requires : [],
        config: {
            refs: {
                myview: 'myview'
            }
    ...
        init: function () {
        var me = this;
    
        Ext.Viewport.on({
            scope: this,
            addactivitytype: function (config) {
                        var myview = me.getMyview(),
                            record = config.record
    ...
    
              });
         }
    });
    

    in the another controller (or ever view) you could write

     addActivityTypeTap: function (record) {
          ....
          Ext.Viewport.fireEvent('addactivitytype', {
            record: record
          });
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented Shake Event listener in my application and onShake do some logic.
I need to share some text from my app to google plus and I
I have a windows form application that uses a Shared class to house all
I would like to create events for certain resources that are used across various
I have a list view that contains some data, I want to share it
Can anyone please share some java codes for getting started with google search api's.I
Could anyone share some links on how to get started using QPID? I have
Can any one share some study material for multithreading on .net? EDIT: I don't
I want to share some image Icons between two applications. I stored the icons
I'm trying to share some text using an intent: Intent i = new Intent(android.content.Intent.ACTION_SEND);

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.