cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting a attribute and a UI at runtime

Former Member
0 Kudos

Hi..

1.I am creating nodes and attributes at run time as shown below.

Root Node

|_ Child node

|_ attribute1

Plz help in deleting attribute1 at run time.

2. I am creating UI at runtime as shown below.

ROOTUIELEMENTCONTAINER

|_label

|_ Input_field

At runtime i like to delete both label as well as input field.

Plz help in both the scenarios.

Thanks

Vimalraj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi vimal..........

you can use remove_element in the class in the if_wd_context_node interface.

---regards,

alex b justin

Former Member
0 Kudos

Hi..

Thanks Alex.

When i delete a UI a element and try to add a new element, it is getting added at the bottom.

But I want at the same place. How can i do that. How to get the index of the UI element i m deleting?

So that i can add the elements at the same place.

Thanks.....

Former Member
0 Kudos

hi vimal........

you can use get_elements to get the index of all the elements...... then delete the required one.

get_meta_path also might help you

---regards,

alex b justin

Former Member
0 Kudos

Hi Alex..

For UI element i like to get the index.

How can i get?

Since what ever UI elements i add it appending at the bottom.

But i want to add at the same place, i deleted.

Thanks

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vimalraj Madhavan ,

at run time get focus to |_ Input_field using the methods of class cl_wd_input_field set the property enabled to false. same for label also.You can do this on odify view.

check this also

http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm

Regards

Sarath

Edited by: Sarath Satheesan on Jan 24, 2008 11:54 AM

Former Member
0 Kudos

hi,

But still the attribute and the UI exist in that place. But I dont want it to be there.

Thanks

Former Member
0 Kudos

Vimalraj Madhavan ,

use the method of the same class and make the visibility property as false. some method like set visibility is there for both input filed and label.

Regards

Sarath