on 05-07-2007 10:28 AM
Hi Frnds,
how can we change a binding of a UI element at runtime. I guess method is REPLACE_PROPERTY_BINDING of CL_WD_UIELEMENT. Does anyone have any example for this..
Thanks
Anuj
Interesting Topic, Thanks for sharing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anuj,
Check out these standard examples,
WDR_TEST_DYNAMIC ,WDR_TEST_DYNAMIC1 upto 4.
This will definitely help you.
Hope this will work!!!
Cheers,
Darshna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anuj,
You can find the example of dynamically changing the text of the label in the below link:
<a href="/people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements:///people/thomas.szcs/blog/2006/02/22/dynamic-programming-in-web-dynpro-abap--part-iii-aggregations-and-ddic-binding-of-viewelements
Best regards,
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anuj,
the method REPLACE_PROPERTY_BINDING has 4 parameters ie 3 Importing and 1 Returning.
OLD_BINDING : Pass the current binding information. This information you will get from the wizard ie Elem_****
PATH : Just pass the attrubute path for which element you want to get it. this also can get through wizard. Here access the new context element.
BINDING_TYPE: CO_ATTRIBUTE_BINDING( Attribute Binding),
CO_NODE_BINDING(Node Binding)
CO_MULTI_ATTRIBUTE_BINDING(Multiple Attribute Binding)
CO_MULTI_NODERANGE_BINDING(Multiple Node Range Binding)
Warm Regards,
Vijay
Hi Anuj.
Though I would reconsider the design, cause I do not think it is the best way to change bindings of UI elements to context nodes dynamically at runtime, you should take a look at these methods:
REMOVE__DDIC_BINDING
GET__DDIC_BINDING
SET__DDIC_BINDING
as the above mentioned method REPLACE_PROPERTY_BINDING is protected.
Hope this helps a bit.
Cheers,
Sascha
Message was edited by:
Sascha Dingeldey
Hello Anuj,
Please have a look at this weblog. In the lower area you find a description about how to bind attributes of view elements to the context dynamically.
<a href="/people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements:///people/thomas.szcs/blog/2006/01/03/dynamic-programming-in-web-dynpro-abap--part-ii-handling-viewelements
Best regards,
Thomas
Hi Sascha,
I dont think so that these method will help because UI element is not binded to any DDIC rather it is to a attribute which gives me a freely search help , but in a case if application is called from some other app i dont want to show that F4 help , thats why at runtime i want to change binding of a UI element's property. Also i think REPLACE PROPERTY BINDING will help but i am not sure how to pass old binding and new binding elements to it.
Any help...
Regards
Anuj
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.