Best Practice for multi-tab applications?

xIke's Avatar


13 May, 2013 02:10 AM

I've found a kind of application that my current (bad?) practices using robot legs can't address. When I have a set of views that need to share items, selection, view settings, etc., I inject models into the views to store this info. This has worked great when I have a single set of items sharing that info. It completely breaks down though with my new problem: a multi-tab application. Each tab of the application needs to act like its own application- the data stored in the models shouldn't be shared between other tabs (like a web browser.) I've scoured the docs and sample applications and haven't seen anything like this. Does anyone have some advice on how to handle this?

I really appreciate it!

  1. Support Staff 1 Posted by Shaun Smith on 14 May, 2013 04:05 PM

    Shaun Smith's Avatar

    Hello Xlke,

    Sorry for the delay - many members of the team are away at the moment.

    The solution here is to use multiple contexts. Have a look at some modular examples/articles. Each context lives in its own isolated scope, and a shared event dispatcher is used to communicate between the "Shell" context and the "Module" contexts.

    This is much easier to do in RL2, but it looks like you're using RL1. In that case, search the knowledgebase for information on multiple/modular contexts.

  2. 2 Posted by xIke on 19 May, 2013 12:23 AM

    xIke's Avatar

    Hey, thanks for the response. That sounds perfect- I didn't like the idea of trying to pass the model instance or id around in an event to differentiate. Thanks!

  3. Support Staff 3 Posted by creynders on 20 May, 2013 01:39 PM

    creynders's Avatar

    Closing this for now, if you have any more questions, let us know!

  4. creynders closed this discussion on 20 May, 2013 01:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac