on 01-16-2009 11:31 AM
Hi all,
I seem to be having no luck with this problem. I have searched enough, and not come across any relevant documentation either.
I am using a select options field made as a dropdown and am populating the dropdown values using the Value Set where i can provide a table of key values versus descriptions. Additionaly, I have hidden the standard buttons -- CANCEL, CHECK, RESET, EXECUTE.
This appears exactly like a dropdown, just as desired.
However, no event seems to be triggered whenever I select any value from this dropdown field.
The interface controller of the select-options component offers 5 events and I have tried creating event handlers for all of these; with no success. With no event to track, I am frozen.
I know I may be able to create such a dropdown list without using select-options either; but the point is if this functionality is provided by select-options, there should be a way of using it.
I have browsed through the helper class as well as the interface controller, but am not getting a clue.
The bottomline is, with my current situation, how can i track the on-click or on-change kind of event?
Could anybody melt the ice?
Thanks.
I went to the source code of the select-options class (CL_WDR_SELECT_OPTIONS) and found the method where the UI elements are rendered (RENDER_SELECTION_SCREEN_ITEM). In the spot where the DDLB is rendered, there is simply no code to register any events for the DDLB. So it doesn't appear that there is any intention to allow you to handle such events from the DDLB.
=> add the dropdown as dropdownbykey
prefix_id mc_dropdown_id i_field-m_id id.
concatenate i_field-m_id '.VALUE' into path.
lr_dropdown = cl_wd_dropdown_by_key=>new_dropdown_by_key(
id = id
bind_selected_key = path
read_only = i_field-m_read_only
state = state
explanation = i_field-m_explanation
tooltip = i_field-m_tooltip
view = lr_cur_container->view ).
lr_label_low->set_label_for( id ).
lr_matrix_data = cl_wd_matrix_data=>new_matrix_data( element = lr_dropdown width = '1%' ).
lr_dropdown->set_layout_data( lr_matrix_data ).
lr_cur_container->add_child( lr_dropdown ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Thanks for the answer with the justification.
I found what you said to be correct, but then I wanted to try some other way out.
Just for a note...
I went one more level up by defining a handler to the event ON_CHANGED of class CL_WD_DROPDOWN_BY_KEY in a local class. I also confirmed the establishment of the relationship in the debugger. But the event itself was not raised at the UI activity of changing the dropdown value.
So, this did not work either. I guess, even at the level of CL_WD_DROPDOWN_BY_KEY, this event is not raised.
Many thanks once again.
- Z
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.