Fixed error on creation date of Workspace

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@83098 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-10-14 14:09:43 +00:00
parent e7bb9959c5
commit aed9d2ffab
9 changed files with 62 additions and 49 deletions

View File

@ -4,9 +4,6 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="csv-import-wizard-workspace-gxt3-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/csv-import-wizard-workspace-gxt3/csv-import-wizard-workspace-gxt3">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/> <property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="tabular-data-portlet"/> <property name="context-root" value="tabular-data-portlet"/>
</wb-module> </wb-module>

View File

@ -14,9 +14,6 @@ import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
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.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
import com.google.web.bindery.event.shared.EventBus; import com.google.web.bindery.event.shared.EventBus;
@ -54,7 +51,7 @@ public class TabularDataPortlet implements EntryPoint {
private final TabularDataServiceAsync greetingService = GWT.create(TabularDataService.class); private final TabularDataServiceAsync greetingService = GWT.create(TabularDataService.class);
//Main Panel //Main Panel
private static SimpleContainer mainPanel; private static BorderLayoutContainer mainPanelLayout;
//Private TabularData //Private TabularData
private static TabularData tabularData; private static TabularData tabularData;
@ -86,7 +83,7 @@ public class TabularDataPortlet implements EntryPoint {
/** /**
* Update window size * Update window size
*/
public void updateSize(){ public void updateSize(){
RootPanel workspace = RootPanel.get("tdp"); RootPanel workspace = RootPanel.get("tdp");
@ -106,16 +103,16 @@ public class TabularDataPortlet implements EntryPoint {
System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth); System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
mainPanel.setHeight(rootHeight); mainPanelLayout.setHeight(rootHeight);
mainPanel.setWidth(rootWidth); mainPanelLayout.setWidth(rootWidth);
} }
*/
protected void loadMainPanel() { protected void loadMainPanel() {
/*
Window.addResizeHandler(new ResizeHandler() { Window.addResizeHandler(new ResizeHandler() {
@Override @Override
@ -125,7 +122,7 @@ public class TabularDataPortlet implements EntryPoint {
} }
}); });
*/
@ -145,8 +142,11 @@ public class TabularDataPortlet implements EntryPoint {
//Layout //Layout
final BorderLayoutContainer mainPanelLayout = new BorderLayoutContainer(); mainPanelLayout = new BorderLayoutContainer();
mainPanelLayout.setBorders(true); mainPanelLayout.setBorders(true);
mainPanelLayout.setWidth("100%");
mainPanelLayout.setHeight("100%");
//Ribbon Menu //Ribbon Menu
TabularDataRibbon tabularDataTooBar = new TabularDataRibbon(eventBus); TabularDataRibbon tabularDataTooBar = new TabularDataRibbon(eventBus);
@ -190,21 +190,25 @@ public class TabularDataPortlet implements EntryPoint {
eastData.setCollapseHidden(true); eastData.setCollapseHidden(true);
mainPanelLayout.setEastWidget(functionalityPanel,eastData); mainPanelLayout.setEastWidget(functionalityPanel,eastData);
functionalityPanel.collapse(); functionalityPanel.collapse();
functionalityPanel.disable(); functionalityPanel.disable();
mainPanelLayout.onResize();
controller.setFunctionalityTab(functionalityTab); controller.setFunctionalityTab(functionalityTab);
controller.setFunctionalityPanel(functionalityPanel); controller.setFunctionalityPanel(functionalityPanel);
controller.setEastData(eastData); controller.setEastData(eastData);
//Main //Main
mainPanel = new SimpleContainer(); //SimpleContainer mainPanel = new SimpleContainer();
mainPanel.add(mainPanelLayout); //mainPanelLayout.clearSizeCache();
updateSize(); //mainPanelLayout.forceLayout();
bind(mainPanel); //mainPanel.add(mainPanelLayout);
//updateSize();
bind(mainPanelLayout);
} }
@ -215,6 +219,7 @@ public class TabularDataPortlet implements EntryPoint {
Log.trace("Div with id "+JSP_TAG_ID+" not found, starting in dev mode"); Log.trace("Div with id "+JSP_TAG_ID+" not found, starting in dev mode");
Viewport viewport = new Viewport(); Viewport viewport = new Viewport();
viewport.setWidget(mainWidget); viewport.setWidget(mainWidget);
viewport.onResize();
RootPanel.get().add(viewport); RootPanel.get().add(viewport);
} else { } else {
Log.trace("Application div with id "+JSP_TAG_ID+" found, starting in portal mode"); Log.trace("Application div with id "+JSP_TAG_ID+" found, starting in portal mode");
@ -222,6 +227,7 @@ public class TabularDataPortlet implements EntryPoint {
//viewport.setEnableScroll(true); //viewport.setEnableScroll(true);
viewport.setWidget(mainWidget); viewport.setWidget(mainWidget);
//RootPanel.get() //RootPanel.get()
viewport.onResize();
root.add(viewport); root.add(viewport);
} }
} }

View File

@ -167,5 +167,24 @@ public interface TabularDataResources extends ClientBundle {
@Source("column.png") @Source("column.png")
ImageResource column(); ImageResource column();
@Source("cog_32.png")
ImageResource cog32();
@Source("cog.png")
ImageResource cog();
@Source("delete_32.png")
ImageResource delete32();
@Source("delete.png")
ImageResource delete();
@Source("rule-add_32.png")
ImageResource ruleadd32();
@Source("rule-add.png")
ImageResource ruleadd();
} }

View File

@ -134,15 +134,15 @@ public class ChartsToolBar {
cleanCells(basicLayout.getElement()); cleanCells(basicLayout.getElement());
//GIS //External Tools
ButtonGroup gisGroup = new ButtonGroup(); ButtonGroup externalToolGroup = new ButtonGroup();
gisGroup.setHeight("78px"); externalToolGroup.setHeight("78px");
gisGroup.setStyleName("margin:2px"); externalToolGroup.setStyleName("margin:2px");
gisGroup.setHeadingText("GIS"); externalToolGroup.setHeadingText("External Tools");
toolBar.add(gisGroup); toolBar.add(externalToolGroup);
FlexTable gisLayout = new FlexTable(); FlexTable externalToolLayout = new FlexTable();
gisGroup.add(gisLayout); externalToolGroup.add(externalToolLayout);
gisButton = new TextButton("GIS", TabularDataResources.INSTANCE.gis32()); gisButton = new TextButton("GIS", TabularDataResources.INSTANCE.gis32());
gisButton.setScale(ButtonScale.LARGE); gisButton.setScale(ButtonScale.LARGE);
@ -157,20 +157,10 @@ public class ChartsToolBar {
} }
}); });
gisLayout.setWidget(0, 0, gisButton); externalToolLayout.setWidget(0, 0, gisButton);
gisLayout.getFlexCellFormatter().setRowSpan(0, 0, 2); externalToolLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
cleanCells(gisLayout.getElement());
ButtonGroup externalToolGroup = new ButtonGroup();
externalToolGroup.setHeight("78px");
externalToolGroup.setStyleName("margin:2px");
externalToolGroup.setHeadingText("External Tools");
toolBar.add(externalToolGroup);
FlexTable externalToolLayout = new FlexTable();
externalToolGroup.add(externalToolLayout);
rstudioButton = new TextButton("R Studio", rstudioButton = new TextButton("R Studio",
TabularDataResources.INSTANCE.rstudio32()); TabularDataResources.INSTANCE.rstudio32());

