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:
parent
f75a291489
commit
25bc395de0
|
@ -362,7 +362,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
setAlertBlock("Retrieving profiles, please wait...", AlertType.INFO, true);
|
setAlertBlock("Retrieving profiles, please wait...", AlertType.INFO, true);
|
||||||
|
|
||||||
// get the name of the organization from the title
|
// 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
|
// perform remote request of profiles for the selected organization
|
||||||
ckanServices.getProfiles(orgName, new AsyncCallback<List<MetaDataProfileBean>>() {
|
ckanServices.getProfiles(orgName, new AsyncCallback<List<MetaDataProfileBean>>() {
|
||||||
|
@ -418,16 +418,15 @@ public class CreateDatasetForm extends Composite{
|
||||||
setAlertBlock("Retrieving groups, please wait...", AlertType.INFO, true);
|
setAlertBlock("Retrieving groups, please wait...", AlertType.INFO, true);
|
||||||
|
|
||||||
// request groups
|
// request groups
|
||||||
ckanServices.getUserGroups(null, new AsyncCallback<List<GroupBean>>() {
|
ckanServices.getUserGroups(orgName, new AsyncCallback<List<GroupBean>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<GroupBean> groups) {
|
public void onSuccess(List<GroupBean> groups) {
|
||||||
|
|
||||||
if(groups == null){
|
if(groups == null){
|
||||||
setAlertBlock("Error while retrieving groups, try later", AlertType.ERROR, true);
|
setAlertBlock("Error while retrieving groups", AlertType.ERROR, true);
|
||||||
}else{
|
}else{
|
||||||
if(groups.isEmpty()){
|
if(groups.isEmpty()){
|
||||||
// nothing ...
|
groupsControlGroup.setVisible(false);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
@ -522,7 +521,7 @@ public class CreateDatasetForm extends Composite{
|
||||||
setAlertBlock("Error while retrieving groups, try later", AlertType.ERROR, true);
|
setAlertBlock("Error while retrieving groups, try later", AlertType.ERROR, true);
|
||||||
}else{
|
}else{
|
||||||
if(groups.isEmpty()){
|
if(groups.isEmpty()){
|
||||||
// ...
|
groupsControlGroup.setVisible(false);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue