Allowing a 2nd scheduler on web page

I have a tabbed interface where there is a primary scheduler in one tab and a secondary scheduler in another. The requirement is that when the user returns to the primary one, the state be the same as when they left (there are a few other stateful things on this page that add to the complexity here). I think the possible solutions would be:

  1. Save all the state info and restore it as closely as possible, reloading the pages between each tab transition. I don’t really like this as I’m creating a single page app using Ember.js and I don’t think it’s a good fit.

  2. Use a second scheduler. Since the scheduler is basically a singleton, I would have to perform some hackery to achieve this. Here’s the various options I know of:

a) Load up the scheduler and other necessary files in a separate IFrame within the secondary scheduler’s tab.

b) Create a copy of the dhtmlxscheduler.js and possibly other files and perform necessary subs (scheduler => scheduler2, etc)

c) Maybe some hackery with units view where they share the same scheduler but show completely different things. I’m not sure what I’m talking about here and just have a half-thought out idea in mind.

Any thoughts or suggestions?

Save all the state info and restore it as closely as possible
There is no technical problems. scheduler.getState() will return current state, and using scheduler.setCurrentView will allow to restore it.

  1. Use a second scheduler. Since the scheduler is basically a singleton
    In few days, scheduler 3.5 will be released, it will include PRO edition ( will not be available as GPL ) which will allow to create multiple schedulers per page.

2.a
Will work, no problems.

2.b
Maybe problematic, scheduler.js contains some common part ( dataprocessor, ajax loading ) and loading them two times may cause some harm.

2.c
You can use filtering functionality to show only some subset of events, but after switching to the different view you will need to restore previous settings, similar to (1), just without page reloading.