cancel
Showing results for 
Search instead for 
Did you mean: 

how to use the visible property

former_member572327
Participant
0 Kudos

Hi all,

Im trying to implement the page(view)which has 3 trays.

Once the page is loaded ,I want to make only the first tray visible and other 2 trays should be invisible.

Based on the users input on the 1 st tray, the 2nd or 3rd tray shud get enabled and visible to the user.

Please let me know how to make the tray visibl after the user input.

Regards,

Nithya K

Accepted Solutions (1)

Accepted Solutions (1)

p330068
Active Contributor
0 Kudos

Hi Nithya,

Please create the context attribute for the visibilty type. Once context attribute created,

Select type <...> button >> Dictonary Simple Type >> Dictonary >> Local Dictonary >> type com.sap.ide.webdynpro.uielementdefinitions >> Visibility OR directly put type com.sap.ide.webdynpro.uielementdefinitions.Visibility

Then try to implement you logic for showing the 2nd or 3rd tray in the if loop. like

if (<condition true>)

wdContext.currentContextElement().set<your Attribute name>(WDVisibility.VISIBLE);

else

wdContext.currentContextElement().set<your Attribute name>(WDVisibility.NONE);

Then bind the visible properties in the Tray.

Hope it helps

Regards

Arun

Answers (3)

Answers (3)

chander_kararia4
Contributor
0 Kudos

Hi Nithya

The above stated methods are correct. Also, you may try to use frames/container for your tray2 & 3. This will act as same way as you may not need to seperately enable all the tray contents visibility. Simply, by enabling frame/container visibility you can achieve the desired req.

Best Regards

Chander Kararia

  1. If the query is resolved, make sure you mark the question as answered.

Former Member
0 Kudos

Hi,

use the visible property of the tray to hide it.

to achieve this take attribute assign simple type (VISIBILITY) to it and bind this attribute to tray visible property.

when ever you want to hide use the following code in implementation.

wdContext.current<Node Name>Element().set<Attribute Name>(WDVisibility.NONE) ;

if you want to make visible use this wdContext.current<Node Name>Element().set<Attribute Name>(WDVisibility.VISIBLE) ;

Regards,

ramesh

Former Member
0 Kudos

Hi,

Declare an attribute say Va_TrayVis.Define it to be of type Visibility (In Local Dictionary --> UI Element types).

Now you can set this as: wdContext.currentContextElement.setVa_TrayVis(WDVisibilty.Visible/None).

Bind the visible property of the Tray to this attribute.

Regards,

Himanshu