on 08-18-2009 7:54 AM
Hi,
I need to compare initial and current value in the list box. I' am trying to do the comparison in onSelect event.
Here how can I get the initial value. I guess we will get the current value here. Or let me know if you have
some better suggestions.
Thanks,
Aravind
Hi,
Can I assume that Initial value as the first value or the last selected value.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can implement the context change log for that context attribute to which the listbox is bound to.
There you can track the old and new values.
Or
When ever the user selects a value in list box, you need to store it to a temp variable for old value and you need to check it against the current selection.
Have you checked wdevent parameters...
These can be the 2 ways.
Regards,
Lekha.
In your approach of temp variable, you will have to keep refreshing your variable with the new value in the OnSelect Method.
For eg: l_temp is initially set in WDDOINIT, now you compare this with the new selected value in the OnSelect method and after displaying the appropriate message you will again have to reset l_temp with the newly selected value.
" note: I hope l_temp is declared in the attributes tab of the View
If you wish to implement Context Change log, follow these steps;
1. Place the following code in the WDDOINIT method of the Component Controller
2. Create a new method 'GET_CHANGE_LOG' in the Component Controller's Methods Tab
* enable context change log
data: context type ref to if_wd_context.
context = wd_context->get_context( ).
context->enable_context_change_log( ).
3. When you want to track the changes call his this method as follows,
" Create a Returning Parameter 'CHANGES' type WDR_CONTEXT_CHANGE_LIST
method get_change_log .
data: context type ref to if_wd_context.
context = wd_context->get_context( ).
changes = context->get_context_change_log( ).
endmethod.
For more details refer component DEMO_CONTEXT_CHANGES.
Regards,
Radhika.DATA: l_ref_componentcontroller TYPE REF TO ig_componentcontroller .
DATA: l_changes TYPE wdr_context_change_list.
l_ref_componentcontroller = wd_this->get_componentcontroller_ctr( ).
l_changes = l_ref_componentcontroller->get_change_log( ).
" l_changes will contain all the details of the changes made.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.