on 04-28-2009 4:33 AM
Dear Experts,
How do i determine the lead index if i click on any cell (Input Field) on any row in the table?
Thanks.
Tee
Hi,
Define this attribute context_element of type if_wd_context_element in event handler method parameters.This will hold the lead selection of clicked cell of row.
To retrieve attributes you can use context_element->get_static_attributes( ) to receive the clicked row data.Dont forget to declare the attribute "context_element" (as it is ) in the attributes of event handler method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arjun,
In reality, i have seen a few example of ABAP webs having the desired ability.
By the way, your suggested way works well ...
Thanks.
Tee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the column doesn't contain an Input Enabled UI element in its editor, then clicking on the cell can change the LeadSelection. Perhaps this is what you observed in other SAP applications. Either that or the other SAP application wasn't Web Dynpro. As described, there is no onClick or onFocus event for InputFields.
Guys,
Cool ... it's working ... but, it's limited to action ONENTER for input field.
I am looking for the clicking into the input field, do you know how to do it?
Thanks.
Tee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Fooklin,
To get the index of the row which is selected, you need to trigger some action. Clicking on the input field does not trigger any action. So either you need to put an UI element such as button etc to trigger some action or you can use the ONENTER event of the input field. You the following code to get the index of the row click (but this code should be used in some event handler)
data: lr_element type ref to if_wd_context_element,
lv_index type i.
lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
lv_index = lr_element->get_index( ).
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.