/*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
PostRequest updateGroup = new PostRequest(app.getApiPath(), app.getUsername(), path) {
@Override
- public void onSuccess(@SuppressWarnings("unused") Resource result) {
+ public void onSuccess(Resource result) {
app.updateGroupNode(group);
}
@Override
public void onError(Throwable t) {
GWT.log("", t);
+ app.setError(t);
if (t instanceof RestException) {
app.displayError("Unable to update group:" + ((RestException) t).getHttpStatusText());
}
- else
+ else
app.displayError("System error updating group:" + t.getMessage());
}
updateGroup.setHeader("X-Auth-Token", app.getToken());
String groupMembers = "";
for (String u : group.getMembers())
- groupMembers += (u + ",");
+ groupMembers += (URL.encodePathSegment(u) + ",");
updateGroup.setHeader("X-Account-Group-" + URL.encodePathSegment(group.getName()), groupMembers);
Scheduler.get().scheduleDeferred(updateGroup);
}