cancel
Showing results for 
Search instead for 
Did you mean: 

Drop down list in table

Former Member
0 Kudos

Hi ,

I have a table, which has two columns both are drop down list. So when the user inserts a new row and when he selects dropdown1 then dropdown2 has to be populated on the value of dropdown1.

Please let me know how can this be acheived in Java Webdynpro.

Regards,

Sharath

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Let "Rows" be the data source node of the table. Add two non-singleton child nodes "Items1" and "Items2" for storing the dropdown list items.

Define an action "List1Selected" and add a parameter "row" of type IRowsElement.

Define a parameter mapping that maps the predefined event parameter "nodeElement" to the action parameter "row".

Assign action "List1Selected" to the "onSelect" event of list1.

In the action handler you have then the row where the entry from list1 has been selected:


void onActionList1Selected(IRowsElement row, ...)
{
  IItems1Element selection = row.nodeItems1().currentItems1Element();
  /* Now populate row.nodeItems2() depending on the selection... */
}

Former Member
0 Kudos

Hi Kashyap,

You can achieve this using the onChange method of the first drop down. Everytime you select a value in first dropdown you can write code within the onChange method to populate the second one. The point to be noted here is you need to get the reference of the current record insterted into the table and then populate accordingly.

Regards,

Ponraj M