Template parameters on nested templates reset

Without going into too much detail on what I am trying to do, the basic idea is this. I need to populate several buttons in a template that I use as a navigation bar. The details on the buttons and options available are based on a station configuration stored in the database. To improve performance, I would like the windows to only do this once when the window is first loaded.

What I found is that template parameters on the outer most template retain their values just fine as I move between windows. Nested templates within that template, however, lose their values when I navigate away from a window and then back to it.

The attached simple project illustrates what I am seeing. The Populate flag on the outer template triggers a property change event script which sets the values in the templates. The property change is triggered by the internalFrameOpened event on Window 2 which sets the Populate flag on the template. I have found for whatever reason (another bug maybe?) that by clearing the Populate flag on the internalFrameActived event, the property change is only triggered the first time the window is loaded. If i don’t do this, the property change will fire every time the window is shown or gains focus.
Testing (2013-04-12).proj (17.6 KB)

Important details I forgot to mention…

I am seeing this using Ignition 7.5.4 with Java 6 Update 27.

Thank you for the test case project, it demonstrated what you’re talking about nicely.

Unfortunately, this behavior is just how the template system works.

Templates are loaded whenever a window is opened (or re-opened), and discarded when the window is closed.

The outermost template retains its parameter values because it’s holding container is retained when the window is closed and opened. However, the inner template that resides inside the other template loses its param values because its holding container, which was inside the outer template, has been lost because the outer template was discarded and re-loaded.

You’ll have to work around this behavior by making sure to initialize template parameters via bindings or on-activate scripts.