groupd also repor ref in list reports

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@86888 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-12-12 15:39:48 +00:00
parent 5b66b78810
commit 64b7e8bc40
14 changed files with 177 additions and 152 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.13-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/reports-4.6.15-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"/>
@ -19,11 +19,6 @@
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -31,5 +26,10 @@
</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.13-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/reports-4.6.15-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.13-SNAPSHOT lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.6.15-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -1,4 +1,3 @@
#Wed Feb 06 16:46:46 CET 2013
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="${module}"> <wb-module deploy-name="${module}">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
@ -8,10 +7,28 @@
<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"> <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> <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="reports-store-gateway-client-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-client/reports-store-gateway-client">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="gcube-reporting-library-3.4.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library"> <dependent-module archiveName="reports-store-gateway-support-model-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-support-model/reports-store-gateway-support-model">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-interface-dto-0.0.3-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>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-web-base-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-web-base/reports-store-gateway-web-base">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-support-compiler-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-support-compiler/reports-store-gateway-support-compiler">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-support-compiler-bridge-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-support-compiler-bridge/reports-store-gateway-support-compiler-bridge">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="reports-store-gateway-support-builder-0.0.3-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/reports-store-gateway-support-builder/reports-store-gateway-support-builder">
<dependency-type>uses</dependency-type>
</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">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </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"/>

View File

@ -2,6 +2,6 @@
<faceted-project> <faceted-project>
<fixed facet="wst.jsdt.web"/> <fixed facet="wst.jsdt.web"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.4"/> <installed facet="jst.web" version="2.4"/>
<installed facet="java" version="1.6"/>
</faceted-project> </faceted-project>

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.13-SNAPSHOT</version> <version>4.6.15-SNAPSHOT</version>
<name>gCube Reports Manager</name> <name>gCube Reports Manager</name>
<description> <description>
gCube Reports Portlet. gCube Reports Portlet.

View File

