cancel
Showing results for 
Search instead for 
Did you mean: 

WDVisibility, DoInit(), only one View can be set BLANK

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hy,

thx for your reply. It was very helpfull- Now i have in and outbound plugs an fire it on a button click to set the corresponding view visible.

Thx a lot

regards micha

Former Member
0 Kudos

Hy,

in this case I have an other question.

I have implemented navigation links to my views. If I click on an button I fire a plug to the next view BUT the UI Elemnts a disabled in this view? What happens and what can i do?

Regards and thx

Micha

Former Member
0 Kudos

Maybe the context node against which these UI elements are bound is empty? In that case the framework disables these UI elements automatically.

Armin

Former Member
0 Kudos

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

Former Member
0 Kudos

Hy,

I have found the error.... the cardinality of the bound UI value property I have to set to 1..n... I tink I have to read more about this cardinality and its function..

regards

Micha

Former Member
0 Kudos

The cardinality defines how many elements a context node may contain. If you set the cardinality to 1:* the framework automatically supplies a context element.

The selection cardinality defines how many elements of a context node may be selected.

Armin

Former Member
0 Kudos

thx.. there is a deference... but 0..n seems to be the easiest one? Why works 1..n but nut 0..n?

Former Member
0 Kudos

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

Former Member
0 Kudos

ahhh ok... thx for the description.

Answers (0)