cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable a table UI element of Webdynpro for java

Former Member
0 Kudos

Hi friends,

I am having the following scenario regarding the table element.

I am having two buttons "createTask" and "EditTask" . in taskView

when i click the the create button the table should not visble and on click of the EditTask button the table has to visible with filled rows.

please help ful regarding the same ASAP.

thanks and regards

Ratnakar reddy

Accepted Solutions (1)

Accepted Solutions (1)

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

1)Create 1 context variable say TabVisible of type WDVisibility

(com.sap.ide.webdynpro.uielementdefinitions.Visibility) in the dataTypr property of context attribute click on search icon->Dictionary Simple type->Local dicntionary->com.sap.ide.webdynpro.uielementdefinitions->Visiblity

2)Bind the Visible property of Table UI Element to this attribute.

3)Craete 2 actions , bind one to CreateTast button's OnAction and other to EditTask button's OnAction.

4)so in the action of CraeteTask, write code:

wdContext.currentContextElement.setTabVisibile(WDVisibility.NONE);

5)in action of EditTask:

wdContext.currentContextElement.setTabVisibile(WDVisibility.NONE);

hope it helps

regards

Former Member
0 Kudos

Hi abhijeet,

thanks for the immediate reply . i am struck with the second step . how to bind the attribute to the table visibiltiy property . itis not allowing. can you please give little more explanations.

what is WDVisibiltiy , is there any property type.

thanks and regards

Ratnakar

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

have you created the value attribute with data type Visibility ?

if yes then, goto the table you have created , go to its properties, find the property Visible, search here the value attribute tabVisible, select that .

then follow rest of the steps

let me knw if you face any problem

regards

Former Member
0 Kudos

Hi Abhijeet,

I created the value attribute in local dictionary of type visibility.But the problem what i am facing is i can not able to bind the value attribute to the table property visibile. becasue it is a dropdown na , not allowing in the layout property.

how can i bind ,,,can i bind in the coding or at Layout place..

thnaks and regards

Ratnakar

abhijeet_mukkawar
Active Contributor
0 Kudos

Ratnakar,

select Layout tab, goto to Outline View, select you Table , then come to property View(Just beside Outline VIew), here Locate Visible property(you will see 2 buttons against this property so click the 2nd one, one with '...')

it will open new window , in this window you will see your context attribute, choose that ,

and follow rest of the process

let me know if you still face any problem

regards

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi

have you solved your problem?

regards

Former Member
0 Kudos

Hi Abhijeet,

I followed all the steps which you suggested.but the problem is at the time of binding the visibile property of table with the context attribute .

first i created the simple attribute of type visibility in the local dictionary and then created a context attribute in the view and bind the property of context attribute with local dictionary's visibility attribute which i have created in first step .

But i am not able to select the context attribute because it is asking like selecte the attribute type Vibsibility.

here only i am basically getting strucked

thanks and regards

Ratnakar

Ronib
Participant
0 Kudos

create value attribute in the view context, set its type by click on button "..." and open the <b>local dictionary</b> in the node om.sap.ide.webdynpro.uielementdefenition

and choose visibility from there.

dont choose the type from java native type!

in the layout , open your element properties and click on button "..." near the visible property. the context screen should appear and you can choose your value attribute.

In the code try

<i>wdContext.currentContextElement().setUiVis(WDVisibility.NONE);</i>

or

<i>wdContext.currentContextElement().setUiVis(WDVisibility.VISIBLE);</i>

Former Member
0 Kudos

Hi Abhijeet ,

Thansk allot for your help..

regards

Ratnakar

Answers (0)