@ -52,7 +52,7 @@ public class Headerbar extends Composite{
private static final String EXPORT_HTML = "Export to HTML"; private static final String EXPORT_HTML = "Export to HTML";
private static final String EXPORT_FIMES = "Export to FiMES XML"; private static final String EXPORT_FIMES = "Export to FiMES XML";
private static final String EXPORT_XML = "Export to XML"; private static final String EXPORT_XML = "Export to XML";
private static final String IMPORT_VME = "Import VME Report"; private static final String IMPORT_VME = "Open VME Report";
private static final String IMPORT_VME_REF = "Import VME Reference Report"; private static final String IMPORT_VME_REF = "Import VME Reference Report";
// private static final String EXPORT_ENCRYPTED_REPORT = "Save an Encrypted Version to Desktop"; // private static final String EXPORT_ENCRYPTED_REPORT = "Save an Encrypted Version to Desktop";
@ -134,20 +134,22 @@ public class Headerbar extends Composite{
fileMenu = getFileMenu(); fileMenu = getFileMenu();
menuBar.addItem(fileMenu); menuBar.addItem(fileMenu);
separator1 = menuBar.addSeparator(); separator1 = menuBar.addSeparator();
vmeMenu = getVMEMenu();
menuBar.addItem(vmeMenu);
separator3 = menuBar.addSeparator();
viewMenu = getViewMenu(); viewMenu = getViewMenu();
menuBar.addItem(viewMenu); menuBar.addItem(viewMenu);
// separator2 = menuBar.addSeparator(); // separator2 = menuBar.addSeparator();
// sectionsMenu = getSectionMenu(); // sectionsMenu = getSectionMenu();
// menuBar.addItem(sectionsMenu); // menuBar.addItem(sectionsMenu);
separator3 = menuBar.addSeparator();
biblioMenu = getBiblioMenu(); // biblioMenu = getBiblioMenu();
menuBar.addItem(biblioMenu); // menuBar.addItem(biblioMenu);
separator4 = menuBar.addSeparator(); separator4 = menuBar.addSeparator();
exportMenu = getExportsMenu(); exportMenu = getExportsMenu();
menuBar.addItem(exportMenu); menuBar.addItem(exportMenu);
menuBar.addSeparator();
vmeMenu = getVMEMenu();
menuBar.addItem(vmeMenu);
mainLayout.setSize("100%", "24px"); mainLayout.setSize("100%", "24px");
@ -311,7 +313,7 @@ public class Headerbar extends Composite{
MenuBar importMenu = new MenuBar(true); MenuBar importMenu = new MenuBar(true);
importMenu.setAnimationEnabled(true); importMenu.setAnimationEnabled(true);
MenuItem toReturn = new MenuItem("VME Options", importMenu); MenuItem toReturn = new MenuItem("Edit VME", importMenu);
toReturn.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP); toReturn.getElement().getStyle().setWhiteSpace(WhiteSpace.NOWRAP);
Command importVMEReport = new Command() { Command importVMEReport = new Command() {
@ -324,17 +326,43 @@ public class Headerbar extends Composite{
importMenu.addItem(importVME); importMenu.addItem(importVME);
importMenu.addSeparator(); importMenu.addSeparator();
//add the submenu items for editing report refs
for (final VMETypeIdentifier type : VMETypeIdentifier.values()) { MenuItem item = new MenuItem("Edit VME General Measures", true, new Command() {
if (type != VMETypeIdentifier.Vme) { public void execute() {
MenuItem item = new MenuItem("Edit " + type.getId(), true, new Command() { presenter.showVMEReportRefImportDialog(VMETypeIdentifier.GeneralMeasure);
public void execute() {
presenter.showVMEReportRefImportDialog(type);
}
});
importMenu.addItem(item);
} }
} });
importMenu.addItem(item);
item = new MenuItem("Edit Information Sources", true, new Command() {
public void execute() {
presenter.showVMEReportRefImportDialog(VMETypeIdentifier.InformationSource);
}
});
importMenu.addItem(item);
item = new MenuItem("Edit Fishing footprint", true, new Command() {
public void execute() {
presenter.showVMEReportRefImportDialog(VMETypeIdentifier.FisheryAreasHistory);
}
});
importMenu.addItem(item);
item = new MenuItem("Edit Regional History of VMEs", true, new Command() {
public void execute() {
presenter.showVMEReportRefImportDialog(VMETypeIdentifier.VMEsHistory);
}
});
importMenu.addItem(item);
// item = new MenuItem("Edit Rfmo", true, new Command() {
// public void execute() {
// presenter.showVMEReportRefImportDialog(VMETypeIdentifier.Rfmo);
// }
// });
// importMenu.addItem(item);
importMenu.addSeparator(); importMenu.addSeparator();
MenuItem exportVME = new MenuItem("Export Current to VME-DB", true, importVMEReport); MenuItem exportVME = new MenuItem("Export Current to VME-DB", true, importVMEReport);
importMenu.addItem(exportVME); importMenu.addItem(exportVME);

View File

@ -132,8 +132,8 @@ public class ReportStructurePanel extends ScrollPanel{
break; break;
} }
case INSTRUCTION: { case INSTRUCTION: {
ImageResource image = FimesReportTreeStructureResources.INSTANCE.instructions(); // ImageResource image = FimesReportTreeStructureResources.INSTANCE.instructions();
node = createNodeWidget(image, "Instructions","gwt-label-componentTree"); // node = createNodeWidget(image, "Instructions","gwt-label-componentTree");
break; break;
} }
case COMMENT: { case COMMENT: {

View File

@ -31,7 +31,7 @@ import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.HorizontalPanel;
public class ImportVMEReportDialog extends Window { public class ImportVMEReportDialog extends Window {
private static final int WIDTH = 600; private static final int WIDTH = 700;
private static final int HEIGHT = 450; private static final int HEIGHT = 450;
private ReportServiceAsync reportService = (ReportServiceAsync) GWT.create(ReportService.class); private ReportServiceAsync reportService = (ReportServiceAsync) GWT.create(ReportService.class);
@ -68,7 +68,7 @@ public class ImportVMEReportDialog extends Window {
return false; return false;
} }
}; };
filter.setEmptyText("Filter by Title"); filter.setEmptyText("Filter by ...");
filter.setWidth("250px"); filter.setWidth("250px");
hp.add(filter); hp.add(filter);
hp.setPixelSize(250, 20); hp.setPixelSize(250, 20);
@ -78,23 +78,22 @@ public class ImportVMEReportDialog extends Window {
add(hp); add(hp);
add(mainPanel); add(mainPanel);
showLoading(); showLoading();
setHeading(getHeading(type, isAssociation));
if (type == VMETypeIdentifier.Vme) { if (type == VMETypeIdentifier.Vme) {
setHeading("Select the VME");
reportService.listVMEReports(new AsyncCallback<ArrayList<VMEReportBean>>() { reportService.listVMEReports(new AsyncCallback<ArrayList<VMEReportBean>>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
mainPanel.unmask(); mainPanel.unmask();
} }
@Override @Override
public void onSuccess(ArrayList<VMEReportBean> reports) { public void onSuccess(ArrayList<VMEReportBean> refReports) {
mainPanel.unmask(); mainPanel.unmask();
showAvailableReports(reports); showAvailableReports(refReports, isAssociation);
} }
}); });
} } else {
else {
setHeading("Select the " + type.getId());
reportService.listVMEReportRefByType(type, new AsyncCallback<ArrayList<VMEReportBean>>() { reportService.listVMEReportRefByType(type, new AsyncCallback<ArrayList<VMEReportBean>>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -104,113 +103,39 @@ public class ImportVMEReportDialog extends Window {
@Override @Override
public void onSuccess(ArrayList<VMEReportBean> refReports) { public void onSuccess(ArrayList<VMEReportBean> refReports) {
mainPanel.unmask(); mainPanel.unmask();
showAvailableReferenceReports(refReports, isAssociation); showAvailableReports(refReports, isAssociation);
} }
}); });
} }
} }
/**
*
* @param reports
*/
public void showAvailableReferenceReports(List<VMEReportBean> reports, boolean isAssociation) {
ColumnModel cm = null;
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
column.setId("id");
column.setHeader("ID");
column.setHidden(false);
column.setWidth(50);
column.setRowHeader(true);
configs.add(column);
column = new ColumnConfig();
column.setId("name");
column.setHeader("Indentifier");
column.setWidth(150);
configs.add(column);
cm = new ColumnModel(configs);
/**
* load the grid data
*/
ListStore<VMEReportBean> store = new ListStore <VMEReportBean>();
store.add(reports);
filter.bind(store);
filter.setEmptyText("Filter by Identifier");
final Grid<VMEReportBean> grid = new Grid<VMEReportBean>(store, cm);
grid.getElement().getStyle().setBorderWidth(0, Unit.PX);
grid.setAutoExpandColumn("name");
grid.setBorders(false);
grid.setStripeRows(true);
ContentPanel gridPanel = new ContentPanel(new FitLayout());
gridPanel.setHeaderVisible(false);
gridPanel.add(grid);
gridPanel.addButton(new Button("Cancel", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
hide();
}
}));
if (isAssociation) {
gridPanel.addButton(new Button("Associate Selected", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
hide();
eventBus.fireEvent(new SelectedReportEvent(grid.getSelectionModel().getSelectedItem().getId(), grid.getSelectionModel().getSelectedItem().getName(), type, true));
}
}));
}
else {
gridPanel.addButton(new Button("Edit Selected", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
hide();
eventBus.fireEvent(new SelectedReportEvent(grid.getSelectionModel().getSelectedItem().getId(), grid.getSelectionModel().getSelectedItem().getName(), type, false));
}
}));
}
mainPanel.add(gridPanel);
mainPanel.setLayout(new FitLayout());
mainPanel.layout();
}
/** /**
* view for collections step * view for collections step
* @param vDesc * @param vDesc
*/ */
public void showAvailableReports(List<VMEReportBean> reports) { public void showAvailableReports(List<VMEReportBean> reports, boolean isAssociation) {
ColumnModel cm = null; ColumnModel cm = null;
List<ColumnConfig> configs = new ArrayList<ColumnConfig>(); List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig(); ColumnConfig column = new ColumnConfig();
column.setId("rfmo"); column.setId("rfmo");
column.setHeader("Owner"); column.setHeader("Owner");
column.setWidth(50); column.setWidth(15);
configs.add(column); configs.add(column);
column = new ColumnConfig(); column = new ColumnConfig();
column.setId("name"); column.setId("name");
column.setHeader("VME Title"); column.setHeader(type == VMETypeIdentifier.Vme ? "VME Title" : "Identifier");
column.setWidth(150); column.setWidth(150);
configs.add(column); configs.add(column);
column = new ColumnConfig(); column = new ColumnConfig();
column.setId("id"); column.setId("id");
column.setHeader("ID"); column.setHeader("ID");
column.setWidth(30); column.setWidth(6);
configs.add(column); configs.add(column);
cm = new ColumnModel(configs); cm = new ColumnModel(configs);
@ -220,9 +145,9 @@ public class ImportVMEReportDialog extends Window {
GroupingStore<VMEReportBean> store = new GroupingStore<VMEReportBean>(); GroupingStore<VMEReportBean> store = new GroupingStore<VMEReportBean>();
store.add(reports); store.add(reports);
store.groupBy("rfmo"); store.groupBy("rfmo");
filter.setEmptyText(type == VMETypeIdentifier.Vme ? "Filter by Title" : "Filter by Identifier");
filter.bind(store); filter.bind(store);
final Grid<VMEReportBean> grid = new Grid<VMEReportBean>(store, cm); final Grid<VMEReportBean> grid = new Grid<VMEReportBean>(store, cm);
@ -251,13 +176,24 @@ public class ImportVMEReportDialog extends Window {
} }
})); }));
gridPanel.addButton(new Button("Import Selected", new SelectionListener<ButtonEvent>() { if (isAssociation) {
@Override gridPanel.addButton(new Button("Associate Selected", new SelectionListener<ButtonEvent>() {
public void componentSelected(ButtonEvent ce) { @Override
hide(); public void componentSelected(ButtonEvent ce) {
eventBus.fireEvent(new SelectedReportEvent(grid.getSelectionModel().getSelectedItem().getId(), grid.getSelectionModel().getSelectedItem().getName(), VMETypeIdentifier.Vme, false)); hide();
} eventBus.fireEvent(new SelectedReportEvent(grid.getSelectionModel().getSelectedItem().getId(), grid.getSelectionModel().getSelectedItem().getName(), type, true));
})); }
}));
}
else {
gridPanel.addButton(new Button("Open Selected", new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
hide();
eventBus.fireEvent(new SelectedReportEvent(grid.getSelectionModel().getSelectedItem().getId(), grid.getSelectionModel().getSelectedItem().getName(), type, false));
}
}));
}
mainPanel.add(gridPanel); mainPanel.add(gridPanel);
mainPanel.setLayout(new FitLayout()); mainPanel.setLayout(new FitLayout());
mainPanel.layout(); mainPanel.layout();
@ -268,4 +204,38 @@ public class ImportVMEReportDialog extends Window {
private void showLoading() { private void showLoading() {
mainPanel.mask("Asking for available Reports, please wait ... ", "loading-indicator"); mainPanel.mask("Asking for available Reports, please wait ... ", "loading-indicator");
} }
/**
* the heading of the window
* @param type
* @param isAssociation
* @return
*/
private String getHeading(VMETypeIdentifier type, boolean isAssociation) {
String toReturn = "";
switch (type) {
case Vme:
toReturn = "VME";
break;
case FisheryAreasHistory:
toReturn = "fishing foot print";
break;
case VMEsHistory:
toReturn = "regional history";
break;
case InformationSource:
toReturn = "Information Source";
break;
case GeneralMeasure:
toReturn = "General Measure";
break;
case Rfmo:
toReturn = "RFMO";
default:
toReturn = "Unknown Category!";
break;
}
toReturn = isAssociation ? "Associate " + toReturn : "Edit " + toReturn;
return toReturn;
}
} }

