Direct interaction between different modules without page reload | Leo Dashevskiy | 2013-02-15 15:41 |
Status: Closed | ||
Thanks, Anthony! It is nice to hear that someone else has thought about the same issue and in fact has come to the same conclusion. I already realized the weakness of the Observable that the 2 communicating modules must be in the same scope, which is at time troublesome and have also read up on the MsgBus and Mediator (pub/sub) ideas. I think, I will give those last ones a stab. And as far as the module instance goes, I do have more going on than the trimmed version above, namely: <script type='text/javascript'> var initOpenCytoPreprocessing = function(){ var webPartDiv = <%=webpartContext%>.wrapperDivId; var resizeModule; var OpenCytoPreprocessing = new LABKEY.ext.OpenCytoPreprocessing({ webPartDivId: webPartDiv }); captureEvents( OpenCytoPreprocessing ); resizeModule = function(w, h){ LABKEY.Utils.resizeToViewport( OpenCytoPreprocessing, w, -1, null, null, -5 ); OpenCytoPreprocessing.resize(); }; Ext.EventManager.onWindowResize( resizeModule ); Ext.EventManager.fireWindowResize(); } Ext.onReady( initOpenCytoPreprocessing ); </script> |
||