Skip to content

Commit

Permalink
fixed issues rdicroce#13 - graphicsImage formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKvasn committed Sep 27, 2014
1 parent 0012443 commit 190b8eb
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.lapis.jsfexporter.impl.value;

import com.lapis.jsfexporter.spi.IValueFormatter;

import javax.faces.component.html.HtmlGraphicImage;
import javax.faces.context.FacesContext;

public class GraphicsImageFormatter implements IValueFormatter<HtmlGraphicImage> {
@Override
public Class<HtmlGraphicImage> getSupportedClass() {
return HtmlGraphicImage.class;
}

@Override
public int getPrecedence() {
return 0;
}

@Override
public String formatValue(FacesContext context, HtmlGraphicImage component) {
return component.getAlt();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ com.lapis.jsfexporter.impl.value.DefaultFormatter
com.lapis.jsfexporter.impl.value.OutputFormatFormatter
com.lapis.jsfexporter.impl.value.PanelGroupFormatter
com.lapis.jsfexporter.impl.value.SelectOneFormatter
com.lapis.jsfexporter.impl.value.ValueHolderFormatter
com.lapis.jsfexporter.impl.value.ValueHolderFormatter
com.lapis.jsfexporter.impl.value.GraphicsImageFormatter
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@
</p:column>
<p:column headerText="Button">
<p:commandButton value="Click me!"/>
</p:column>
<p:column headerText="Image - HTML" style="text-align: center;">
<h:graphicImage library="images" name="image.png" alt="this is image's alt"/>
</p:column>
<p:column headerText="Image - Primefaces" style="text-align: center;">
<p:graphicImage library="images" name="image2.gif" alt="this is second image's alt"/>
</p:column>
<p:column headerText="Actions" exportable="false">
<p:rowEditor/>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 190b8eb

Please sign in to comment.