1 5 package org.exoplatform.portal.faces.renderer.xhtmlmp.portlet; 6 7 import java.io.IOException ; 8 import java.util.ResourceBundle ; 9 10 import javax.faces.context.ResponseWriter; 11 import javax.portlet.WindowState; 12 import org.exoplatform.portal.faces.component.UIPortlet; 13 import org.exoplatform.services.portal.model.Portlet; 14 15 21 public class PortletRenderer 22 extends org.exoplatform.portal.faces.renderer.html.portlet.PortletRenderer { 23 24 protected void renderViewMode(ResponseWriter w, UIPortlet uiPortlet, ResourceBundle res, 25 String title, String content, String baseUrl) throws IOException { 26 Portlet model = uiPortlet.getPortletModel() ; 27 w.write("<table class='default-decorator'") ; 28 w.write(" id='") ; w.write(uiPortlet.getId());w.write("'>") ; 29 renderPortletHeaderBar(w, uiPortlet, res, title, baseUrl) ; 30 if (uiPortlet.getWindowState() != WindowState.MINIMIZED) { 31 renderPortletBody(w, uiPortlet, content) ; 32 } 33 renderPortletFooterBar(w, uiPortlet, title, baseUrl) ; 34 w.write("</table>\n"); 35 } 36 37 protected void renderPortletBody(ResponseWriter w, UIPortlet uiPortlet, String content) throws IOException { 38 w.write("<tr>\n<td colspan='2' class='default-portlet'>"); 39 w.write(content) ; 40 w.write("\n</td>\n</tr>\n"); 41 } 42 } | Popular Tags |