cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically changing attributes of a field in view container UI element

Former Member
0 Kudos

In the layout of the web dynpro component I have added a view container UI element. I am populating the fields in the view container UI element in methods in component controller using the following code

*--Adding a Checkbox

lv_str = wd_assist->if_wd_component_assistance~get_text( '009' ).

CALL METHOD wd_this->att_wd_handler->add_parameter_field

EXPORTING

i_id = 'CHB_DOWNLOAD_CHECKBOX'

i_description = lv_str

i_value = lv_chb_download_checkbox

i_as_checkbox = abap_true.

*--Adding a Parameter

lv_str = wd_assist->if_wd_component_assistance~get_text( '010' ).

CALL METHOD wd_this->att_wd_handler->add_parameter_field

EXPORTING

i_id = 'CHB_DOWNLOAD_PATH'

i_description = lv_str

i_value = lv_chb_download_path

i_as_checkbox = abap_false.

Now based on the checkbox selection I want to make the field CHB_DOWNLOAD_PATH mandatory and also on F4 for CHB_DOWNLOAD_PATH I want a method to be called. Where must i write the coding for the above conditions and how? Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Unable to do it in the container element so creted the checkbox in the layout and did the coding

Former Member
0 Kudos

hi

In your method there would be a parameter ie ON_TOGGLE where you can write the name of your event .

Whenever your checkbox will be clicked that event wil be called.

You can write your code in that event itself.

Regards

Kuldeep

Former Member
0 Kudos

I have written the coding for populating the checkbox and fields in component controller, where I have created the method fetch_sel (to fetch selection screen). I am unable to find the parameter ON_TOGGLE in the component controller methods as well as views methods. Should I create it or it will already be existing? If I have to create it, should I create it in the methods of the view or in methods of component controller? And what will be the associated type for creating it? Thanks.