Skip to content

Commit

Permalink
Fix issue in datable usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudy De Busscher committed May 23, 2015
1 parent 673fce8 commit 7198d49
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Version | For PrimeFaces
-----------| -------------
1.0 | 3.5
1.1 | 4.0
1.2 | 5.x
1.2.1 | 5.x

Version 1.2 has a bug!

When you want to add the artifact, put following snippets in your `pom.xml`

Expand All @@ -23,5 +25,5 @@ When you want to add the artifact, put following snippets in your `pom.xml`
<dependency>
<groupId>be.rubus.web.jsf.primefaces</groupId>
<artifactId>advanced-graphic-image</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</dependency>
17 changes: 16 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<artifactId>advanced-graphic-image</artifactId>
<name>Advanced Graphic image renderer</name>
<packaging>jar</packaging>
<version>1.2.0</version>
<version>1.2.1</version>

<properties>
<primefaces.version>5.0</primefaces.version>
Expand Down Expand Up @@ -65,6 +65,21 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<!--This plugin allows to run the example using mvn jetty:run -->
<groupId>org.mortbay.jetty</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -95,7 +95,7 @@ private String buildAdvancedImageSrc(FacesContext context, GraphicImage image) t
StringEncrypter encrypter = RequestContext.getCurrentInstance().getEncrypter();

ValueExpression expression = ValueExpressionAnalyzer.getExpression(context.getELContext(), image.getValueExpression("value"));
String rid = encrypter.encrypt(expression.getExpressionString());
String rid = encrypter.encrypt(expression.getExpressionString() + image.getClientId(context));

GraphicImageManager graphicImageManager = GraphicImageUtil.retrieveManager(context);
graphicImageManager.registerImage(streamedContent, rid);
Expand Down
2 changes: 1 addition & 1 deletion demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<dependency>
<groupId>be.rubus.web.jsf.primefaces</groupId>
<artifactId>advanced-graphic-image</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions demo/src/main/webapp/index.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@

<h:body>

<comp:customComp image="#{imageBean.image}"/>
<comp:customComp image="#{imageBean.image}" id="cust"/>

<p:dataTable value="#{imageBean.dataList}" var="data">
<p:column headerText="Code">
<h:outputText value="#{data.code}"/>
</p:column>
<p:column headerText="Image">
<p:graphicImage value="#{data.image}">
<p:graphicImage value="#{data.image}" id="tbl">
<!--x:advancedRenderering value="true"/-->
</p:graphicImage>
</p:column>
Expand Down

0 comments on commit 7198d49

Please sign in to comment.