Hello Dojo Community,
I am working on a Visio file for a DataMiner service in which I am trying to make efficient reuse of pages to display the same information for different elements of the same type within the service. Imagine a service includes 4 "encoder" elements (e.g. a main and backup in two sites). For each encoder element I need to display 4 different pages (an "overview" page and three other pages with detailed status and configuration information).
I could off course duplicate all Visio pages (16 pages in total) and link them to the correct element within the service. What I am trying to accomplish however is to use the same four (child) pages and dynamically link them the correct element using a variable depending on the parent page.
Here is what I have:
I have a "parent" page for each encoder element.
That page only has one "VdxPage" shape with a TabControlStyle Option that shows the child subpages in different tabs (Overview | Status | ...)
On page level I have an "Execute" statement that sets a PageVariable "PreEncElement" to the correct value (alias of the corresponding encoder element within the service). Additionally i have the "ExecuteSetsOnInit" Option page level as well
On the child or inner page I currently have the following page level shape data:
It initializes a new variable "selectedpenc" to the value of the variable initialized on the parent page.
And I link the actual shapes on this child page to the local variable.
What I see however is that the different parent pages for the different encoders (linked to the same child pages) are showing the same information even when changing page from "encoder 1" to "encoder 2". So it looks like the variables are initialized correctly when clicking an encoder page the first. But when changing parent pages, the variables are not re-evaluated.
Any idea what I am overlooking? Is there a limitation that prevents this to work properly?
Thanks for your ideas and suggestions.
Putting this in an answer as formatting will probably be important to understand my quite abstract explanation.
First of, I believe the outer "execute" should set a "Variable" and not a "PageVariable".
However, I don't believe that will resolve your issue. Here's what happens:
- The first time you select a tab A, the outer page will be initialized. This will trigger the execute sets on init, thus setting the variable "PreEncElement" to value "A".
- The inner execute will also trigger, thus setting the "selectedpenc" variable to value "A".
- Changing your tab selection to tab B will trigger your 2nd execute, changing the "PreEncElement" from "A" to "B".
- Step 2 is repeated for the new inner page, setting "selectedpenc" to "B".
- Switching back to tab A doesn't reinit the tab, so the ExecuteSetsOnInit doesn't trigger.
- The inner page has no separate page context so the variable is shared between the 2 tabs.
I'm currently not sure how to work around this though.
Hi Koen,
I don't see the page option pagevariable in your child element. Can you add it and see if that works?
Hi Jens,
On page level of the child page, the “Pagevariable” is used in the Execute shape data. In that case I don’t think the “pagevariable” option is needed on page level.
I tried anyway with that option and it doesn’t change anything.