on 06-13-2007 4:19 AM
Hi Colleagues,
I have a requirement wherein i have to change a parent of a UI element GROUP to Transparent container , it is residing within Tray. I am using SET_PARENT from CL_WD_UIELEMENT but this method is executed successfully also but my view still remains the same and i cannot see parents changed in view.
Any idea.. do i need to refresh ,invalidate or anything else.. ?
Anuj
I guess you will want to trigger changing the parent element based on some action, say a button click. So in your event handler, you can set a context attribute 'change' to denote whether the parent needs to be changed or not. In the modifyview method, read this attribute, and based on the value, do the following:
data: lr_group type ref to cl_wd_group,
lr_tray type ref to cl_wd_tray,
lr_transp type ref to cl_wd_transparent_container.
lr_group ?= view->get_element( 'GROUP' ). "Replace with UI Element ID of group
lr_tray ?= view->get_element( 'TRAY' ). "Replace with UI Element ID of tray
lr_transp ?= view->get_element( 'TRANSP' ).
lr_tray->remove_child( 'GROUP' ).
lr_transp->add_child( lr_group ).
This code works, I have tried it. For some reason, unset parent and set parent do not reflect the changes in the view even though the attributes get changed. I dont know why that doesnt work. This method works though.
Hope this helps.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
good
go through these links,hope this ll help you to solve your probelm
http://help.sap.com/saphelp_erp2005/helpdata/en/66/18b44145143831e10000000a155106/content.htm
thanks
mrutyun^
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can get the reference of the group, do a remove_child first. Then get the reference of the Tray element, and do an add_child.
This should be done in the modifyview method.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.