View File

@ -58,7 +58,7 @@ public class ReviewToolBar {
validationGroup.add(validationLayout); validationGroup.add(validationLayout);
rulesButton = new TextButton("New Rule", rulesButton = new TextButton("New Rule",
TabularDataResources.INSTANCE.rules32()); TabularDataResources.INSTANCE.ruleadd32());
rulesButton.setScale(ButtonScale.LARGE); rulesButton.setScale(ButtonScale.LARGE);
rulesButton.setIconAlign(IconAlign.TOP); rulesButton.setIconAlign(IconAlign.TOP);
rulesButton.setToolTip("Define a new validation rule"); rulesButton.setToolTip("Define a new validation rule");
@ -125,7 +125,7 @@ public class ReviewToolBar {
operationsGroup.add(operationsLayout); operationsGroup.add(operationsLayout);
operationsButton = new TextButton("Review Operations", operationsButton = new TextButton("Review Operations",
TabularDataResources.INSTANCE.rules32()); TabularDataResources.INSTANCE.cog32());
operationsButton.setScale(ButtonScale.LARGE); operationsButton.setScale(ButtonScale.LARGE);
operationsButton.setIconAlign(IconAlign.TOP); operationsButton.setIconAlign(IconAlign.TOP);
operationsButton.setToolTip("View performed operations"); operationsButton.setToolTip("View performed operations");

View File

@ -9,6 +9,7 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
import org.gcube.portlets.user.td.ciw.server.CSVTDImporter; import org.gcube.portlets.user.td.ciw.server.CSVTDImporter;
import org.gcube.portlets.user.td.client.rpc.TabularDataService; import org.gcube.portlets.user.td.client.rpc.TabularDataService;
import org.gcube.portlets.user.td.gxtservice.shared.Constants;
import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager; import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager;
import org.gcube.portlets.user.tdw.datasource.td.TDDataSourceFactory; import org.gcube.portlets.user.tdw.datasource.td.TDDataSourceFactory;
import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry; import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry;
@ -41,7 +42,7 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
//CSVTargetRegistry.getInstance().add(new DemoCSVTarget()); //CSVTargetRegistry.getInstance().add(new DemoCSVTarget());
//System.out.println("Registered DemoCSVTarget"); //System.out.println("Registered DemoCSVTarget");
ScopeProvider.instance.set("/gcube/devsec"); //ScopeProvider.instance.get();
System.out.println("initializing TDDataSourceFactory"); System.out.println("initializing TDDataSourceFactory");
DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory()); DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory());
@ -54,8 +55,8 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu
if (username == null) { if (username == null) {
logger.warn("no user found in session, using test one"); logger.warn("no user found in session, using test one");
username = "giancarlo.panichi"; username = Constants.DEFAULT_USER;
String scope = "/gcube/devsec"; String scope = Constants.DEFAULT_SCOPE;
httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username); httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username);
ASLSession session = SessionManager.getInstance().getASLSession(httpSession.getId(), username); ASLSession session = SessionManager.getInstance().getASLSession(httpSession.getId(), username);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -42,8 +42,8 @@
in order for this application to display correctly. in order for this application to display correctly.
</div> </div>
</noscript> </noscript>
<div id="tdp" style="width: 100%; height: 100%"> <!-- <div id="tdp" style="width: 100%; height: 100%">
</div> </div>-->
</body> </body>
</html> </html>