cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the view element visibility Dynamically?

Former Member
0 Kudos

Hi,

Can any one please suggest that how can I make one of the viewUIElements from the view, visible on the whole screen? Basically i want to make the data in the table, available for printing. I want when user clicks on the print button, he should see only the data in the table on the whole screen and some icons, nothing else. Again when he clicks one back button icon on the screen, he should return to the previous view.

Thanks and Regards,

Smriti

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

<b>Hi smriti Behl

I Think you can get something from the below explanation

Create one UI Element For example "Visible" and make the type as

com.sap.ide.webdynpro.uielementdefinitions.Visibility

.

Now bind this Context Value with the UI Elements ie UI elements which you want to make Not Visible When you click Print Button. You can write the Following Code inside the print button

wdContext.currentContextElement().setVisible(WDVisibility.NONE);

When you want to make the UI Elements Visble When Click Back Button Write Following code In side Back Buuton Method

wdContext.currentContextElement().setVisiblity(WDVisibility.VISIBLE);

May i Know Your Problem Solved ..............

Regards

Chandran S</b>

Former Member
0 Kudos

HI,

create a context attribute of type <b>com.sap.ide.webdynpro.uielementdefinitions.Visibility</b>. bind the required UI elements visibility property to this context attribute. now whenever required just set the value of the context attribute as VISIBILITY.NONE. it'll autometically set the visibility of the UI element.

Regards

TFG - Anirban

former_member186016
Active Contributor
0 Kudos

With most of the UI elements you will find a attribute visibility.

If you click on UI element in the View Designer, you will see corressponding properties in the properties view. You will one propoerty as visibility.

You can bind this to some attribute of type VISIBILITY.

Later you can set this attribute to VISIBILITY.NONE, etc to make invisible or visible.

The UI element will behave accordingly.

Regards,

Ashwani Kr Sharma