removed workspace tree view and replaced with structure view

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@85974 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-11-22 17:28:12 +00:00
parent 01b512567b
commit 6e9b17be9d
30 changed files with 246 additions and 162 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/reports-4.6.3-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/reports-4.6.4-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="output" path="target/reports-4.6.3-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/reports-4.6.4-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -2,6 +2,6 @@
<<<<<<<=.mine <<<<<<<=.mine
>>>>>>>=.r71295 >>>>>>>=.r71295
eclipse.preferences.version=1 eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.6.3-SNAPSHOT lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.6.4-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -5,13 +5,7 @@
<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="/target/generated-sources/gwt"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<dependent-module archiveName="gcube-reporting-modeler-1.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-modeler/gcube-reporting-modeler"> <dependent-module archiveName="gcube-reporting-modeler-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-modeler/gcube-reporting-modeler">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-client-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-client/reports-store-gateway-client">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-interface-dto-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-interface-dto/reports-store-gateway-interface-dto">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="document-workflow-library-1.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/document-workflow-library/document-workflow-library"> <dependent-module archiveName="document-workflow-library-1.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/document-workflow-library/document-workflow-library">

13
pom.xml
View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>reports</artifactId> <artifactId>reports</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>4.6.3-SNAPSHOT</version> <version>4.6.4-SNAPSHOT</version>
<name>gCube Reports Portlet</name> <name>gCube Reports Portlet</name>
<description> <description>
gCube Reports Portlet. gCube Reports Portlet.
@ -116,6 +116,10 @@
<version>2.2.5</version> <version>2.2.5</version>
<scope>${setScope}</scope> <scope>${setScope}</scope>
</dependency> </dependency>
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
<artifactId>gwt-log</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.portlets.widgets</groupId> <groupId>org.gcube.portlets.widgets</groupId>
<artifactId>user-selection-dialog</artifactId> <artifactId>user-selection-dialog</artifactId>
@ -129,7 +133,7 @@
<dependency> <dependency>
<groupId>org.gcube.application.rsg</groupId> <groupId>org.gcube.application.rsg</groupId>
<artifactId>reports-store-gateway-client</artifactId> <artifactId>reports-store-gateway-client</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>[0.0.1-SNAPSHOT,)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
@ -200,11 +204,6 @@
<artifactId>portal-service</artifactId> <artifactId>portal-service</artifactId>
<scope>${setScope}</scope> <scope>${setScope}</scope>
</dependency> </dependency>
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
<artifactId>gwt-log</artifactId>
<scope>${setScope}</scope>
</dependency>
<dependency> <dependency>
<groupId>javax.portlet</groupId> <groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId> <artifactId>portlet-api</artifactId>

View File

