fixed images fot text/table/image

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71317 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-03-13 16:03:57 +00:00
parent 52db4b45b4
commit 17133b5c31
5 changed files with 13 additions and 17 deletions

View File

@ -1,7 +1,8 @@
#Wed Mar 13 12:12:28 CET 2013
=\=\=\=\=\=\=
<<<<<<<=.mine
>>>>>>>=.r71295
eclipse.preferences.version=1
lastWarOutDir=/home/gioia/workspace/reports/target/reports-4.0.5-SNAPSHOT
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.0.5-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -5,12 +5,6 @@
<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="/target/generated-sources/gwt"/>
<dependent-module archiveName="gcube-docx-generator-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-docx-generator/gcube-docx-generator">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="report-exporter-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/report-exporter-widget/report-exporter-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="reports"/>
</wb-module>

13
pom.xml
View File

@ -134,7 +134,11 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-docx-generator</artifactId>
<version>[1.2.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>report-exporter-widget</groupId>
<artifactId>report-exporter-widget</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
@ -152,7 +156,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>workspace-application-handler</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>${setScope}</scope>
<scope>${setScope}</scope>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
@ -240,11 +244,6 @@
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>report-exporter-widget</groupId>
<artifactId>report-exporter-widget</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
</dependencies>
<build>

View File

@ -254,7 +254,7 @@ public class TemplateComponent {
AttributeArea sata = (AttributeArea) sc.getPossibleContent();
//in the metadata in this case there an attribute for diplayType
if (sc.getMetadata() != null && sc.getMetadata().size() > 0) {
GWT.log("attr:"+ sc.getMetadata().get(0).getAttribute());
}
ta = new AttributeMultiSelection(presenter, sc.getX(), sc.getY(), width, height, sata, false);
}

View File

@ -172,6 +172,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
*/
private ASLSession getASLSession() {
String sessionID = this.getThreadLocalRequest().getSession().getId();
String user = (String) this.getThreadLocalRequest().getSession().getAttribute(ScopeHelper.USERNAME_ATTRIBUTE);
if (user == null) {
user = "massimiliano.assante";
@ -548,6 +549,7 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
*/
public String generateTempDocx(Model model) {
_log.info("Generating docx file");
DocxGenerator docxGenerator = new DocxGenerator(model);
_log.debug("DocxGenerator instanciated:");
@ -920,10 +922,10 @@ public class ReportServiceImpl extends RemoteServiceServlet implements ReportSe
_log.trace("NEW setPossibleContent: " + component.getPossibleContent());
}
}
if (component.getType() == ComponentType.REPEAT_SEQUENCE) {
if (component.getType() == ComponentType.REPEAT_SEQUENCE || component.getType() == ComponentType.BODY_TABLE_IMAGE) { //there could be images inside
RepeatableSequence res = (RepeatableSequence) component.getPossibleContent();
for (BasicComponent co : res.getGroupedComponents()) {
_log.debug("Found DP IN SEQUENCE: " + component.getPossibleContent());
_log.debug("Found Image IN SEQUENCE, type is: " + component.getType());
if (co.getIdInBasket() != null) {
String imageID = co.getIdInBasket();
String imageNameFile = UUID.randomUUID().toString();