PDA

View Full Version : [CLOSED] MessageBus



FAS
Mar 22, 2012, 2:14 AM
Hi.

I am just taking a look at the new EXT.NET 2.0

Amazing job. Great new controls and features.

In regard to my first post http://forums.ext.net/showthread.php?16284-CLOSED-Desktop-Windows-synchronization-best-approach I think MessageBus will simplify desktop windows synchronization functionality.
Is it shared between all windows doesn´t matter they load different aspx files?
If so, better yet. It is no longer needed a Desktop (needed in the solution I built)

Am I wrong?

Am I about to throw my coding to the trash bin? ;-)

Regards
Fernando

Vladimir
Mar 22, 2012, 11:30 AM
Unfortunately, MessageBus doesn't pass events to the child iframes (communication is possible within one page only (it means browser page))
We have ideas to add support of cross paging events but it is not implemented yet

Vladimir
Apr 01, 2012, 7:20 PM
Hi,

We implemented passing of message bus events between iframes, now event is fired in iframe (or parent page) is available in parent page and other iframes
The code is available in SVN

FAS
Apr 01, 2012, 8:34 PM
Great!
Glad to read that.

Does it mean also cross-page messaging?

I mean, if I open a brand new window with CreateWindow in iframe mode loading another aspx, will I be able to message to/from that page to/from others? (to accomplish what I ment in the referenced post).

Lets say I have a window with CountryUpdate.aspx page loaded. When I update a country in database I fire a message 'CountryUpdated' throught that bus. Any other loaded page (countrylist.aspx, citiesByCountry.aspx, and so...) in different iframe mode windows could be listening to that bus and then notice about update and refresh grids and what ever controls they need to update. Would that be possible?

I 'm not yet moved to EXT 2, but in regard that post I'll stop improving my code if that functionality will be available here.

Thanks
Regards
Fernando

Vladimir
Apr 01, 2012, 8:49 PM
Hi,



Does it mean also cross-page messaging?

Yes, just two conditions:
- page must be in the same domain (cross domain messaging is not supported)
- messaging between browser windows (for example, if you have pages in different browser tabs) is not supported

So, it means that messaging is possible between iframes and main page (main page and pages inside iframes must be in the same domain)

FAS
Apr 02, 2012, 5:33 AM
Great! Can't wait to try it. May be next week end.

Thank you very much
Regards
Fernando