on 05-02-2015 4:00 AM
Is there a way to recursively get all elements inside the root element of a web dynpro (java) view?
For each child element found, i would like to read/modify properties at runtime.
Hello Roberto,
there is a method which contains a reference to the view itself.
public static void wdDoModifyView(IPrivateDynamicView wdThis, IPrivateDynamicView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
Typically in WDP code if you want to create or modify elements dynamically you should access the com.sap.tc.webdynpro.progmodel.api.IWDView view wich has methods such as .getElement([ID]) removeElements(...) or similar methods. As far as I remember there should be also a method called getChildren(...) or something similar which returns a list with all elements which belongs to the current view.
Hope this info helps.
Best regards
Denitsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use MDM WD configurator and set property raise event =true for required fields.
Once you use debugger (*level=3 possibly) you can handle values of fields.
Check this link and let know
Regards,
Amey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Amey,
I'm already raising events for required fields.
Actually the problem is not related to the value of these fields, but other properties, like enabled, visible, and values of matchcode, for lookup fields.
MDM API provide methods to handle these properties, but for some situations it doesn't work. (for multi value tuple fields for example).
So in this case, i would like to change the behaviour of fields at runtime, without using MDM API.
Best regards,
Roberto.
You will have to use MDM API.. The link which I sent to you has this kinda runtime property handling.
why? can't u just bind those attributes to the context?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer Wu.
I can't bind attributes to the context beacuse these elements of the view are not visible at design time.
My screen is designed in SAP MDM Components. I just have a ViewContainerElement, wich is used by MDM to insert dynamically fields, labels and buttons at runtime.
Take a look at the MDM Component User Exits:
There you can use the "setFieldProperty" method to set visibility / read only etc.
Regards,
Tobias
Hello Roberto
Did you find any solution for the requirement you specified?? i am looking something similar where I have enabled Tray for search view from MDM std component..this tray by default is expanded where as I want to make it collapsed onload..
let me know if you found any solution to modify ui elements of view container.
Regards,
Priya
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.