on 12-24-2009 1:15 PM
Experts,
In dropdown I am getting duplicate data . I need only unique data.
Thanks
Hi,
Before loading the values to dropdown, please pass the values to the "HashSet". Load the result of the Hashset to the Dropdown.
Regards,
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi friend,
You should ideally use the local node because using the model node directly to view is violation of MVC architecture.
and you can't manipulate model nodes also because of 0-n cardinality. better you should use the local node. And if you don't want to set the values in attribute manually you can use wdCopyService. Let us know if any issue.
Regards
Jeetendra
Hi Friend,
You can use this code for storing the unique values from the attribute in which you have duplicate values.
ArrayList uniqueVals = new ArrayList();
for (Object x : myList)
if (!uniqueVals.contains(x))
uniqueVals.add(x);
for(int i =0;i<uniqueVals.size();i++){
wdContext.currentContextElement().setValue(uniqueVals.get(i).toString());
}
Now after that you can bind the drop down with the Value attribute.
Give it a try and let us know if any issue persist.
Regards
Jeetendra
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 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.