X-Git-Url: https://code.grnet.gr/git/pithos/blobdiff_plain/16baf609bb746ccbc6cd8da7213ee74cf474f2a9..f656aeb2ce96e9aac60b06d5eb231622d080e3be:/src/gr/ebs/gss/client/Groups.java?ds=sidebyside diff --git a/src/gr/ebs/gss/client/Groups.java b/src/gr/ebs/gss/client/Groups.java index 411f37d..9e1c552 100644 --- a/src/gr/ebs/gss/client/Groups.java +++ b/src/gr/ebs/gss/client/Groups.java @@ -111,6 +111,7 @@ public class Groups extends Composite implements TreeListener { sinkEvents(Event.ONMOUSEUP); } + @Override public void onBrowserEvent(Event event) { switch (DOM.eventGetType(event)) { case Event.ONKEYDOWN: @@ -145,16 +146,16 @@ public class Groups extends Composite implements TreeListener { /** * Make an RPC call to retrieve the groups that belong to the specified * user. - * - * @param userId the user ID */ public void updateGroups() { GetCommand gg = new GetCommand(GroupsResource.class, GSS.get().getCurrentUserResource().getGroupsPath()){ + @Override public void onComplete() { GroupsResource res = getResult(); MultipleGetCommand ga = new MultipleGetCommand(GroupResource.class, res.getGroupPaths().toArray(new String[]{})){ + @Override public void onComplete() { List groupList = getResult(); tree.clear(); @@ -166,11 +167,12 @@ public class Groups extends Composite implements TreeListener { } } - + @Override public void onError(Throwable t) { GWT.log("", t); } + @Override public void onError(String p, Throwable throwable) { GWT.log("Path:"+p, throwable); } @@ -178,35 +180,12 @@ public class Groups extends Composite implements TreeListener { DeferredCommand.addCommand(ga); } - + @Override public void onError(Throwable t) { } }; DeferredCommand.addCommand(gg); - /* - GetGroupsCommand gg = new GetGroupsCommand(GSS.get().getCurrentUserResource().getGroupsPath()){ - - public void onComplete() { - GroupsResource res = getResource(); - GetAllGroupsCommand ga = new GetAllGroupsCommand(res.getGroupPaths().toArray(new String[]{})){ - - public void onComplete() { - List groupList = getList(); - tree.clear(); - for (int i = 0; i < groupList.size(); i++) { - final TreeItem item = new TreeItem(imageItemHTML(images.groupImage(), groupList.get(i).getName())); - item.setUserObject(groupList.get(i)); - tree.addItem(item); - updateUsers( item); - } - } - }; - DeferredCommand.addCommand(ga); - } - }; - DeferredCommand.addCommand(gg);*/ - } /** @@ -216,7 +195,6 @@ public class Groups extends Composite implements TreeListener { GSS.get().getStatusPanel().updateCurrentlyShowing(null); //clear stats - nothing to show for the groups tab } - /** * A helper method to simplify adding tree items that have attached images. * {@link #addImageItem(TreeItem, String) code} @@ -301,6 +279,7 @@ public class Groups extends Composite implements TreeListener { if(groupItem.getUserObject() instanceof GroupResource){ GroupResource res = (GroupResource) groupItem.getUserObject(); MultipleGetCommand gu = new MultipleGetCommand(GroupUserResource.class, res.getUserPaths().toArray(new String[]{})){ + @Override public void onComplete() { List users = getResult(); groupItem.removeItems(); @@ -310,11 +289,12 @@ public class Groups extends Composite implements TreeListener { } } - + @Override public void onError(Throwable t) { GWT.log("", t); } + @Override public void onError(String p, Throwable throwable) { GWT.log("Path:"+p, throwable); } @@ -369,11 +349,7 @@ public class Groups extends Composite implements TreeListener { previous = newPrevious; } - /* - * (non-Javadoc) - * - * @see com.google.gwt.user.client.ui.UIObject#setVisible(boolean) - */ + @Override public void setVisible(final boolean visible) { super.setVisible(visible); if (visible)