1 5 package org.exoplatform.portlets.content.explorer.renderer.html; 6 7 import java.io.IOException ; 8 import javax.faces.component.UIComponent; 9 import javax.faces.context.FacesContext; 10 import javax.faces.context.ResponseWriter; 11 import org.exoplatform.faces.core.renderer.html.HtmlBasicRenderer; 12 import org.exoplatform.portlets.content.explorer.component.UIContentViewer; 13 14 21 public class ImageRenderer extends HtmlBasicRenderer { 22 23 final public void encodeBegin(FacesContext context, UIComponent component) throws IOException { 24 UIContentViewer uiDisplayer = (UIContentViewer) component; 25 ResponseWriter w = context.getResponseWriter() ; 26 w. write("<div style='margin: auto 0px; '>") ; 27 w. write("<img SRC='" + uiDisplayer.getContent() + "'/>") ; 28 w. write("</div>") ; 29 } 30 } | Popular Tags |