on 11-23-2009 7:00 AM
Hello,
i have have the following problem.
I have an ViewContainer with 3 Views. In the DoInit - Method of the first VC i want to set the other two VC to WDVisibility.BLANK.
(the is bound in the context) For the first VC it works fine, but the second ist still there? Not BLANK? WHY?
wdThis.wdGetContext().currentVisiblesElement().setVisibleVC_search(WDVisibility.BLANK);
wdThis.wdGetContext().currentVisiblesElement().setVisibleVC_admin(WDVisibility.BLANK);
The cardinality property in the ComponentControler for the corresponding context is 1..n.
thx
regards Micha
Hi Michael
The more correct way to hide the whole View is "to navigate away from it".
- Ensure that property Default=FALSE for the two views in ViewContainer. Not default views will not be shown initially.
- Establish navigation links to the two views in order to activate them when you need them.
- When you need to activate (show) the two views - in the source code fire the navigation plug from some DispatcherView (this can be the first view which is always visible) to the hidden views.
BR, Siarhei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Once you navigate to a viewset, only those views within would be visible whose DEFAULT property is true. Rest of the views would get visible/activated once you have fired the outbound plug of the any visible view to the inbound plug of the view desired to be visible/activated.
Unless until the inbound plug of view in viewset is fired, the context will not get initialized/activated. So, in case you are creating any node there in the init of the other view. Init() wont be called unless the inbound plug is fired for the first time.
Also check all the nodes bound to the UI element have size greater than zero.
Regards,
Tushar Sinha
Cardinality 0..n means the node can have zero to n no. of elements.
If you have cardinality 0..n then if the node is without any element, then the UI bound to the node attribute would be disabled as there is no active element in the node as current element. If cardinality is made 1..n the the node need to have at least one element. If you have not created any, then it will supply one of its own and points it as current element but with null values. So, the node remains active and the UI enabled.
Regards,
Tushar SInha
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.