cancel
Showing results for 
Search instead for 
Did you mean: 

react to a line-selection on a table-view

Former Member
0 Kudos

Hello,

I show some data on a table-view and i want to show detail-information in another table-view when a user selects a row of my table-view. How can i get that done?

Is there an event to catch? How can i realize that?

Thanks for your help!

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188977
Contributor
0 Kudos

Hi Tobias, if you want to use eventing between iviews you can see this link:

http://help.sap.com/saphelp_nw04/helpdata/en/c4/f47b40f7edd662e10000000a155106/content.htm

But is not necessary in this case:

You can connect your table with other data object and then with a second table or form to display the detail.

you can found examples of this is:

http://help.sap.com/saphelp_nw04/helpdata/en/1a/55a340fa432b54e10000000a1550b0/content.htm

Regards.

Former Member
0 Kudos

thank you very much. but i still have a problem. the detailed data is displayed when i start the application. but when i chose a line the detail-information does not update! Could that be a problem with the intern table my data source has as output-parameter?

former_member188977
Contributor
0 Kudos

If you are using BI_Java_Connectors, You need to use the "BI Query Wizard"

if you Drag & Drop the Data Object the select work fine but you can't connect it.

Regards.

Former Member
0 Kudos

In Visual Composer you have the 'SELECT' event defined on a table. This event will be raised when the user selects a row in a table. You can connect the table to a data source input and use the row values as an input to the data source.

- Lior

Former Member
0 Kudos

The tableView control has an event "onRowSelection"

event:

"Defines the event handling method that will be processed when the user clicks on the radiobutton button in the first column. The radiobutton is visible when the 'selectionMode' is set to "SINGLESELECT". The method com.sap.htmlb.event.TableSelectionEvent.getRowIndex() can be used to retrieve the index of the row that initiated the event"

import com.sap.htmlb.enum.TableSelectionMode;.
.

/* Get the tableView component */

TableView table = (TableView) this.getComponentByName("myTableView");

/* Set the onHeaderClick event
table.setSelectionMode(TableSelectionMode.SINGLESELECT);
table.setOnRowSelection("onRowSelClick");
.
.

/*  the method onRowSelClick has to be declared in the DynPage. Otherwise an
    exception is thrown ("method not found") when the user clicks on the
    radio button of the tableView.

    Declaring onHeaderClick:
       public void onRowSelClick(Event event)  {           
 System.out.println("Row selection click");      
}

*/

Edit: Sorry, I did not see at first that your question aimed at the Visual Composer. I don't know the VC - so no idea if this works.

Message was edited by: Francisco Villar