on 03-16-2011 9:22 AM
Hi Team,
How can achieve multiple selection from drop down? I am working on NWDS7.0 SPS18. I have known the concept of item list box... is that's the only option?.
Is it possible to make it as filter option that we have in our Microsoft excel.
Customer wants select either/all options @once from drop down.
TIA,
Vanita K
Hi,
Create a node with cardinality 0-n and selection property set to 0-n
Create a table UI element and bind this node as a datasource to this table.
Set the selection mode property of this table as auto or multi
Once this is done, populate the node with some data elements.
When you run the application, you will be able to select multiple rows from the table.
To get the selected rows, use below code on the action of some button
wdComponentAPI.getMessageManager().reportSuccess("Selected rows are");
int n = wdContext.nodeEmployeeData().size();//size of node binded with table
int leadSelected = wdContext.nodeEmployeeData().getLeadSelection();
for (int i = n - 1; i >= 0; --i)
{
if (wdContext.nodeEmployeeData().isMultiSelected(i) || leadSelected == i )
{
IEmployeeDataElement employeeDataElement = wdContext.nodeEmployeeData().getEmployeeDataElementAt(i);
wdComponentAPI.getMessageManager().reportSuccess("ID: "+employeeDataElement.getID()+"Name: "+employeeDataElement.getName());
}
}
For adding sorting and filtering functionality to the table follow the article
[WDJ - A Generic Java Class for Filtering Web Dynpro Tables|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5996f]
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot have multi-selection for a DropDownBy*.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can also use table UI for this.
You can display multiple rows in a table with the filter and sort functionality and can allow to select multiple rows.
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
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.