on 05-29-2008 12:59 PM
In my application when i click on a button that button (clicked one) should be disappeared and a new one should be appeared . Any one help me regarding this issue.
Hi rahul,
simple one is to declare two attributes in the context of type wdy_boolean. bind the first attribute to the first button's visibility. likewise for the second.
On action of that first button, set the attribute of the visibility of the second button as abap_true and make the attribute of the visibility of the first button as abap_false.
Regards...
Arun.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
u can create two attrbutes of type wdui_visibility.
say visible_one and visible_two.
now bind the first attribute to the visible property of the first button and second attribute to the visible property of the second button.
In the context for first attribute give the default value has '02'.
so initially ur first button is visible and second one is invisible.
then when you click on the button. in the onaction method
set the value for the attributes as:
lo_el_element->set_attribute
visible_one = '01' " it makes it invisible"
and
lo_el_element->set_attribute
visible_two = '02' " it makes it visible"
regards
chythanya
hi rahul,
1) declare two attributes like visible1 and visible2 with type wdy_boolean in the context and make the the default value for visible1 as X.
2) bind these attributes to the visibility of the two buttons.
In properties u can find a visible property for the button.
3) On action of the first button, create a method.
In that one write this code.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_visible2 TYPE wd_this->element_context-visible2.
DATA lv_visible1 TYPE wd_this->element_context-visible1.
lo_el_context = wd_context->get_element( ).
lo_el_context->set_attribute( name = `VISIBLE2`
value = 'X' ).
lo_el_context->set_attribute( name = `VISIBLE1`
value = ' ' ).
Hope ur query is answered.
Regards...
Arun.
Hi,
u can create an attribute of type wdui_visibility and bind this attribute to the visibility property of the button.
on the action of the button(which is triggered on clicking the button), you can set the value for attribute as '02' which means visible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.