View File

@ -206,7 +206,7 @@ public class TemplateComponent {
area.addStyleName("readOnlyText"); area.addStyleName("readOnlyText");
//area.addStyleName(getStyle(sc.getType())); //area.addStyleName(getStyle(sc.getType()));
area.getElement().getStyle().setMarginTop(5, Unit.PX); area.getElement().getStyle().setMarginTop(5, Unit.PX);
area.setWidth(width+"px"); area.setWidth((width-30)+"px");
String content = (String) sc.getPossibleContent(); String content = (String) sc.getPossibleContent();
area.setText(preserveLineBreaks(content)); area.setText(preserveLineBreaks(content));
this.content = area; this.content = area;

View File

@ -122,7 +122,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
} }
if (first.isSelectNewEnabled()) { if (first.isSelectNewEnabled()) {
first = getMasterSequence(sequence); first = getRefSequence(p, this, sequence, true, false);
myPanel.clear(); myPanel.clear();
myPanel.add(first); myPanel.add(first);
tupleList.clear(); tupleList.clear();
@ -180,7 +180,7 @@ public class ClientReportReference extends Composite implements ClientSequence {
private SequenceWidget getRefSequence(Presenter p, ClientSequence owner, RepeatableSequence repSequence, boolean notRemovable, boolean isNew) { private SequenceWidget getRefSequence(Presenter p, ClientSequence owner, RepeatableSequence repSequence, boolean notRemovable, boolean isNew) {
SequenceWidget toReturn = new SequenceWidget(p, this, repSequence, notRemovable, isNew); SequenceWidget toReturn = new SequenceWidget(p, this, repSequence, notRemovable, isNew);
toReturn.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX); toReturn.getElement().getStyle().setMarginLeft(indentationValue, Unit.PX);
toReturn.getElement().getStyle().setBackgroundColor("#FFF"); toReturn.addStyleName("seqWidget-shadow");
toReturn.alignButtonsLeft(); toReturn.alignButtonsLeft();
return toReturn; return toReturn;
} }

View File

@ -46,7 +46,7 @@ public class SequenceWidget extends Composite {
myPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); myPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
myPanel.setStyleName("seqWidget"); myPanel.setStyleName("seqWidget");
int size = repSequence.getGroupedComponents().size(); int size = repSequence.getGroupedComponents().size();
GWT.log("SequenceWidget Size = " + size); //GWT.log("SequenceWidget Size = " + size);
for (int j = 0; j < size; j++) { for (int j = 0; j < size; j++) {
BasicComponent sComp = repSequence.getGroupedComponents().get(j); BasicComponent sComp = repSequence.getGroupedComponents().get(j);
if (j == size-1) { if (j == size-1) {
@ -66,13 +66,14 @@ public class SequenceWidget extends Composite {
} }
TemplateComponent toAdd = new TemplateComponent(p.getModel(), sComp, p, false, null); TemplateComponent toAdd = new TemplateComponent(p.getModel(), sComp, p, false, null);
if (isNew && sComp.getType() == ComponentType.REPORT_REFERENCE ) { //when adding a new Sequence blanks the Ref if (isNew && sComp.getType() == ComponentType.REPORT_REFERENCE ) { //when adding a new Sequence blanks the Ref
GWT.log("E' NOVA");
ClientReportReference cRef = (ClientReportReference) toAdd.getContent(); ClientReportReference cRef = (ClientReportReference) toAdd.getContent();
cRef.clear(); cRef.clear();
} }
add(toAdd); add(toAdd);
} } //end for
initWidget(myPanel); initWidget(myPanel);
if (notRemovable) { if (notRemovable) {

View File

@ -1527,7 +1527,8 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
} }
Model model = null; Model model = null;
try { try {
model = new ReportManagerReportBuilder().buildReport(cr, id, name, "unknown author", new Date(), new Date(), "uknown last editor").getReportInstance(); model = new ReportManagerReportBuilder().buildReport(cr);
model.setTemplateName(name);
} catch (ReportBuilderException e) { } catch (ReportBuilderException e) {
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } catch (Exception e) {
@ -1543,7 +1544,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
CompiledReport cr = rsgClient.getReferenceReportById(new ReportType(refType.getId()), id); CompiledReport cr = rsgClient.getReferenceReportById(new ReportType(refType.getId()), id);
Model model = null; Model model = null;
try { try {
model = new ReportManagerReportBuilder().buildReferenceReport(cr, id, "", "unknown author", new Date(), new Date(), "uknown last editor").getReportInstance(); model = new ReportManagerReportBuilder().buildReferenceReport(cr);
} catch (ReportBuilderException e) { } catch (ReportBuilderException e) {
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } catch (Exception e) {

View File

@ -188,8 +188,17 @@
.seqWidget { .seqWidget {
margin-top: 10px; margin-top: 10px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
} }
.seqWidget-shadow {
background-color: #FFF;
opacity: 0.9;
}
.grouping-inner { .grouping-inner {
background: url('images/grouping-border.png') repeat-x; background: url('images/grouping-border.png') repeat-x;
display: block; display: block;
@ -540,22 +549,22 @@ tableBorder td {
.heading2 { .heading2 {
background-image: url(images/heading_2.png); background-image: url(images/heading_2.png);
font-size: 15px; font-size: 14px;
} }
.heading2-label { .heading2-label {
font-size: 15px; font-size: 14px;
padding-left: 0px padding-left: 10px
} }
.heading3 { .heading3 {
background-image: url(images/heading_3.png); background-image: url(images/heading_3.png);
font-size: 13px; font-size: 12px;
} }
.heading3-label { .heading3-label {
font-size: 13px; font-size: 12px;
padding-left: 2px; padding-left: 20px;
} }
.heading4 { .heading4 {
@ -565,7 +574,7 @@ tableBorder td {
.heading4-label { .heading4-label {
font-size: 11px; font-size: 11px;
padding-left: 10px; padding-left: 30px;
} }
.heading5 { .heading5 {
@ -575,7 +584,7 @@ tableBorder td {
.heading5-label { .heading5-label {
font-size: 10px; font-size: 10px;
padding-left: 25px; padding-left: 40px;
} }
.simpleText { .simpleText {
@ -589,7 +598,7 @@ tableBorder td {
color: #333; color: #333;
text-align:justify; text-align:justify;
text-justify:inter-word; text-justify:inter-word;
padding-left: 5px; padding-left: 20px;
} }