cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Setting visibility on UI Elements in different views

Former Member
0 Likes
373

Hey!

I got to Views viewA og and viewB.

Between viewA and viewB i have a fireplug.

And in viewB there are some buttons (button1, button2).

Depending on what is choosen in viewA I want to set visibility to 'none' on button1 or button2 in the onActionGoToViewB.

The UI elements (inluded the button) is created with the "Layout" tool in Web Dynpro..

Can someone help me control the visibility true the code?

View Entire Topic
Former Member
0 Likes

Hi,

Follow tyhis steps to achieve ur scenario.

1) Create 2 views. View A and View B.

2) In view B lets say u have one button.

3) create a context in view B of type com.sap.ide.webdynpro.uielementdefenitions-->visibility.

4) click on the button properties.Set the visible property to the context that was created.

5) create another context att in view A of same visibility type.

6) Map the con att of view B to View A through comp.ctrller.

7) In the on action of the view A,set the visibility accordingly for the btn in view B.

Visibility can be set by the following codes,

wdcontext.currentcontextalment.set<att>(wdvisibility.none) or (wdvisibility.visible)

Hope it helps,

Regards,

Nagarajan.

Former Member
0 Likes

Thanx man!

this really helped me out.

I tried what you said, and it works perfect!

i got another question too, but i'll open up a new thread.

Thanks again!