Put the user's full name from the User object to the hashmap that keeps the correlati...
authorNatasa Kapravelou <akapravelou@gmail.com>
Mon, 13 Dec 2010 16:08:16 +0000 (18:08 +0200)
committerNatasa Kapravelou <akapravelou@gmail.com>
Mon, 13 Dec 2010 16:08:16 +0000 (18:08 +0200)
src/gr/ebs/gss/client/FileList.java
src/gr/ebs/gss/client/UserDetailsPanel.java

index cc4e23f..2cd38ce 100644 (file)
@@ -17,7 +17,6 @@
  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
  */
 package gr.ebs.gss.client;
  * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
  */
 package gr.ebs.gss.client;
-import gr.ebs.gss.client.commands.GetUserCommand;
 import gr.ebs.gss.client.dnd.DnDSimpleFocusPanel;
 import gr.ebs.gss.client.dnd.DnDTreeItem;
 import gr.ebs.gss.client.rest.GetCommand;
 import gr.ebs.gss.client.dnd.DnDSimpleFocusPanel;
 import gr.ebs.gss.client.dnd.DnDTreeItem;
 import gr.ebs.gss.client.rest.GetCommand;
@@ -675,11 +674,6 @@ public class FileList extends Composite implements ClickHandler {
                        else
                                table.setHTML(i, 1, file.getName());
 
                        else
                                table.setHTML(i, 1, file.getName());
 
-                       if(GSS.get().findUserFullName(file.getOwner()) == null){
-                               GetUserCommand guc = new GetUserCommand(file.getOwner());
-                               guc.execute();
-                               GSS.get().putUserToMap(file.getOwner(), file.getOwner());
-                       }
                        table.setText(i, 2, GSS.get().getUserFullName(file.getOwner()));
                        table.setText(i, 3, file.getPath());
                        table.setText(i, 4, String.valueOf(file.getVersion()));
                        table.setText(i, 2, GSS.get().getUserFullName(file.getOwner()));
                        table.setText(i, 3, file.getPath());
                        table.setText(i, 4, String.valueOf(file.getVersion()));
index ed8d608..a04f4d2 100644 (file)
@@ -70,6 +70,7 @@ public class UserDetailsPanel extends Composite {
                if (user == null)
                        return !DONE;
                userInfoLabel.setHTML("<b>" + user.getName() + " \u0387 " + user.getUsername() + "</b>");
                if (user == null)
                        return !DONE;
                userInfoLabel.setHTML("<b>" + user.getName() + " \u0387 " + user.getUsername() + "</b>");
+               GSS.get().putUserToMap(user.getUsername(), user.getName());
                return DONE;
        }
 
                return DONE;
        }