1 15 package org.apache.tapestry.describe; 16 17 import org.apache.hivemind.util.Defense; 18 import org.apache.tapestry.IMarkupWriter; 19 import org.apache.tapestry.IRender; 20 import org.apache.tapestry.IRequestCycle; 21 22 29 public class RenderBridge implements IRender 30 { 31 private Object _object; 32 33 private RenderStrategy _strategy; 34 35 public RenderBridge(Object object, RenderStrategy strategy) 36 { 37 Defense.notNull(strategy, "strategy"); 38 39 _object = object; 40 _strategy = strategy; 41 } 42 43 public void render(IMarkupWriter writer, IRequestCycle cycle) 44 { 45 _strategy.renderObject(_object, writer, cycle); 46 } 47 } | Popular Tags |