on 05-09-2006 1:22 AM
Hi All,
We are working on the Netweaver 2004S release and in the process of writing an interactive Web Dynpro (ABAP) application. A Table (UI element) is defined in the main view with data binding to a context node (Cardinality 0:n, NO LEAD SELECTION, NO SINGLETON). This table has three columns and the first column is defined as a "LinkToAction" element. The values are displayed in the table correctly and the first column with document numbers is displayed properly as a link. I defined the "onAction" event of the link, and would like to get access to the selected document number. How to do this? I only get "WDEVENT" parameter in the onAction event handler. Is there any way to get access to the "LinkToAction" UI object itself in the event?
I was trying to draw a parallel with BSP's and was hoping to get access to the UI event object itself, just like what we get in the "DO_HANDLE_EVENT" of the controller. When the user clicks on the link of TABLE, I want to read the text attribute of "LinkToAction" element and then use the document number to display details. I tried using the IF_WD_CONTEXT_NODE interface etc but could not get to the "Text" attribute.
Again, this is for Web Dynpro ABAP and we don't want to use a singleton.
Thanks much for you time and your response will be appreciated
Points will be awarded
Thank you Srini,
I implemented your suggestions and it looks like I'm getting a reference to "LinkToAction" element. Very helpful answer. But again I cannot get to the "Text" property of this element. The ID parameter only contains the generic value TAB_DOCNO_EDITOR and does not have the table index. I tried using the GET_TEXT of the "LinkToAction" element but got a short dump. Any ideas, how I can get the actual cell value or the Text property of "Link". The table is bound to the context node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you,
It works fine. Much appreciated. I awarded points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjay,
If you want to get access to UI LinkToAction itself, try using the following code:
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
This gets access to LinkToACtion
wd_table_cell_editor ?= wd_this->m_view->get_element( ID ).
THis gets access to table column itself
wd_table_column ?= wd_table_cell_editor->get__parent( ).
Before using this code:
1) declare ID TYPE STRING as parameter in the eventhandler method(You can add parameters) and declare M_VIEW REF TO IF_WD_VIEW as an attribute in the view.
2) Write the following code in method WDDOMODIFYVIEW:
if first_time = abap_true.
wd_this->m_view = view.
endif.
Regards,
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sanjay,
If you want to get access to UI LinkToAction itself, try using the following code:
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
This gets access to LinkToACtion
wd_table_cell_editor ?= wd_this->m_view->get_element( ID ).
THis gets access to table column itself
wd_table_column ?= wd_table_cell_editor->get__parent( ).
Before using this code:
1) declare ID TYPE STRING as parameter in the eventhandler method(You can add parameters) and declare M_VIEW REF TO IF_WD_VIEW as an attribute in the view.
2) Write the following code in method WDDOMODIFYVIEW:
if first_time = abap_true.
wd_this->m_view = view.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sanjay,
From WebDynpro for Java perspective, it is possible to do it through <a href="http://help.sap.com/saphelp_nw04/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/content.htm">Event Parameter and Parameter Mapping</a>. So, I think you should be able to draw similar lines for WD ABAP as well using this link : <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/33/b11042705a5533e10000000a155106/content.htm">Parameter Mapping</a>
Good Luck.
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.