on 05-30-2008 6:10 AM
Hi All,
My aim is when i click a button other button has to appear and the button which i clicked should be disappered(not disabled but hide).Can anybody give an idea or a sample code for this requirement.
Thanks in advance...
Edited by: srilalitha yerramsetti on May 30, 2008 7:11 AM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1. Create the 2 buttons in the layout.
2. Then define a context node with cardinality 0..1, with two attributes of type WDY_BOOLEAN, say BUTTON1, BUTTON2. Set the default value of the attribute BUTTON1 to 'X', since you wnat this button to be visible first.
3. Now, bind the visiblity property of the 2 buttons in the layout to the 2 attributes created in (2).
4. Define an event handler for the onClick event of BUTTON 1. In this event handler, bind the attributes BUTTON1 and BUTTON2 to INITIAL and 'X' respectively. You will get the desired result.
Regards
Wenonah
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.