cancel
Showing results for 
Search instead for 
Did you mean: 

How can i use visible property

Former Member
0 Kudos

I want to display some components in some specified actions. how can i handle visibility of a component dynamically.

regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Naga,

1) Under your context, create attributes of type "visbility". (create an attribute and change it's type to Local Dictionary -> com.sap.ide.webdynpro.uielementdefinitions->Visibilty)

2) Bind the Visbility property of the required UI element to this attribute.

3) When required chnage the visbilty as below:

WDContext.currentContextElement().set<attribute name>(WDVISIBILTY.VISBILE);

/* Makes the UI element visible */

WDContext.currentContextElement().set<attribute name>(WDVISIBILTY.BLANK)

/* Makes the UI element invisbile , but it takes up the space on the screen */

WDContext.currentContextElement().set<attribute name>(WDVISIBILTY.NONE)

/* Makes it invisible and doesn't take up space too */

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

hi nibu,

Thanks alot for your answer

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can make use of LifeCycle property of a component.

While adding the components in the used components you can specify the lifecycle. Set the property to "CreateOnDemand" so that you can control the creation of the component.

Regards, Anilkumar

Former Member
0 Kudos

I really didn't understand what you meant by <i>VISIBILITY</i> of a component. However, if you want to control the lifecycle of a component then, you may do that by using the <i>"Life Cycle"</i> property of a Used Component. You may set it to <i>"Create on demand"</i>(default/automatic control over the lifecycle -- taken care by WDruntime) or <i>"Manual"</i>(To create and destroy manually).

Bala

Former Member
0 Kudos

Hi Anil & Bala,

In My Form as i click a button a input field is to be visible.so how can i handle the inputfiled proerty visible in webdynpro