cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro disable UI element during runtime

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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