cancel
Showing results for 
Search instead for 
Did you mean: 

to clear the selected list items and the selected radio button 2 refresh

Former Member
0 Kudos

Hi,

When i refresh the view, I want to clear the selected items in the list box and the selected radio button and check box. How do I do it?

Thanks and Regards

Tenzin

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

set_selected(abap_false) i used for check box and set_lead_selection_index ( index = 1 ) for the radio button.

Former Member
0 Kudos

hi,

May be this link helps you :

Thanx.

Former Member
0 Kudos

hi,

->do you want to refresh your view on pressing F5 or on Action of some button.

-> If you want to refresh using button , then you can use Exit Plug in your window.

-> Add outbound plug to the window of type Exit.

-> Add a Parameter to this Plug. URL of type String.

-> Now add the Component Name in the Properties Tab of View ( othervs Calling Outbound plug of win from view wont b psbl).

Write Below mentioned Code :

DATA lo_zexit TYPE REF TO ig_zexit . <Replace Zexit with your comp name>

lo_zexit = wd_this->get_zexit_ctr( ).

lo_zexit->fire_out_window_plg(

url = 'http://www.google.com' < Give your application URL> " string

).

<You can get this code using Code Wizard too( control + F7)>

With this you will again come to original state of View.

Thanx.

arjun_thakur
Active Contributor
0 Kudos

Hi Tenzin,

When we use the broswer refresh button (F5) all the selection (list box, check box) comes to the initial state i.e in the state in which the application was initially displayed. Is this not happening for you?

Regards

Arjun

Former Member
0 Kudos

Hi Arjun,

The f5 refresh button is working fine. but when i am going to a different link and then clickin this link again, I need to refresh it. so i am calling a refresh( ) method in my program, and clearing all the fields but i dont know how to remove these selected items, radio button and clear the check boxes as we have after init( ) method.

Thanks and Regards

Tenzin

abhimanyu_lagishetti7
Active Contributor
0 Kudos

LR_RRITM = WD_CONTEXT->GET_CHILD_NODE( IG_COMPONENTCONTROLLER=>WDCTX_RRITM ).

LT_RRITM = LR_RRITM->GET_ELEMENTS( ).

LOOP AT LT_RRITM INTO LS_RRITM.

IF LS_RRITM->IS_SELECTED( ) EQ ABAP_TRUE.

LS_RRITM->SET_SELECTED( ABAP_FALSE ).

ENDIF.

LS_RRITM->SET_ATTRIBUTE( NAME = '<CHECK BOX BINDED FIELD>' VALUE = ABAP_FALSE ).

ENDLOOP.

loop through the lements of the node and use SET_SELECTED method to deselect it.

LR_RRITM is my node reference, ls_rritm is context element type and lt_rritm is of type

WDR_CONTEXT_ELEMENT_SET

Abhi

Former Member
0 Kudos

Hi,

This worked for my item list box but am not able to use for the check box and the radio button. Acutally i ddint get the statement give just before the endloop.

Can you be more specific with it.

Thanks and Regards

Tenzin

abhimanyu_lagishetti7
Active Contributor
0 Kudos

It is just, clearing the context attribute value which is bound to your checkbox or radio button.

if your context attribute which is bound to check box is directly under root context node, you can use

wd_context->set_attribute( name = '<attribute name bound to your check box uielement>'

value = abap_false ).

Instead puting the stmt in loop , put it outside the loop.

Abhi