fixed bug happenign with firefox and Chrome when click back browser button (let previous scope set)

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/vre-members@100221 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-09-26 13:26:40 +00:00
parent fe282c3abf
commit e7ca38ed56
3 changed files with 34 additions and 15 deletions

View File

@ -41,6 +41,9 @@ public class VREMembersPanel extends Composite {
mainPanel.clear();
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
if (users == null || users.isEmpty()) {
mainPanel.add(new HTML("<div class=\"frame\" style=\"font-size: 16px;\">Ops, something went wrong. Please <a href=\"javascript: location.reload();\">reload<a/> this page.</div>"));
} else {
Grid grid = new Grid(users.size()/4+1, 4);
mainPanel.add(grid);
@ -48,6 +51,7 @@ public class VREMembersPanel extends Composite {
grid.setWidget(i/4, i%4, new DisplayBadge(users.get(i)));
}
}
}
@Override
public void onFailure(Throwable caught) {

View File

@ -44,6 +44,7 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
user = getDevelopmentUser();
SessionManager.getInstance().getASLSession(sessionID, user).setScope("/gcube");
}
System.out.println("\n\n\n RealPath->" + this.getServletContext().getRealPath(""));
return SessionManager.getInstance().getASLSession(sessionID, user);
}
/**
@ -88,8 +89,10 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
ScopeBean sb = new ScopeBean(scope);
List<UserModel> users = null;
if (sb.is(Type.INFRASTRUCTURE))
users = um.listUsersByGroup(gm.getRootVO().getGroupId());
if (sb.is(Type.INFRASTRUCTURE)) {
users = new ArrayList<UserModel>();
return new ArrayList<BelongingUser>();
}
else if (sb.is(Type.VRE)) { //must be in VRE
//get the name from the scope
String orgName = scope.substring(scope.lastIndexOf("/")+1, scope.length());
@ -137,4 +140,5 @@ public class MembersServiceImpl extends RemoteServiceServlet implements MembersS
}
}

View File

@ -11,6 +11,17 @@
border: 1px solid #DBDBDB;
}
.frame {
font-family: 'Helvetica Neue', Arial, sans-serif;
padding: 10px;
margin: 10px;
background: #FFF;
border-radius: 6px !important;
-moz-border-radius: 6px !important;
-webkit-border-radius: 6px !important;
border: 1px solid #DBDBDB;
}
.user-photo {
padding: 5px;
border: 1px solid #E6E6E6;