Event aggregator for Ext JS - extjs

Do you know of any reliable event aggregator implementation for ExtJs?

The best I've found is the MsgBus plugin by ozef Sakalos, aka Saki.
It provides a publish/subscribe model for message passing between ExtJS Components.

Related

IgniteUI + AngularJS "On Row Select" event

I'm sorry, I have Googled, looked through the Infragistics website and it's GitHub section, but I surrender.
How do you implement an "On row select" event, when using the IgniteUI library with AngularJS ?
Even the IgniteUI-AngularJS GitHub page, which contains a demo, doesn't show how to do this.
Here's the jQuery method of doing it (from this webpage)
$("#grid").on("iggridselectionactiverowchanged", function (evt, ui) {
var message = "iggridselectionactiverowchanged";
apiViewer.log(message);
});
...but I want to know how to capture this event from my AngularJS controller (and keeping the amount of jQuery to a minimum).
Is it possible ?
I also tried the standard way of adding a ng-model attribute to this control, and trying to put a watch on this variable, but even ng-model seems to be ignored by this control.
Has anyone used this control, successfully, using AngularJS ?
First I would like to provide some background info about Ignite UI. Ignite UI is built on top of jQuery and jQuery UI. The Angular directives for Ignite UI provide developers with a way to declaratively initialize controls and with out-of-the-box support for two-way databinding. Still the product is not native to Angular and thus not everything that it exposes as functionality can be consumed as you would with native Angular components. That doesn't mean that you lose functionality, just some of it has to be utilized through jQuery.
To answer the specific question, you can bind event handlers declaratively as described in the documentation.

Create Calendar with backbone

I need ideas or directions to create calendar in backbone.js Has anyone already do this or has ideas how to do this like in Android Calendar
I am interested in this week view so I could display Events. Thanks.
I have a Backbone App that has a calendar and I use FullCalendar jQuery plugin to show and create the events. When fetching I translate from my collection to the format expected by the plugin and vice versa.
Once you got it running it is very nice and easy to use. The documentation is also good.

notifications/error handling in marionettejs

I'm building an application using Marionette, I'm trying to write come with an idea/pattern for handling notification on the application.
What I mean is when the user does some action we should show some notification(success/error), if an error occurs in the application we should show some notification.
I was wandering what is the best way/approach in handling some cases.
If you have some experience/link or any information will be helpful.
You should use events. You can see an example here:
https://github.com/davidsulc/marionette-gentle-introduction/blob/master/assets/js/apps/contacts/list/list_view.js : a view triggers an event (e.g. delete a model)
https://github.com/davidsulc/marionette-gentle-introduction/blob/master/assets/js/apps/contacts/list/list_controller.js : the controller listen for and processes that event. The same concept should be used for success/failure/error management.
There's an example of using events to manage routing in the free sample to my book on Marionette.

Event driven programming in Ext JS

I'm working on an application where different widgets from different plugins would be loaded into a host, and they don't know of each other. So I want to use EDP and in one widget raise an event (for example, UserDeleted) and in another widget, subscribe to that event (the famous publisher/subscriber, or let's get more specific, observer pattern).
In jQuery I use trigger() and bind() methods to accomplish this. However, I'm not able to find anything equivalent in Ext JS. Am I missing something? Or is there any other pattern to create loosely coupled UI widgets in Ext JS?
If your widgets don't know about each other, you need to use the mediator pattern.
And it seems that Ext.util.Observable is what you're looking for.
Since ExtJS 4.x Sencha introduced the concept of Controllers which listen for events in a clean systematic pattern of an MVC application. In this scheme your components would fire events (built in or custom ) and controllers will respond to those events.
To fire a custom event you can use fireEvent method on the Observable class which is inherited by just about all other ExtJS classes.

Mixing Ext JS and Wicket

I have a problem related to Wicket and Ext JS. I have a text field in Ext JS and I want to add a Wicket ID to it. In Ext JS, text fields have limited properties. How can I do this?
There are at least two projects trying to integrate ext js into wicket:
http://code.google.com/p/wicket-extjs-integration/ gpl :(
http://code.google.com/p/wicket-ext/ apache license :)
You'll have to use the DOM to add custom attributes to the markup. See Ext.Element.
If you want to add a wicket:id then I presume that you are wanting to add a wicket component with that wicket:id to your page / component. For this to work that wicket:id will need to be present in the html for your page / component at render time. Therefore adding it to the DOM with javascript wont help you as wicket will never see it.
There are a few ext-js wicket integrations which may help you, but I haven't used them. Try searching on the wicket mail list: http://old.nabble.com/Apache-Wicket-f13974.html
The wicket-extjs-integration project is now available under the Apache license. Licensing is a tricky subject, however, due to the fact that ExtJS code itself is GPL. For details, see http://code.google.com/p/wicket-extjs-integration/wiki/Licensing.
The way we (Hippo) use it mostly is by letting the wicket component
set up the configuration and
implement component-bound services for the Ext component;
e.g. a read/write JsonStore can be implemented in pure java.
It's also easy to subscribe to Ext events with a (java) event listener.
Typically, the Wicket component only needs to bootstrap the Ext component. However, we've also had a few cases where we then needed to wrap a Wicket component in an Ext component. This is also quite easily accomplished. (see our Channel Manager code # http://svn.onehippo.org/repos/hippo/hippo-cms7/addons/addon-channel-manager/trunk/)
Being able to compose the Ext component hierarchy has allowed us to extend our Wicket-based plugin mechanism to the Ext side. E.g. Wicket plugins each instantiate a card/panel Ext component & those are aggregated on the wicket side in a component that instantiates an Ext tab panel.
The method annotation you mention is something we haven't needed; we typically trigger client-side code by emitting javascript code. Probably a cleaner solution would be to fire an event.
The versions of Wicket and ExtJS used are a bit antiquated (1.4.xx & 3.4.x), something we'll be addressing on a short term.

Resources