Ticket #1781: was implemented and the enhancement is released on devportal
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@81027 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
35e0357197
commit
8c162da279
|
@ -82,14 +82,12 @@ import org.gcube.portlets.user.workspace.client.view.windows.InfoDisplay;
|
||||||
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
import org.gcube.portlets.user.workspace.client.view.windows.MessageBoxAlert;
|
||||||
import org.gcube.portlets.user.wsmail.client.forms.MailForm;
|
import org.gcube.portlets.user.wsmail.client.forms.MailForm;
|
||||||
|
|
||||||
import com.extjs.gxt.ui.client.widget.ContentPanel;
|
|
||||||
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
import com.extjs.gxt.ui.client.widget.LayoutContainer;
|
||||||
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.RunAsyncCallback;
|
import com.google.gwt.core.client.RunAsyncCallback;
|
||||||
import com.google.gwt.core.client.Scheduler;
|
import com.google.gwt.core.client.Scheduler;
|
||||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||||
import com.google.gwt.dev.asm.tree.IntInsnNode;
|
|
||||||
import com.google.gwt.event.shared.HandlerManager;
|
import com.google.gwt.event.shared.HandlerManager;
|
||||||
import com.google.gwt.user.client.Cookies;
|
import com.google.gwt.user.client.Cookies;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
|
@ -137,6 +135,7 @@ public class AppController implements SubscriberInterface {
|
||||||
bind();
|
bind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static HandlerManager getEventBus() {
|
public static HandlerManager getEventBus() {
|
||||||
return eventBus;
|
return eventBus;
|
||||||
}
|
}
|
||||||
|
@ -810,14 +809,22 @@ public class AppController implements SubscriberInterface {
|
||||||
final String searchParameter = Window.Location.getParameter(ConstantsPortlet.GET_SEARCH_PARAMETER);
|
final String searchParameter = Window.Location.getParameter(ConstantsPortlet.GET_SEARCH_PARAMETER);
|
||||||
final String itemIdParameter = Window.Location.getParameter(ConstantsPortlet.GET_ITEMID_PARAMETER);
|
final String itemIdParameter = Window.Location.getParameter(ConstantsPortlet.GET_ITEMID_PARAMETER);
|
||||||
final String operationParameter = Window.Location.getParameter(ConstantsPortlet.GET_OPEARATION_PARAMETER);
|
final String operationParameter = Window.Location.getParameter(ConstantsPortlet.GET_OPEARATION_PARAMETER);
|
||||||
|
final String validateSession = Window.Location.getParameter(ConstantsPortlet.GET_VALIDATE_SESSION);
|
||||||
|
|
||||||
|
boolean sessionValidating = true;
|
||||||
|
|
||||||
|
if(validateSession!=null && validateSession.compareToIgnoreCase("false")==0)
|
||||||
|
sessionValidating = false;
|
||||||
|
|
||||||
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_SEARCH_PARAMETER+": "+searchParameter);
|
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_SEARCH_PARAMETER+": "+searchParameter);
|
||||||
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_ITEMID_PARAMETER+": "+itemIdParameter);
|
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_ITEMID_PARAMETER+": "+itemIdParameter);
|
||||||
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_OPEARATION_PARAMETER+": "+operationParameter);
|
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_OPEARATION_PARAMETER+": "+operationParameter);
|
||||||
|
GWT.log("GET PARAMETER "+ConstantsPortlet.GET_VALIDATE_SESSION+": "+validateSession);
|
||||||
|
|
||||||
final boolean instanceWithGrouping = readCookieWorkspaceGridViewSetting();
|
final boolean instanceWithGrouping = readCookieWorkspaceGridViewSetting();
|
||||||
|
|
||||||
System.out.println("Cookie "+ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING + " return "+instanceWithGrouping);
|
System.out.println("Cookie "+ConstantsPortlet.GCUBE_COOKIE_WORKSPACE_GRID_VIEW_SETTING + " return "+instanceWithGrouping);
|
||||||
|
System.out.println("Session Validating is "+sessionValidating);
|
||||||
|
|
||||||
boolean isSearch = false;
|
boolean isSearch = false;
|
||||||
boolean isSearchForItemId = false;
|
boolean isSearchForItemId = false;
|
||||||
|
@ -842,18 +849,20 @@ public class AppController implements SubscriberInterface {
|
||||||
final boolean searchingForItemId = isSearchForItemId;
|
final boolean searchingForItemId = isSearchForItemId;
|
||||||
|
|
||||||
//VALIDATING SESSION
|
//VALIDATING SESSION
|
||||||
if(appContrExplorer!=null){
|
if(appContrExplorer!=null && sessionValidating){
|
||||||
appContrExplorer.getRpcWorkspaceService().isSessionExpired(new AsyncCallback<Boolean>() {
|
appContrExplorer.getRpcWorkspaceService().isSessionExpired(new AsyncCallback<Boolean>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
GWT.log("ERROR ON VALIDATING SESSION");
|
GWT.log("ERROR ON VALIDATING SESSION - DEFAULT INIT");
|
||||||
|
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Boolean result) {
|
public void onSuccess(Boolean result) {
|
||||||
|
|
||||||
|
GWT.log("SESSION IS EXPIRED: "+result);
|
||||||
|
|
||||||
//SESSION IS NOT EXPIRED
|
//SESSION IS NOT EXPIRED
|
||||||
if(!result)
|
if(!result)
|
||||||
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter);
|
initPortlet(rootPanel, instanceWithGrouping, searchingForItemId, searchParameter, itemIdParameter, operationParameter);
|
||||||
|
@ -861,6 +870,7 @@ public class AppController implements SubscriberInterface {
|
||||||
//SESSION IS EXPIRED
|
//SESSION IS EXPIRED
|
||||||
|
|
||||||
rootPanel.add(showProblems());
|
rootPanel.add(showProblems());
|
||||||
|
getMainPanel().setHeight(350);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -910,7 +920,7 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
errorPanel.add(new HTML("<div class=\"nofeed-message\">" +
|
errorPanel.add(new HTML("<div class=\"nofeed-message\">" +
|
||||||
"Ops! There were problems while retrieving your workspace!" +
|
"Ops! There were problems while retrieving your workspace!" +
|
||||||
"<br> Your session expired, please try to login again <a href=\"\\\">Press here</a> "));
|
"<br> Your session expired, please try to <a href=\"/c/portal/logout\">login again</a> "));
|
||||||
|
|
||||||
return errorPanel;
|
return errorPanel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ public class ConstantsPortlet {
|
||||||
public static final String GET_SEARCH_PARAMETER ="search";
|
public static final String GET_SEARCH_PARAMETER ="search";
|
||||||
public static final String GET_ITEMID_PARAMETER ="itemid";
|
public static final String GET_ITEMID_PARAMETER ="itemid";
|
||||||
public static final String GET_OPEARATION_PARAMETER ="operation";
|
public static final String GET_OPEARATION_PARAMETER ="operation";
|
||||||
|
public static final String GET_VALIDATE_SESSION="validatesession";
|
||||||
|
|
||||||
|
|
||||||
// Div Gwt
|
// Div Gwt
|
||||||
|
|
|
@ -70,15 +70,16 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
ColumnConfig creationDate = new ColumnConfig(ConstantsExplorer.GRIDCOLUMNCREATIONDATE, ConstantsExplorer.GRIDCOLUMNCREATIONDATE, 100);
|
ColumnConfig creationDate = new ColumnConfig(ConstantsExplorer.GRIDCOLUMNCREATIONDATE, ConstantsExplorer.GRIDCOLUMNCREATIONDATE, 100);
|
||||||
ColumnConfig category = new ColumnConfig(ConstantsExplorer.SHORTCUTCATEGORY, ConstantsExplorer.SHORTCUTCATEGORY, 100);
|
ColumnConfig category = new ColumnConfig(ConstantsExplorer.SHORTCUTCATEGORY, ConstantsExplorer.SHORTCUTCATEGORY, 100);
|
||||||
ColumnConfig size = new ColumnConfig(ConstantsExplorer.SIZE, ConstantsExplorer.SIZE, 50);
|
ColumnConfig size = new ColumnConfig(ConstantsExplorer.SIZE, ConstantsExplorer.SIZE, 50);
|
||||||
|
ColumnConfig ownerFullName = new ColumnConfig(ConstantsExplorer.OWNERFULLNAME, ConstantsExplorer.OWNER, 80);
|
||||||
|
|
||||||
size.setEditor(new CellEditor(new NumberField()));
|
size.setEditor(new CellEditor(new NumberField()));
|
||||||
|
|
||||||
ColumnModel cm = null;
|
ColumnModel cm = null;
|
||||||
|
|
||||||
if(group)
|
if(group)
|
||||||
cm = new ColumnModel(Arrays.asList(icon, name, type, creationDate, size, category));
|
cm = new ColumnModel(Arrays.asList(icon, name, type, creationDate, size, ownerFullName, category));
|
||||||
else
|
else
|
||||||
cm = new ColumnModel(Arrays.asList(icon, name, type, creationDate, size));
|
cm = new ColumnModel(Arrays.asList(icon, name, type, creationDate, size, ownerFullName));
|
||||||
|
|
||||||
final ColumnModel columnModel = cm;
|
final ColumnModel columnModel = cm;
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
font-family: 'Architects Daughter', arial, sans-serif;
|
font-family: 'Architects Daughter', arial, sans-serif;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
height: 350px;
|
||||||
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue