1 5 package org.exoplatform.portal.faces.renderer.xhtmlmp.page; 6 7 import java.util.* ; 8 import java.io.IOException ; 9 import javax.faces.context.FacesContext; 10 import javax.faces.context.ResponseWriter ; 11 import org.exoplatform.portal.faces.component.*; 12 13 21 public class PageRenderer 22 extends org.exoplatform.portal.faces.renderer.html.page.PageRenderer { 23 24 protected void renderViewMode(FacesContext context, UIPage uiPage) throws IOException { 25 ResponseWriter w = context.getResponseWriter(); 26 UIPortlet maximizedPortlet = uiPage.getMaximizedPortlet() ; 27 w.write("<div class='"); w.write(uiPage.getDecorator()); w.write("-page'"); 28 w.write(" id='") ; w.write(uiPage.getId());w.write("'>") ; 29 if (maximizedPortlet != null) { 30 maximizedPortlet.encodeBegin(context); 31 maximizedPortlet.encodeChildren(context); 32 maximizedPortlet.encodeEnd(context); 33 } else { 34 List children = uiPage.getChildren(); 35 int childrenSize = children.size() ; 36 for(int i=0 ; i < childrenSize; i++) { 37 UIBasicComponent uiChild = (UIBasicComponent) children.get(i) ; 38 uiChild.encodeBegin(context); 39 uiChild.encodeChildren(context); 40 uiChild.encodeEnd(context); 41 } 42 } 43 w.write("</div>") ; 44 } 45 } | Popular Tags |