on 05-10-2005 10:20 PM
Hi,
I was wondering how to disable group of UI elements in a view at runtime. Specially during the start of the webdynpro application. I know, I need to iterate through the UI elements and manipulate their enable property. Please advise how this can be done dynamically.
Thanks !
Sri
You do not need to iterate.
Bind the "enabled" property of all these UI elements to the same boolean context attribute and set the value of this context attribute as needed. (In many cases this will be a calculated attribute.)
Note that disabling a general container (IWDUIElementContainer subclasses) does not disable its children (by design)
For certain UI elements, e.g. IWDToolBar, disabling the element also disables its contained elements.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi srikanth,
You do one thing. Make one context attribute of type boolean in the same view. Then bind this same context attribute to all UI elements which need to be disabled. Then set its value to false in init method of the same view, if this view is the default view to load on screen. Otherwise write desable code in plugfrom method from where this page is loaded.
Afterwords you can change this property as you required.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would suggest you to do it using the context attribute mapped to the enabled property of the UI elements. You can also do the disabling of the UI elements in the WDDoModify() also by getting a handle for the required element and setting the enabled property to true or false.
ie. view.getElement(<element name>);
However doing it using the context attribute would be more advisable.
Regards
Noufal
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.