cancel
Showing results for 
Search instead for 
Did you mean: 

Control the visibility of UI elements that belongs to different components.

Former Member
0 Kudos

Hello All,

Can someone advise on what must be done to achieve the below scenario :

1) I have a viewset that embeds 2 views belonging to 2 different components.

2) In view A, should the user makes a selection from a dropdown list box, the selection will decide the visibility of another UI that belongs to View B in the second component .

How should I pass this visible parameters across two components ? I will that it may involve the interface controller and component controller as well ?

Thank you very much.

from

Kwok Wei

Message was edited by: Armin Reichert

(Marked as question)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

1. In interface controller of component A create node "Output" (cardinality 1..1, selection 1..1) with attribute ShowDependedContent of DDIC type Visibility

2. In interface controller of component B create node "Input" (cardinality 1..1, selection 1..1) with attribute ShowDependedContent of DDIC type Visibility, <b>and mark the node as input</b> -- select isInputElement="true" in node properties.

3. Next, in component that embedds A & B you should have 2 component usages already. Now open usage of B, and add as required controller usage of A. Then map context nodes.

VS

Former Member
0 Kudos

Hello VS,

Can you kindly elaborate more by what you meant "and mark the node as input" ? Is this to make it easier to understand or NDS requires it to be this way ?

from

KW

Former Member
0 Kudos

Another question VS, does it have to be nodes or can I use vauale attributes like what I have been using in my test cases ?

from

KW

Former Member
0 Kudos

For context nodes of Component Interface Controller there is one additional property (alogn with regular ones like cardinality, selection etc). This property named "isInputElement". Just set it to "true" for dependend component.

VS

Former Member
0 Kudos

Hi,

When you are sending values across components the node property isInputElement has to be set to true.

It is necessary that it should be under a node

Regrds

Bharathwaj

Former Member
0 Kudos

hello,

as far as i could understand u need to control the visibility of a UIE in View2 depending on dropdown entry. i think u can use a variable of type Visibility and map it to the visibility property of the UIE in View2. create a variable of type Visibility in both controllers and map it across the controllers. now in the onselect of the dropdown change the visibility as per ur requirment. add the first component in components used of second component.

regards,

Piyush.

Former Member
0 Kudos

Hello Piyush,

That exactly what I want to do. Does it involes the interface and component controller as well ?

from

KW

Former Member
0 Kudos

Hi Kwok,

When the view s are in a single component it is fine.. since the views are in different components we cant simply map it across controllers. The only way to access is through the interface controller and the conditions for it to be accessible are

1.It should be under a node

2.The node should have the property isInputElement set to true.

then you can map this interface controller to the child components component controller-> map this to the child view where visibility has to be set..

Bharathwaj

Former Member
0 Kudos

Hello All,

So based on Bharathwaj descriptions "the only way to access is through the interface controller", I will need to create a data link from the view to the interface controller in the data modeller ?

from

kw

Former Member
0 Kudos

Hi ,

Yes .. Thats the only way to share data across components..

Former Member
0 Kudos

Hi,

If u want to pass the values or any thing between two views within the same component, u need component controller or custom controller(both are the same) and if u need to pass between views of two different components then it should be through an interface controller.

And i think ur scenario is between components so u need to use interface controller.

Regards,

Sirisha.

Former Member
0 Kudos

Thanks Sirisha.

Based on the info that I have gathered by the replies from the great ppl here, I believe the interface controller is required in my scenario since info is passed between 2 component.

Former Member
0 Kudos

Hi Kwok,

so can u please close the question...

Regards,

Sirisha

Answers (0)