I have a view which contains (among other things), two embedded views. I will refer to the view as the "host" view for lack of a better term. The first embedded view has in it a tab container, and an output parameter called currentTab
. The output parameter is bound to the currentTabIndex
of the tab container, so that whenever I embed the view, the currently selected tab index of the embedded view is accessible to the view into which it is embedded.
My second embedded view should only appear when (a) an input parameter to the host view showSecondView
is true
, and when the first embedded view is currently displaying Tab 0. To this end, I have an expression binding on the display
property of the second embedded view:
{view.params.showSecondView} && {/root/EmbeddedViews/EmbeddedView1.props.params.currentTab} = 0
Thus, when tab zero is selected in the first embedded view, I should get a zero at the currentTab
output parameter, and my expression binding should evaluate to true (provided the showSecondView
parameter is also true).
At runtime, the host view is displayed in the form of an onDemand dock. I have a little icon with an Open Dock event associated with it, and when I click it, the view appears with the first embedded view showing tab zero. However, the second embedded view does not show up.
When I click to a different tab, and then back to tab zero, it shows up.
It's as if the output parameter is not populated until the tab is changed, so I added two things to my host view to troubleshoot:
- A numeric indicator bound to
{/root/EmbeddedViews/EmbeddedView1.props.params.currentTab}
- A checkbox with the checked parameter bound to the expression
{/root/EmbeddedViews/EmbeddedView1.props.params.currentTab} = 0
The first one (numeric indicator) indicates zero straight away, as you'd expect.
The second one (checkbox) should show up checked straight away, since the numeric indicator has confirmed that the value of {/root/EmbeddedViews/EmbeddedView1.props.params.currentTab}
is indeed zero, and it's expression is simply {/root/EmbeddedViews/EmbeddedView1.props.params.currentTab} = 0
- but it doesn't. It starts unchecked, and when I switch to another tab and back again, it then shows up checked.
How can I troubleshoot this?