1 9 10 package org.jboss.portal.core.theme.render.impl; 11 12 import org.jboss.portal.server.output.FragmentResult; 13 import org.jboss.portal.server.theme.Item; 14 import org.jboss.portal.server.theme.Region; 15 import org.jboss.portal.server.theme.render.RegionRenderer; 16 import org.jboss.portal.server.theme.render.RenderContext; 17 import org.jboss.portal.server.theme.render.RenderException; 18 19 import java.util.Iterator ; 20 21 28 public class DivRegionRenderer 29 implements RegionRenderer 30 { 31 34 public void render(RenderContext renderContext, Region region) throws RenderException 35 { 36 renderStart(renderContext); 37 38 for (Iterator i = region.items(); i.hasNext();) 39 { 40 Item item = (Item)i.next(); 41 FragmentResult fragment = item.getFragment(); 42 43 renderContext.getWindowRenderer().render(renderContext, fragment); 44 } 45 46 renderEnd(renderContext); 47 } 48 49 52 public void renderStart(RenderContext ctx) 53 { 54 ctx.getMarkupFragment().append("<div class='portlet-region'>"); 55 } 56 57 60 public void renderEnd(RenderContext ctx) 61 { 62 ctx.getMarkupFragment().append("</div>"); 63 } 64 } 65 | Popular Tags |