on 03-02-2011 11:20 AM
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
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... */
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.