minor fix for group retrieval on organization change

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@141401 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-12-24 00:25:17 +00:00
parent f75a291489
commit 25bc395de0
1 changed files with 5 additions and 6 deletions

View File

@ -362,7 +362,7 @@ public class CreateDatasetForm extends Composite{
setAlertBlock("Retrieving profiles, please wait...", AlertType.INFO, true);
// get the name of the organization from the title
String orgName = nameTitleOrganizationMap.get(organizationsListbox.getSelectedItemText());
final String orgName = nameTitleOrganizationMap.get(organizationsListbox.getSelectedItemText());
// perform remote request of profiles for the selected organization
ckanServices.getProfiles(orgName, new AsyncCallback<List<MetaDataProfileBean>>() {
@ -418,16 +418,15 @@ public class CreateDatasetForm extends Composite{
setAlertBlock("Retrieving groups, please wait...", AlertType.INFO, true);
// request groups
ckanServices.getUserGroups(null, new AsyncCallback<List<GroupBean>>() {
ckanServices.getUserGroups(orgName, new AsyncCallback<List<GroupBean>>() {
@Override
public void onSuccess(List<GroupBean> groups) {
if(groups == null){
setAlertBlock("Error while retrieving groups, try later", AlertType.ERROR, true);
setAlertBlock("Error while retrieving groups", AlertType.ERROR, true);
}else{
if(groups.isEmpty()){
// nothing ...
groupsControlGroup.setVisible(false);
}
else{
@ -522,7 +521,7 @@ public class CreateDatasetForm extends Composite{
setAlertBlock("Error while retrieving groups, try later", AlertType.ERROR, true);
}else{
if(groups.isEmpty()){
// ...
groupsControlGroup.setVisible(false);
}
else{