on 09-13-2011 12:30 PM
Hi Experts,
I used LinkToAction element for image action click instead of button. Here I need to disable based on condition.
I know how to disable button using CL_WD_BUTTON, in similar manner, is there a way to disable LinkToAction?
Please advice the solution how to disable LinkToAction?
Advance Thanks,
BBC
Hi Achari,
You can do this like other UI elements.
You can create attribute of type WDY_BOOLEAN say DISABLE and bind this to linktoaction enabled property.
Based on condition use set attribute pass abap_false to disable.
For ex : IF < >.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->Element_context.
DATA lv_enable TYPE wd_this->Element_context-enable.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* set single attribute
lo_el_context->set_attribute(
name = `ENABLE`
value = ABAP_FALSE ).
Cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello BBC,
if you want to do it via code then you can use CL_WD_LINK_TO_ACTION->SET_ENABLED method. alternatively you can create a context attribute of type boolean and bind it to the enabled property of LinkToAction. then you can enable or disable the Linktoaction ui element by simply setting the context attribute to abap_true or abap_false.
BR, Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.