@ -19,6 +19,7 @@ import org.gcube.portlets.widgets.lighttree.client.load.WorkspaceLightTreeLoadPo
import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.MessageBox;
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.ScheduledCommand;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.CellPanel; import com.google.gwt.user.client.ui.CellPanel;
@ -423,34 +424,34 @@ public class Headerbar extends Composite{
public void enableExports() { public void enableExports() {
optionDOCX.setHTML(EXPORT_OPENXML); optionDOCX.setHTML(EXPORT_OPENXML);
optionDOCX.setCommand(generateDOCX); optionDOCX.setScheduledCommand(generateDOCX);
optionPDF.setHTML("Export to PDF"); optionPDF.setHTML("Export to PDF");
optionPDF.setCommand(generatePDF); optionPDF.setScheduledCommand(generatePDF);
optionHTML.setHTML(EXPORT_HTML); optionHTML.setHTML(EXPORT_HTML);
optionHTML.setCommand(generateHTML); optionHTML.setScheduledCommand(generateHTML);
optionFimes.setHTML(EXPORT_FIMES); optionFimes.setHTML(EXPORT_FIMES);
optionFimes.setCommand(generateFimes); optionFimes.setScheduledCommand(generateFimes);
optionXML.setHTML(EXPORT_XML); optionXML.setHTML(EXPORT_XML);
optionXML.setCommand(generatedXML); optionXML.setScheduledCommand(generatedXML);
// optionEncryptedModel.setHTML(EXPORT_ENCRYPTED_REPORT); // optionEncryptedModel.setHTML(EXPORT_ENCRYPTED_REPORT);
optionEncryptedModel.setCommand(generateEncryptedModel);
// //
importModel.setHTML("Import from Template or Report"); importModel.setHTML("Import from Template or Report");
importModel.setCommand(importModelOrReport); importModel.setScheduledCommand(importModelOrReport);
viewMetadata.setHTML("View Metadata"); viewMetadata.setHTML("View Metadata");
viewMetadata.setCommand(openMetadata); viewMetadata.setScheduledCommand(openMetadata);
viewComments.setHTML(VIEW_USER_COMMENTS); viewComments.setHTML(VIEW_USER_COMMENTS);
viewComments.setCommand(showUserComments); viewComments.setScheduledCommand(showUserComments);
discardSection.setHTML("Discard current"); discardSection.setHTML("Discard current");
discardSection.setCommand(discardSectionCom); discardSection.setScheduledCommand(discardSectionCom);
} }
/** /**
@ -467,7 +468,7 @@ public class Headerbar extends Composite{
*/ */
public void enableBiblioEntry(RichTextArea d4sArea) { public void enableBiblioEntry(RichTextArea d4sArea) {
addBiblioEntry.setHTML(ADD_BIBLIO_ENTRY); addBiblioEntry.setHTML(ADD_BIBLIO_ENTRY);
addBiblioEntry.setCommand(addBiblioEntryCommand); addBiblioEntry.setScheduledCommand(addBiblioEntryCommand);
presenter.setAreaForBiblio(d4sArea); presenter.setAreaForBiblio(d4sArea);
} }
@ -555,43 +556,43 @@ public class Headerbar extends Composite{
//************** COMMANDS ********************************//// //************** COMMANDS ********************************////
Command generateFimes = new Command() { ScheduledCommand generateFimes = new ScheduledCommand() {
public void execute() { public void execute() {
presenter.generateFiMES(templateModel); presenter.generateFiMES(templateModel);
} }
}; };
Command generateDOCX = new Command() { ScheduledCommand generateDOCX = new ScheduledCommand() {
public void execute() { public void execute() {
presenter.generateManifestation(templateModel, ExportManifestationType.DOCX); presenter.generateManifestation(templateModel, ExportManifestationType.DOCX);
} }
}; };
Command generatePDF = new Command() { ScheduledCommand generatePDF = new ScheduledCommand() {
public void execute() { public void execute() {
// Window.alert("PDF Exporting may not be fully working, you can also generate a PDF using your Word Processor application starting from the docx exported file"); // Window.alert("PDF Exporting may not be fully working, you can also generate a PDF using your Word Processor application starting from the docx exported file");
presenter.generateManifestation(templateModel, ExportManifestationType.PDF); presenter.generateManifestation(templateModel, ExportManifestationType.PDF);
} }
}; };
Command generateHTML = new Command() { ScheduledCommand generateHTML = new ScheduledCommand() {
public void execute() { public void execute() {
presenter.generateManifestation(templateModel, ExportManifestationType.HTML); presenter.generateManifestation(templateModel, ExportManifestationType.HTML);
} }
}; };
Command generatedXML = new Command() { ScheduledCommand generatedXML = new ScheduledCommand() {
public void execute() { public void execute() {
presenter.generateManifestation(templateModel, ExportManifestationType.XML); presenter.generateManifestation(templateModel, ExportManifestationType.XML);
} }
}; };
Command generateEncryptedModel = new Command() { ScheduledCommand generateEncryptedModel = new ScheduledCommand() {
@Override @Override
public void execute() { public void execute() {
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() { GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
public void onSuccess() { public void onSuccess() {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Select the Report (or Template) to encrypt ", true, true); WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup( "Select the Report (or Template) to encrypt ", true, true);
wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT); wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT);
wpTreepopup.setSelectableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT); wpTreepopup.setSelectableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT);
@ -607,7 +608,6 @@ public class Headerbar extends Composite{
} }
}); });
wpTreepopup.center(); wpTreepopup.center();
wpTreepopup.show(); wpTreepopup.show();
} }
@ -620,7 +620,7 @@ public class Headerbar extends Composite{
}; };
Command discardSectionCom = new Command() { ScheduledCommand discardSectionCom = new ScheduledCommand() {
public void execute() { public void execute() {
presenter.discardCurrentSection(); presenter.discardCurrentSection();
} }

View File

@ -15,12 +15,12 @@ import org.gcube.portlets.user.reportgenerator.client.ReportConstants;
import org.gcube.portlets.user.reportgenerator.client.ReportGenerator; import org.gcube.portlets.user.reportgenerator.client.ReportGenerator;
import org.gcube.portlets.user.reportgenerator.client.ReportService; import org.gcube.portlets.user.reportgenerator.client.ReportService;
import org.gcube.portlets.user.reportgenerator.client.ReportServiceAsync; import org.gcube.portlets.user.reportgenerator.client.ReportServiceAsync;
import org.gcube.portlets.user.reportgenerator.client.ReportStructurePanel;
import org.gcube.portlets.user.reportgenerator.client.TitleBar; import org.gcube.portlets.user.reportgenerator.client.TitleBar;
import org.gcube.portlets.user.reportgenerator.client.ToolboxPanel; import org.gcube.portlets.user.reportgenerator.client.ToolboxPanel;
import org.gcube.portlets.user.reportgenerator.client.WorkspacePanel; import org.gcube.portlets.user.reportgenerator.client.WorkspacePanel;
import org.gcube.portlets.user.reportgenerator.client.dialog.AddBiblioEntryDialog; import org.gcube.portlets.user.reportgenerator.client.dialog.AddBiblioEntryDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.DeleteCitationsDialog; import org.gcube.portlets.user.reportgenerator.client.dialog.DeleteCitationsDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.ReportStructureDialog;
import org.gcube.portlets.user.reportgenerator.client.dialog.WaitingOperationDialog; import org.gcube.portlets.user.reportgenerator.client.dialog.WaitingOperationDialog;
import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEvent; import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEvent;
import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEventHandler; import org.gcube.portlets.user.reportgenerator.client.events.AddBiblioEventHandler;
@ -68,7 +68,6 @@ import org.gcube.portlets.widgets.userselection.client.events.UsersFetchedEvent;
import org.gcube.portlets.widgets.userselection.shared.ItemSelectableBean; import org.gcube.portlets.widgets.userselection.shared.ItemSelectableBean;
import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.MessageBox;
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.event.shared.HandlerManager; import com.google.gwt.event.shared.HandlerManager;
@ -885,6 +884,9 @@ public class Presenter {
} }
if (currPage > 1) if (currPage > 1)
titleBar.getSectionSwitchPanel().showPrevButton(); titleBar.getSectionSwitchPanel().showPrevButton();
//show the structure
showReportStructure();
} }
/** /**
@ -1203,29 +1205,8 @@ public class Presenter {
public void showReportStructure() { public void showReportStructure() {
GWT.runAsync(ReportStructureDialog.class, new RunAsyncCallback() { toolBoxPanel.showStructure(new ReportStructurePanel(eventBus, model.getSerializableModel(), ToolboxPanel.TOOLBOX_WIDTH+"px", ToolboxPanel.TOOLBOX_HEIGHT+"px"));
@Override }
public void onSuccess() {
ReportStructureDialog panel = new ReportStructureDialog(eventBus, model.getSerializableModel(), ToolboxPanel.TOOLBOX_WIDTH+"px", ToolboxPanel.TOOLBOX_HEIGHT+"px");
final com.extjs.gxt.ui.client.widget.Window window = new com.extjs.gxt.ui.client.widget.Window();
window.setTitle("Report Structure");
window.setClosable(true);
window.setResizable(false);
window.setWidth(ToolboxPanel.TOOLBOX_WIDTH);
window.setHeight(ToolboxPanel.TOOLBOX_HEIGHT);
window.setPlain(true);
window.setLayout(new FitLayout());
window.add(panel);
panel.getElement().getStyle().setBackgroundColor("#FFF");
window.setPosition(0, getToolBoxPanel().getAbsoluteTop());
window.show();
}
@Override
public void onFailure(Throwable reason) {
}
});
}
public HorizontalPanel getExportsPanel() { public HorizontalPanel getExportsPanel() {
return exportsPanel; return exportsPanel;

View File

@ -118,7 +118,7 @@ public class ReportGenerator implements EntryPoint {
cellPanel.add(toolBoxPanel); cellPanel.add(toolBoxPanel);
cellPanel.add(bottomScrollerPanel); cellPanel.add(bottomScrollerPanel);
cellPanel.setCellWidth(toolBoxPanel, "230"); cellPanel.setCellWidth(toolBoxPanel, "10px");
mainLayout.add(cellPanel); mainLayout.add(cellPanel);

View File

@ -1,19 +1,26 @@
package org.gcube.portlets.user.reportgenerator.client.dialog; package org.gcube.portlets.user.reportgenerator.client;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Vector; import java.util.Vector;
import org.gcube.application.reporting.component.ReportSequence;
import org.gcube.portlets.d4sreporting.common.shared.AttributeArea;
import org.gcube.portlets.d4sreporting.common.shared.BasicComponent; import org.gcube.portlets.d4sreporting.common.shared.BasicComponent;
import org.gcube.portlets.d4sreporting.common.shared.Model;
import org.gcube.portlets.d4sreporting.common.shared.BasicSection; import org.gcube.portlets.d4sreporting.common.shared.BasicSection;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.Model;
import org.gcube.portlets.d4sreporting.common.shared.RepeatableSequence;
import org.gcube.portlets.d4sreporting.common.shared.ReportReferences;
import org.gcube.portlets.user.reportgenerator.client.events.ItemSelectionEvent; import org.gcube.portlets.user.reportgenerator.client.events.ItemSelectionEvent;
import org.gcube.portlets.user.reportgenerator.client.resources.FimesReportTreeStructureResources; import org.gcube.portlets.user.reportgenerator.client.resources.FimesReportTreeStructureResources;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.logical.shared.SelectionEvent; import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler; import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.resources.client.ImageResource; import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.Label;
@ -23,22 +30,24 @@ import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
public class ReportStructureDialog extends ScrollPanel{ public class ReportStructurePanel extends ScrollPanel{
public ReportStructureDialog(final HandlerManager eventBus, final Model report, Tree t;
final String height, final String width) { TreeItem root ;
public ReportStructurePanel(final HandlerManager eventBus, final Model report, final String width, final String height) {
this.setWidth(width); setWidth(width);
this.setHeight(height); setHeight(height);
Tree t = new Tree();
t = new Tree();
t.setAnimationEnabled(true); t.setAnimationEnabled(true);
t.addItem(loadReportRootTree(report)); root = loadReportRootTree(report);
t.addItem(root);
t.addSelectionHandler(new SelectionHandler<TreeItem>() { t.addSelectionHandler(new SelectionHandler<TreeItem>() {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void onSelection(SelectionEvent<TreeItem> event) { public void onSelection(SelectionEvent<TreeItem> event) {
// TODO Auto-generated method stub
TreeItem item = event.getSelectedItem(); TreeItem item = event.getSelectedItem();
HashMap<String,Object> map = (HashMap<String, Object>)item.getUserObject(); HashMap<String,Object> map = (HashMap<String, Object>)item.getUserObject();
eventBus.fireEvent(new ItemSelectionEvent(map)); eventBus.fireEvent(new ItemSelectionEvent(map));
@ -46,32 +55,52 @@ public class ReportStructureDialog extends ScrollPanel{
}); });
this.add(t); this.add(t);
root.setState(true);
getElement().getStyle().setPaddingLeft(10, Unit.PX);
getElement().getStyle().setPaddingTop(10, Unit.PX);
expandtree();
}
private void expandtree() {
Timer t = new Timer() {
@Override
public void run() {
for (int i = 0; i < root.getChildCount(); i++) {
root.getChild(i).setState(true);
}
}
};
t.schedule(500);
} }
private TreeItem loadReportRootTree(final Model report) { private TreeItem loadReportRootTree(final Model report) {
// Add root node // Add root node
ImageResource image = FimesReportTreeStructureResources.INSTANCE.root(); ImageResource image = FimesReportTreeStructureResources.INSTANCE.root();
HorizontalPanel node = createNodeWidget(image, report.getTemplateName(),"gwt-label-rootTree"); HorizontalPanel node = createNodeWidget(image, "Structure View","gwt-label-rootTree");
TreeItem root = new TreeItem(node); TreeItem root = new TreeItem(node);
root.setStyleName("treeContainer");
Vector<BasicSection> sections = report.getSections(); Vector<BasicSection> sections = report.getSections();
for(int i = 1; i <= sections.size(); i++) { for(int i = 1; i <= sections.size(); i++) {
BasicSection s = sections.get(i - 1); BasicSection s = sections.get(i - 1);
// Add section item // Add section item
image = FimesReportTreeStructureResources.INSTANCE.section(); image = FimesReportTreeStructureResources.INSTANCE.section();
node = createNodeWidget(image, "Section" + i,"gwt-label-sectionTree"); node = createNodeWidget(image, "Section " + i,"gwt-label-sectionTree");
TreeItem sectionItem = addChildItemToParentItem(root, "Section", Integer.toString(i -1), node); TreeItem sectionItem = addChildItemToParentItem(root, "Section", Integer.toString(i -1), node);
addItemsComponent(sectionItem, s); sectionItem.setState(true);
addItemsComponent(sectionItem, s.getComponents());
} }
return root; return root;
} }
private void addItemsComponent(final TreeItem sectionItem,final BasicSection sectionModel) { private void addItemsComponent(final TreeItem sectionItem,final List<BasicComponent> components ) {
List<BasicComponent> components = sectionModel.getComponents();
for(int i = 0; i < components.size(); i++) { for(int i = 0; i < components.size(); i++) {
BasicComponent c = components.get(i); BasicComponent c = components.get(i);
@ -104,7 +133,7 @@ public class ReportStructureDialog extends ScrollPanel{
} }
case INSTRUCTION: { case INSTRUCTION: {
ImageResource image = FimesReportTreeStructureResources.INSTANCE.instructions(); ImageResource image = FimesReportTreeStructureResources.INSTANCE.instructions();
node = createNodeWidget(image, "Instruction","gwt-label-componentTree"); node = createNodeWidget(image, "Instructions","gwt-label-componentTree");
break; break;
} }
case COMMENT: { case COMMENT: {
@ -127,10 +156,32 @@ public class ReportStructureDialog extends ScrollPanel{
node = createNodeWidget(image, "Table","gwt-label-componentTree"); node = createNodeWidget(image, "Table","gwt-label-componentTree");
break; break;
} }
case ATTRIBUTE_MULTI: { case ATTRIBUTE_MULTI: {
// TODO AttributeArea ar = (AttributeArea) c.getPossibleContent();
ImageResource image = FimesReportTreeStructureResources.INSTANCE.comments(); ImageResource image = FimesReportTreeStructureResources.INSTANCE.checkbox();
node = createNodeWidget(image, "Attribute","gwt-label-componentTree"); node = createNodeWidget(image, ar.getAttrName(),"gwt-label-componentTree");
break;
}
case ATTRIBUTE_UNIQUE: {
AttributeArea ar = (AttributeArea) c.getPossibleContent();
ImageResource image = FimesReportTreeStructureResources.INSTANCE.radio();
node = createNodeWidget(image, ar.getAttrName(),"gwt-label-componentTree");
break;
}
case BODY_TABLE_IMAGE: {
RepeatableSequence rs = (RepeatableSequence) c.getPossibleContent();
addItemsComponent(sectionItem, rs.getGroupedComponents());
break;
}
case REPEAT_SEQUENCE: {
RepeatableSequence rs = (RepeatableSequence) c.getPossibleContent();
addItemsComponent(sectionItem, rs.getGroupedComponents());
break;
}
case REPORT_REFERENCE: {
ReportReferences rf = (ReportReferences) c.getPossibleContent();
ImageResource image = FimesReportTreeStructureResources.INSTANCE.reference();
node = createNodeWidget(image, rf.getRefType(),"gwt-label-componentTree");
break; break;
} }
case TOC: case TOC:
@ -147,9 +198,10 @@ public class ReportStructureDialog extends ScrollPanel{
break; break;
} }
if (node != null) if (node != null && c.getType() != ComponentType.REPEAT_SEQUENCE) {
addChildItemToParentItem(sectionItem, "Component", addChildItemToParentItem(sectionItem, "Component",
Integer.toString(i), node); Integer.toString(i), node);
}
} }
} }
@ -178,7 +230,6 @@ public class ReportStructureDialog extends ScrollPanel{
String cssStyle) { String cssStyle) {
HorizontalPanel node = new HorizontalPanel(); HorizontalPanel node = new HorizontalPanel();
node.setSpacing(0);
Image image = new Image(imageResource); Image image = new Image(imageResource);
image.setPixelSize(image.getWidth() + 5, image.getHeight()); image.setPixelSize(image.getWidth() + 5, image.getHeight());
node.add(image); node.add(image);
@ -188,7 +239,6 @@ public class ReportStructureDialog extends ScrollPanel{
shortTitle = shortTitle.substring(0,25) + "..."; shortTitle = shortTitle.substring(0,25) + "...";
Label text = new Label(shortTitle); Label text = new Label(shortTitle);
text.setStyleName(cssStyle);
node.add(text); node.add(text);
return node; return node;
} }

View File

@ -3,8 +3,6 @@ package org.gcube.portlets.user.reportgenerator.client;
import org.gcube.portlets.user.workspace.client.AppControllerExplorer; import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent; import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent;
import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent.DownloadType; import org.gcube.portlets.user.workspace.client.event.FileDownloadEvent.DownloadType;
import org.gcube.portlets.user.workspace.client.event.FileUploadEvent;
import org.gcube.portlets.user.workspace.client.event.FileUploadEvent.UploadType;
import org.gcube.portlets.user.workspace.client.view.tree.AsyncTreePanel; import org.gcube.portlets.user.workspace.client.view.tree.AsyncTreePanel;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
@ -28,13 +26,19 @@ public class ToolboxPanel extends SimplePanel {
public static final int TOOLBOX_HEIGHT= 800; public static final int TOOLBOX_HEIGHT= 800;
public ToolboxPanel(AppControllerExplorer appController) { public ToolboxPanel(AppControllerExplorer appController) {
// this.appController = appController; this.appController = appController;
// AsyncTreePanel tp = appController.getTree(TOOLBOX_WIDTH, TOOLBOX_HEIGHT); // AsyncTreePanel tp = appController.getTree(TOOLBOX_WIDTH, TOOLBOX_HEIGHT);
// this.tp = tp; // this.tp = tp;
// add(tp); // add(tp);
// this.appController.hideSharingFacilities(); //sharing disabled we have problems from Reports // this.appController.hideSharingFacilities(); //sharing disabled we have problems from Reports
} }
public void showStructure(ReportStructurePanel panel) {
clear();
setWidth("240px");
add(panel);
}
public void showExportedVersion(String id, String fileName) { public void showExportedVersion(String id, String fileName) {
GWT.log("showExportedVersion"); GWT.log("showExportedVersion");
AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(id, fileName, DownloadType.SHOW)); AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(id, fileName, DownloadType.SHOW));
@ -43,13 +47,13 @@ public class ToolboxPanel extends SimplePanel {
* refresh the root * refresh the root
*/ */
public void refreshRoot() { public void refreshRoot() {
appController.refreshRoot(); //appController.refreshRoot();
} }
/** /**
* show upload file popup * show upload file popup
*/ */
public void showUploadFile() { public void showUploadFile() {
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(tp.getRootItem(), UploadType.FILE)); //AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(tp.getRootItem(), UploadType.FILE));
} }
/** /**
* lalala * lalala

View File

@ -195,6 +195,7 @@ public class TemplateComponent {
else { else {
HeadingTextArea bToAdd = new HeadingTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), width, 25, getUserComments() != null, showClose); HeadingTextArea bToAdd = new HeadingTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), width, 25, getUserComments() != null, showClose);
bToAdd.setText((String) sc.getPossibleContent()); bToAdd.setText((String) sc.getPossibleContent());
bToAdd.setMetadata(sc.getMetadata());
this.content = bToAdd; this.content = bToAdd;
} }
break; break;
@ -213,6 +214,7 @@ public class TemplateComponent {
int changedWidth = width -5; //because of the inner padding int changedWidth = width -5; //because of the inner padding
BasicTextArea bToAdd = new BasicTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), changedWidth, 25, getUserComments() != null, showClose); BasicTextArea bToAdd = new BasicTextArea(sc.getType(), presenter, sc.getX(), sc.getY(), changedWidth, 25, getUserComments() != null, showClose);
bToAdd.setText((String) sc.getPossibleContent()); bToAdd.setText((String) sc.getPossibleContent());
bToAdd.setMetadata(sc.getMetadata());
this.content = bToAdd; this.content = bToAdd;
} }
break; break;
@ -373,7 +375,6 @@ public class TemplateComponent {
this.content = tti; this.content = tti;
break; break;
case REPORT_REFERENCE: case REPORT_REFERENCE:
//Log.debug("FOUND Master SEQUENCE trying getGroup");
GWT.log("FOUND Master SEQUENCE trying getGroup"); GWT.log("FOUND Master SEQUENCE trying getGroup");
ReportReferences ref = (ReportReferences) sc.getPossibleContent(); ReportReferences ref = (ReportReferences) sc.getPossibleContent();
@ -414,6 +415,7 @@ public class TemplateComponent {
public BasicComponent getSerializable() { public BasicComponent getSerializable() {
Serializable content = ""; Serializable content = "";
String id = ""; String id = "";
List<Metadata> metas = null;
switch (this.getType()) { switch (this.getType()) {
case DYNA_IMAGE: case DYNA_IMAGE:
ClientImage da = (ClientImage) this.content; ClientImage da = (ClientImage) this.content;
@ -422,7 +424,7 @@ public class TemplateComponent {
idInBasket = id; idInBasket = id;
if (((String) content).compareTo("") == 0) if (((String) content).compareTo("") == 0)
content = DEFAULT_IMAGE_PATH; content = DEFAULT_IMAGE_PATH;
metadata = da.getMetadata(); metas = da.getMetadata();
width = da.getImageWidth(); width = da.getImageWidth();
height = da.getImageHeight(); height = da.getImageHeight();
break; break;
@ -443,15 +445,19 @@ public class TemplateComponent {
if (this.isLocked()) { if (this.isLocked()) {
content = ((HTML) this.content).getText(); content = ((HTML) this.content).getText();
} }
else else {
content = ((HeadingTextArea) this.content).getText(); content = ((HeadingTextArea) this.content).getText();
metas = ((HeadingTextArea) this.content).getMetadata();
}
break; break;
case BODY_NOT_FORMATTED: case BODY_NOT_FORMATTED:
if (this.isLocked()) { if (this.isLocked()) {
content = ((HTML) this.content).getText(); content = ((HTML) this.content).getText();
} }
else else {
content = ((BasicTextArea) this.content).getText(); content = ((BasicTextArea) this.content).getText();
metas = ((BasicTextArea) this.content).getMetadata();
}
break; break;
case TIME_SERIES: case TIME_SERIES:
GWT.log("Found Time Series", null); GWT.log("Found Time Series", null);
@ -494,7 +500,7 @@ public class TemplateComponent {
break; break;
} }
return new BasicComponent(x, y, width, height, templatePage, type, idInBasket, "param empty", content, this.doubleColLayout, isLocked(), metadata); return new BasicComponent(x, y, width, height, templatePage, type, idInBasket, "param empty", content, this.doubleColLayout, isLocked(), metas);
} }
/** /**

View File

@ -6,7 +6,7 @@ import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.ClientBundle.Source; import com.google.gwt.resources.client.ClientBundle.Source;
public interface FimesReportTreeStructureResources extends ClientBundle { public interface FimesReportTreeStructureResources extends ClientBundle {
public static final FimesReportTreeStructureResources INSTANCE = GWT.create(FimesReportTreeStructureResources.class); public static final FimesReportTreeStructureResources INSTANCE = GWT.create(FimesReportTreeStructureResources.class);
@Source("report.png") @Source("report.png")
ImageResource root(); ImageResource root();
@ -14,18 +14,21 @@ public static final FimesReportTreeStructureResources INSTANCE = GWT.create(Fim
@Source("page.png") @Source("page.png")
ImageResource section(); ImageResource section();
@Source("text_heading_1.png") @Source("heading_1.png")
ImageResource heading1(); ImageResource heading1();
@Source("text_heading_2.png") @Source("heading_2.png")
ImageResource heading2(); ImageResource heading2();
@Source("text_heading_3.png") @Source("heading_3.png")
ImageResource heading3(); ImageResource heading3();
@Source("text_heading_4.png") @Source("heading_4.png")
ImageResource heading4(); ImageResource heading4();
@Source("heading_5.png")
ImageResource heading5();
@Source("text_dropcaps.png") @Source("text_dropcaps.png")
ImageResource text(); ImageResource text();
@ -35,11 +38,23 @@ public static final FimesReportTreeStructureResources INSTANCE = GWT.create(Fim
@Source("image.png") @Source("image.png")
ImageResource image(); ImageResource image();
@Source("information.png") @Source("instruction.png")
ImageResource instructions(); ImageResource instructions();
@Source("comments.png") @Source("comments.png")
ImageResource comments(); ImageResource comments();
@Source("sequence.png")
ImageResource sequence();
@Source("checkbox.png")
ImageResource checkbox();
@Source("radio.png")
ImageResource radio();
@Source("reference.png")
ImageResource reference();
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 778 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

View File

@ -1,6 +1,9 @@
package org.gcube.portlets.user.reportgenerator.client.targets; package org.gcube.portlets.user.reportgenerator.client.targets;
import java.util.List;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType; import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.Metadata;
import org.gcube.portlets.user.reportgenerator.client.UUID; import org.gcube.portlets.user.reportgenerator.client.UUID;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter; import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
@ -8,8 +11,6 @@ import com.google.gwt.event.dom.client.FocusEvent;
import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.dom.client.FocusHandler;
import com.google.gwt.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseOutEvent; import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler; import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.user.client.ui.RichTextArea; import com.google.gwt.user.client.ui.RichTextArea;
@ -23,6 +24,8 @@ import com.google.gwt.user.client.ui.Widget;
*/ */
public class BasicTextArea extends TextArea { public class BasicTextArea extends TextArea {
private String myId; private String myId;
//the properties associated
private List<Metadata> metas;
public BasicTextArea(ComponentType type, final Presenter presenter, int left, int top, final int width, final int height, boolean hasComments, boolean showClose) { public BasicTextArea(ComponentType type, final Presenter presenter, int left, int top, final int width, final int height, boolean hasComments, boolean showClose) {
@ -74,6 +77,18 @@ public class BasicTextArea extends TextArea {
return null; return null;
} }
public List<Metadata> getMetadata() {
return metas;
}
public void setMetadata(List<Metadata> metas) {
this.metas = metas;
}
/** /**
* This method actually makes resizable the textArea * This method actually makes resizable the textArea
* @param id * @param id

View File

@ -1,6 +1,9 @@
package org.gcube.portlets.user.reportgenerator.client.targets; package org.gcube.portlets.user.reportgenerator.client.targets;
import java.util.List;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType; import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.Metadata;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter; import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import com.google.gwt.event.dom.client.MouseOutEvent; import com.google.gwt.event.dom.client.MouseOutEvent;
@ -19,7 +22,7 @@ public class HeadingTextArea extends ReportTextArea {
private TextArea textArea = new TextArea(); private TextArea textArea = new TextArea();
private VerticalPanel myPanel; private VerticalPanel myPanel;
private Presenter presenter; private Presenter presenter;
private List<Metadata> metas;
int currHeight = 0; int currHeight = 0;
@ -85,5 +88,13 @@ public class HeadingTextArea extends ReportTextArea {
textArea.setText(text); textArea.setText(text);
} }
public List<Metadata> getMetadata() {
return metas;
}
public void setMetadata(List<Metadata> metas) {
this.metas = metas;
}
} }

View File

@ -31,11 +31,17 @@ import org.apache.commons.io.IOUtils;
import org.gcube.application.framework.accesslogger.library.impl.AccessLogger; import org.gcube.application.framework.accesslogger.library.impl.AccessLogger;
import org.gcube.application.framework.core.session.ASLSession; import org.gcube.application.framework.core.session.ASLSession;
import org.gcube.application.framework.core.session.SessionManager; import org.gcube.application.framework.core.session.SessionManager;
import org.gcube.application.reporting.ReportSequence;
import org.gcube.application.reporting.ReportsModeler; import org.gcube.application.reporting.ReportsModeler;
import org.gcube.application.reporting.component.Heading;
import org.gcube.application.reporting.component.Instruction;
import org.gcube.application.reporting.component.ReportSequence;
import org.gcube.application.reporting.component.TextInput;
import org.gcube.application.reporting.component.Title;
import org.gcube.application.reporting.reference.Column;
import org.gcube.application.reporting.reference.DBTableRow; import org.gcube.application.reporting.reference.DBTableRow;
import org.gcube.application.reporting.reference.ReferenceReport; import org.gcube.application.reporting.reference.ReferenceReport;
import org.gcube.application.reporting.reference.ReferenceReportType; import org.gcube.application.reporting.reference.ReferenceReportType;
import org.gcube.application.rsg.service.dto.NameValue;
import org.gcube.application.rsg.service.dto.ReportEntry; import org.gcube.application.rsg.service.dto.ReportEntry;
import org.gcube.application.rsg.service.dto.ReportType; import org.gcube.application.rsg.service.dto.ReportType;
import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager; import org.gcube.applicationsupportlayer.social.ApplicationNotificationsManager;
@ -67,7 +73,6 @@ import org.gcube.portlets.d4sreporting.common.server.ServiceUtil;
import org.gcube.portlets.d4sreporting.common.shared.BasicComponent; import org.gcube.portlets.d4sreporting.common.shared.BasicComponent;
import org.gcube.portlets.d4sreporting.common.shared.BasicSection; import org.gcube.portlets.d4sreporting.common.shared.BasicSection;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType; import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.Metadata;
import org.gcube.portlets.d4sreporting.common.shared.Model; import org.gcube.portlets.d4sreporting.common.shared.Model;
import org.gcube.portlets.d4sreporting.common.shared.RepTimeSeries; import org.gcube.portlets.d4sreporting.common.shared.RepTimeSeries;
import org.gcube.portlets.d4sreporting.common.shared.RepeatableSequence; import org.gcube.portlets.d4sreporting.common.shared.RepeatableSequence;
@ -1468,7 +1473,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
type.setTypeIdentifier("Vme"); type.setTypeIdentifier("Vme");
for (ReportEntry re : getFakeReports(type)) { for (ReportEntry re : getFakeReports(type)) {
toReturn.add(new ItemSelectableBean(""+re.getId(), re.getName(), "", VMETypeIdentifier.Vme.toString())); toReturn.add(new ItemSelectableBean(""+re.getId(), re.getNameValueList().get(0).getValue(), "", VMETypeIdentifier.Vme.toString()));
} }
return toReturn; return toReturn;
@ -1487,7 +1492,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
type.setTypeIdentifier(refType.toString()); type.setTypeIdentifier(refType.toString());
for (ReportEntry re : getFakeReports(type)) { for (ReportEntry re : getFakeReports(type)) {
toReturn.add(new ItemSelectableBean(""+re.getId(), re.getName(), "", refType.toString())); toReturn.add(new ItemSelectableBean(""+re.getId(), re.getNameValueList().get(0).getValue(), "", refType.toString()));
} }
return toReturn; return toReturn;
} }
@ -1501,7 +1506,11 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
re = new ReportEntry(); re = new ReportEntry();
re.setId(i); re.setId(i);
re.setName( "VME Name " + i); List<NameValue> namesValues = new ArrayList<NameValue>();
NameValue name = new NameValue();
name.setName( "VME Name " + i);
namesValues.add(name);
re.setNameValueList(namesValues);
toReturn.add(re); toReturn.add(re);
} }
} else { } else {
@ -1509,7 +1518,11 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
re = new ReportEntry(); re = new ReportEntry();
re.setId(i); re.setId(i);
re.setName( type.getTypeIdentifier() + "-" + i); List<NameValue> namesValues = new ArrayList<NameValue>();
NameValue name = new NameValue();
name.setName(type.getTypeIdentifier() + "-" + i);
namesValues.add(name);
re.setNameValueList(namesValues);
toReturn.add(re); toReturn.add(re);
} }
} }
@ -1527,14 +1540,13 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
new Date(), new Date(),
getASLSession().getUsername() getASLSession().getUsername()
); );
rm.addInstruction(null); rm.add(new Instruction(null));
rm.addTitle(name, false); rm.add(new Title(name, false));
rm.addHeading(1, "VME Name (Non Editable) "); rm.add(new Heading(1, "VME Name (Non Editable) "));
rm.addTextInput("Corner Rise Seamounts"); rm.add(new TextInput("Corner Rise Seamounts"));
rm.addHeading(2, "This is a Heading of Level 2 that is editable", false); rm.add(new Heading(2, "This is a Heading of Level 2 that is editable"));
rm.addTextInput("Corner Rise Seamounts2"); rm.add(new TextInput("Corner Rise Seamounts again"));
rm.addHeading(3, "This is a Heading of Level 3 that is editable", false); rm.add(new TextInput());
rm.addTextInput();
rm.nextSection(); rm.nextSection();
rm = addSection2(rm); rm = addSection2(rm);
try { try {
@ -1559,20 +1571,19 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
//construct the options (the references) //construct the options (the references)
ArrayList<DBTableRow> dBTableRows = new ArrayList<DBTableRow>(); ArrayList<DBTableRow> dBTableRows = new ArrayList<DBTableRow>();
ArrayList<Metadata> md = new ArrayList<Metadata>(); ArrayList<Column> md = new ArrayList<Column>();
Random generator = new Random(); Random generator = new Random();
int year = generator.nextInt(15) + 2000; int year = generator.nextInt(15) + 2000;
//construct the references //construct the references
md.add(new Metadata("Meeting Date", ""+year)); md.add(new Column("Meeting Date", ""+year));
md.add(new Metadata("Report Summary", "Aenean vulputate ac dui eu interdum. Nullam tincidunt hendrerit sollicitudin.")); md.add(new Column("Report Summary", "Aenean vulputate ac dui eu interdum. Nullam tincidunt hendrerit sollicitudin."));
md.add(new Metadata("Committee", "Lorem ipsum dolor sit amet, consectetur adipiscing elit")); md.add(new Column("Committee", "Lorem ipsum dolor sit amet, consectetur adipiscing elit"));
md.add(new Metadata("URL", "http://archive.nafo.int/open/fc/2012/fcdoc12-01.pdf")); md.add(new Column("URL", "http://archive.nafo.int/open/fc/2012/fcdoc12-01.pdf"));
md.add(new Metadata("Citation", "(Rossi et Al) adipiscing elit oekfha lfkahjf lakjfha lkfahjf alkjdfh ")); md.add(new Column("Citation", "(Rossi et Al) adipiscing elit oekfha lfkahjf lakjfha lkfahjf alkjdfh "));
md.add(new Metadata("Type", "The type")); md.add(new Column("Type", "The type"));
dBTableRows.add(new DBTableRow("primaryKey", md)); dBTableRows.add(new DBTableRow("primaryKey", md));
rm.add(new ReferenceReport(ReferenceReportType.InformationSource, dBTableRows));
rm.addReference(new ReferenceReport(ReferenceReportType.InformationSource, dBTableRows));
try { try {
return rm.getReportInstance(); return rm.getReportInstance();
} catch (Exception e) { } catch (Exception e) {
@ -1582,31 +1593,29 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
} }
private ReportsModeler addSection2(ReportsModeler rm) { private ReportsModeler addSection2(ReportsModeler rm) {
rm.addHeading(1, "Specific Measure"); rm.add(new Heading(1, "Specific Measure"));
ReportSequence seq = new ReportSequence(); ReportSequence seq = new ReportSequence(UUID.randomUUID().toString());
seq.addHeading(2, "year"); seq.add(new Heading(2, "Year"));
seq.addTextInput(); seq.add(new TextInput());
seq.addHeading(2, "Validity Period - Start"); seq.add(new Heading(2, "Validity Period - Start"));
seq.addTextInput(); seq.add(new TextInput());
seq.addHeading(2, "Validity Period - End"); seq.add(new Heading(2, "Validity Period - End"));
seq.addTextInput(); seq.add(new TextInput());
//construct the options (the references) //construct the options (the references)
ArrayList<DBTableRow> dBTableRows = new ArrayList<DBTableRow>(); ArrayList<DBTableRow> dBTableRows = new ArrayList<DBTableRow>();
ArrayList<Metadata> md = new ArrayList<Metadata>(); ArrayList<Column> md = new ArrayList<Column>();
//construct the references //construct the references
md.add(new Metadata("Meeting Date", "2009")); md.add(new Column("Meeting Date", "2009"));
md.add(new Metadata("Report Summary", "Aenean vulputate ac dui eu interdum. Nullam tincidunt hendrerit sollicitudin.")); md.add(new Column("Report Summary", "Aenean vulputate ac dui eu interdum. Nullam tincidunt hendrerit sollicitudin."));
md.add(new Metadata("Committee", "Lorem ipsum dolor sit amet, consectetur adipiscing elit")); md.add(new Column("Committee", "Lorem ipsum dolor sit amet, consectetur adipiscing elit"));
md.add(new Metadata("URL", "http://archive.nafo.int/open/fc/2012/fcdoc12-01.pdf")); md.add(new Column("URL", "http://archive.nafo.int/open/fc/2012/fcdoc12-01.pdf"));
md.add(new Metadata("Citation", "(Rossi et Al) adipiscing elit oekfha lfkahjf lakjfha lkfahjf alkjdfh ")); md.add(new Column("Citation", "(Rossi et Al) adipiscing elit oekfha lfkahjf lakjfha lkfahjf alkjdfh "));
md.add(new Metadata("Type", "The type")); md.add(new Column("Type", "The type"));
dBTableRows.add(new DBTableRow("primaryKey", md)); dBTableRows.add(new DBTableRow("primaryKey", md));
seq.addReference(new ReferenceReport(ReferenceReportType.InformationSource, dBTableRows)); seq.add(new ReferenceReport(ReferenceReportType.InformationSource, dBTableRows));
rm.addSequence("a key", seq); rm.add(seq);
return rm; return rm;
} }

View File

@ -4,7 +4,7 @@
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<!-- To Comment out --> <!-- To Comment out -->
<set-property name="user.agent" value="gecko1_8" /> <!-- <set-property name="user.agent" value="gecko1_8" /> -->
<inherits name='org.gcube.portlets.widgets.userselection.UserSelection' /> <inherits name='org.gcube.portlets.widgets.userselection.UserSelection' />
<inherits <inherits