cancel
Showing results for 
Search instead for 
Did you mean: 

set visibility of an ui element which is embedded in a ViewContainerUIEleme

Former Member
0 Kudos

Hallo,

i have a window W1 with a view V1. In this view i have a ViewContainerUIElement. I embedded a window W2 with a view V2 to the ViewContainerUIElement. Now i like to set the visibility of one uielement in my view V2 with the set_visible method of the uielement. The problem is that i can't get a reference to my view V2 and therefore to the element.

I do not like to create a method in my view V2 or do solve it with a context variable, which is binded to the visible property.

thanks in advance

Johann

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

>

> Hallo,

>

> i have a window W1 with a view V1. In this view i have a ViewContainerUIElement. I embedded a window W2 with a view V2 to the ViewContainerUIElement. Now i like to set the visibility of one uielement in my view V2 with the set_visible method of the uielement. The problem is that i can't get a reference to my view V2 and therefore to the element.

>

> I do not like to create a method in my view V2 or do solve it with a context variable, which is binded to the visible property.

>

> thanks in advance

> Johann

Hi Johann,

The things you do not like to do are the right things to do :).

From V1 you only provide the container and V2 is outside its reach to control from V1 the way you would like to do. I am not sure if you can get view_usage_info from the V1 and then further get the view-v2 and drill down to the UI elements.

all other other options are come down to context mapping,attribute binding ,UI binding etc.

good luck

0 Kudos

Hello Baskaran,

thank you for your help.

I played a little with "view_usage_info" but I do not solve it. I get references of type IF_WD_RR_VIEW_USAGE or IF_WD_RR_VIEW_CNT_ASSIGNMENT but not a reference to View V2.

Therefore I deside to solve it with a method in V2 - as you wrote it is anyway the better solution.

Johann

Former Member
0 Kudos

> Hello Baskaran,

>

> thank you for your help.

>

> I played a little with "view_usage_info" but I do not solve it. I get references of type IF_WD_RR_VIEW_USAGE or IF_WD_RR_VIEW_CNT_ASSIGNMENT but not a reference to View V2.

>

> Therefore I deside to solve it with a method in V2 - as you wrote it is anyway the better solution.

>

> Johann

Hallo Johann,

i am not sure if you have tried GET_VIEW_USAGE_FOR_VIEW method of IF_WD_RR_VIEW_CNT_ASSIGNMENT which would return the view_usage of embedding view.

Anyway , you decided to follow the right way with a method in V2