Can anyone tell me how I can broadcast an event, not within the mojit-binder?
As far as I can see now, the mojitbinder is for UI-events taken place on the Mojitnode. At that point, I could use this.mojitProxy.broadcast().
But I'm using a view where there is an YUI() instance that has a widget which fires an event.
So I have this index.hb.html view:
<div id="{{mojit_view_id}}" class="firmselection">
</div>
<script type="text/javascript" charset="utf-8">
YUI({
gallery: 'gallery-2012.09.19-20-07'
}).use('yui-base', 'base-build', 'cssbutton', 'node-event-delegate', 'gallery-itsaselectlist', function(Y) {
var selectlist = new Y.ITSASelectList({items: ['one', 'two', 'three']});
selectlist.on('selectChange', function(e){
mojitProxy.broadcast({selected: e.value});
});
selectlist.render('#{{mojit_view_id}}');
});
</script>
But obviously mojitProxy cannot be called in this place.
1) Is this the right way to do so?
2) How to link to mojitProxy within this view?
Kind Regards,
Marco Asbreuk