ref 17169: Selection of users in the Sharing panel

https://support.d4science.org/issues/17169

Updated support to VREs discovery

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-sharing-widget@181380 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2019-07-31 16:39:22 +00:00
parent e0f0e913ce
commit 234bb80439
1 changed files with 26 additions and 12 deletions

View File

@ -142,16 +142,31 @@ public class PanelMultiDragWorkspaceContact extends ContentPanel {
if (targetContact != null && targetContact.size() > 0) {
if (owner != null) {
alreadyShared = owner.getName() + ", ";
if (targetContact.contains(owner)) {
targetContact.remove(owner);
}
}
for (int i = 0; i < targetContact.size() - 1; i++)
if (targetContact.size() > 0) {
alreadyShared = owner.getName() + ", ";
for (int i = 0; i < targetContact.size(); i++) {
if ((i + 1) == targetContact.size()) {
alreadyShared += targetContact.get(i).getName();
} else {
alreadyShared += targetContact.get(i).getName() + ", ";
}
}
} else {
alreadyShared = owner.getName();
}
alreadyShared += targetContact.get(targetContact.size() - 1).getName();
} else {
for (int i = 0; i < targetContact.size(); i++) {
if ((i + 1) == targetContact.size()) {
alreadyShared += targetContact.get(i).getName();
} else {
alreadyShared += targetContact.get(i).getName() + ", ";
}
}
}
} else {
if (owner != null) {
alreadyShared = owner.getName();
@ -265,7 +280,6 @@ public class PanelMultiDragWorkspaceContact extends ContentPanel {
vreListCombo.setTypeAhead(true);
vreListCombo.setTriggerAction(TriggerAction.ALL);
vreListCombo.addSelectionChangedListener(new SelectionChangedListener<UserVRE>() {
@Override