on 2009 Sep 10 1:58 PM
I have a Webdynpro screen, where all INPUT fields are displayed in Enabled mode. Based on the user Action condition, some of the INPUT fields needs to be DISABLED (Not Invisible). How to achieve it?
Thanks,
Padma
Edited by: Padmashree RamMaghenthar on Sep 10, 2009 6:29 PM
Hi,
create a context attribute of type wdy_boolean. now bind the visibility property of the input field with this attribute.
wherever you want to make it disabled just set the attribute value as ' '. it will diable i.e make your input field invisible.
regards,
anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Thread Closed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Create a context attribute of type wdy_boolean with the name say "Field_enable"
2. Bind this attribute to the input field's property "enabled" in the view.
3. initialize this variable to abap_true in the wddoinit of the controller or view with the following code
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_field_enable TYPE wd_this->element_context-field_enable.
get element via lead selection
lo_el_context = wd_context->get_element( ).
fill attribute
lv_field_enable = abap_true.
set single attribute
lo_el_context->set_attribute(
name = `FIELD_ENABLE`
value = lv_field_enable ).
4. select the action on which you need to disable the fields and write the following code
get element via lead selection
lo_el_context = wd_context->get_element( ).
fill attribute
lv_field_enable = abap_false.
set single attribute
lo_el_context->set_attribute(
name = `FIELD_ENABLE`
value = lv_field_enable ).
5. If you want to make it invisible or visible use the above method with the view element property visible instead of "enabled"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Bind the enable property of the Input field to the Attribute of type Boolean.
Now when u want the input field enable then set the attribute's value as 'X'.
otherwise set its value as ' '.
Regards,
Pankaj Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create a context attribute of type WDY_Boolean and bind it with the read only property of your input field. When You want to disable it, Set this attribute as true.
I Hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
11 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.