cancel
Showing results for 
Search instead for 
Did you mean: 

webdynrpo mobile visibility context

Former Member
0 Kudos

Hi,

I am trying to bind the visibility attribute to context com.sap.ide.webdynpro.uielementdefinitions.Visibility value attribute.

But i am not able to set the same in the implmentation as i dont have access to WDVisibility class and its referenced constants like WDVisibility.NONE,WDVisibility.BLANK, WDVisibility.VISIBLE.

Can someone please tell me how do u solve this problem.

Thanks

Srikumar V

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srikumar,

The thread describes about WdVisibility

Regards,

Sri

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this code,

You can create a context attributes of type "WDVISIBILITY" for different tables and on click on the buttons you can make others visible or none by using

wdContext.currentContextElement().set<TABLE1VISIBLE>(WDVISIBILITY.NONE)

wdContext.currentContextElement().set<TABLE1VISIBLE1>(WDVISIBILITY.VISIBLE)

Regards,

Sunaina Reddy T

Former Member
0 Kudos

Sorry , mymistake. i am using webdynpro for handhelds. and uses string , i have bounded the context visibility to uidefinitions.Visibility itself.

In the implementing code based on certain conditions i set the value to visible as follows. But still i am not able to see the element. Basically the following code is executed onSelect Action of a dropdown .

But if i access the element in modifyview and setVisibility of the element true in the modify view it works.

But not while setting it using the context. Can you please advice.

public void onActionOnChange (Event wdEvent) {

//@@begin onActionOnChange(ServerEvent)

if(wdContext.currentContextElement().getCustomerNumber()!=null)

{

if(wdContext.currentContextElement().getCustomerNumber().equalsIgnoreCase("Cust2"))

{

System.out.println("value" + wdContext.currentContextElement().getOrderListTableVisibility());

wdContext.currentContextElement().setOrderListTableVisibility("visible");

System.out.println("value" + wdContext.currentContextElement().getOrderListTableVisibility());

}

else

{

wdContext.currentContextElement().setOrderListTableVisibility("blank");

}

}

//@@end

}

0 Kudos

Hi,

In handheld instead of saying only "visible", or WDVisibility you should you :

wdContext.currentContextElement().setvisi(Visibility.BLANK); or

wdContext.currentContextElement().setvisi(Visibility.VISIBLE);

Also put the visible on the WDinit and then try.

Regards,

Narayani

0 Kudos

Hi,

Are you using Mobile Application for Laptops?

If yes then do the following:

In the context create an attribute of type :

com.sap.ide.webdynpro.uielementdefinitions.Visibility

Then assign this attribute to the Visibility property of the UI element.

Now when you can say something like this:

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

Regards,

Narayani