cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the visibility-property (NW2004s SP9)

0 Kudos

Hello,

I have a problem with the visibility property. I need a transparent container to be displayed or hidden. So I created a context attribute of type WDVisibility (com.sap.tc.webdynpro.progmodel.api.WDVisibility), but I'm not able to bind it to my TransparentContainer. The DevStudio asks for an attribute of type "Visibility", not "WDVisibility". I've tried to create a group, just for testing, and I have exactly the same problem.

Any ideas?

Regards, Nils.

PS: We have NW2004s SP9.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use the context attribute of type com.sap.ide.webdynpro.uielementdefinitions.Visibility

to make it visible or invisible you can set the value if needed like the below..

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

Regards

AM

0 Kudos

Hi,

this solved my problem. The web dynpro help doens't say to use com.sap.ide.webdynpro.uielementdefinitions.Visibility. It tells to use WDVisibility which seems not to be the best answer

Thanks, Nils.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nils,

If you want your container to be displayed or hidden you need to create a context attribute of type : <b>com.sap.ide.webdynpro.uielementdefinitions.Visibility</b>.

Create context attribute then go to properties -> select the type as vIsibility(Go to Local Dictionlary -> select tha package "com.sap.ide.webdynpro.uielementdefinitions" -> select the type as Visibility -> Ok )

Now go to properties of Transparent Container and set the <b>visible </b>property to the context attribute you have created.

Finally depending on the condition you can set the Visible property:

if(cond)

wdContext.currentContextElement().set<contextAttribute>(WDVisibility.NONE);

else

wdContext.currentContextElement().set<contextAttribute>(WDVisibility.VISIBLE);

This solves your problem.

Regards,

Jhansi

Former Member
0 Kudos

Hi,

Use "com.sap.ide.webdynpro.uielementdefinitions.Visibility" from the Local Dictionary instead of "com.sap.tc.webdynpro.progmodel.api.WDVisibility".

Regards,

Satyajit.