Is sending self assigned event from a component a normal proctice?


#1

I have a route that simplifies communication with the server and use it by sending messages. It looked comfortable until I had to communicate to the server from a component - sent messages did not bubble and did not reach the route. Thus I use a work around: in a component I set a property and use sendAction instead of send, something like that:

getJSONWithAuth: 'getJSONWithAuth',

didInsertElement: function() {
    this.sendAction('getJSONWithAuth', this, 'topprojects.php', {}, 'initload');
},

This way I do not have to specify the event each time a component is used, but I am not sure if this is a good practice. Are reasons for preventing sent events from bubbling out of components serious enough to expect this to be prohibited in the future versions of Ember?