1 5 package org.exoplatform.portlets.iframe.renderer.html; 6 7 import javax.faces.component.UIComponent; 8 import javax.faces.context.FacesContext; 9 import javax.faces.context.ResponseWriter; 10 import org.exoplatform.faces.core.renderer.html.HtmlBasicRenderer; 11 import org.exoplatform.portlets.iframe.component.*; 12 import java.io.IOException ; 13 14 18 public class IframeRenderer extends HtmlBasicRenderer { 19 20 final public void encodeBegin( FacesContext context, UIComponent component ) throws IOException { 21 ResponseWriter w = context.getResponseWriter() ; 22 UIIframe uiIframe = (UIIframe) component ; 23 w.write("<iframe style='border: none' SRC='"+ uiIframe.getFrameSource() + "'" + 24 " width='"+ uiIframe.getFrameWidth() + "'" + 25 " height='"+uiIframe.getFrameHeight()+"'" + 26 " scrolling='auto' frameborder='0'>") ; 27 w. write("[Your user agent does not support frames or is currently configured " + 28 "not to display frames. However, you may visit") ; 29 w.write("</iframe>"); 30 } 31 } 32 | Popular Tags |