1 15 package org.apache.tapestry.contrib.tree.simple; 16 17 import org.apache.tapestry.IRender; 18 import org.apache.tapestry.IRequestCycle; 19 import org.apache.tapestry.contrib.tree.components.INodeRenderFactory; 20 import org.apache.tapestry.contrib.tree.model.ITreeModelSource; 21 import org.apache.tapestry.valid.RenderString; 22 23 26 public class SimpleNodeRenderFactory implements INodeRenderFactory { 27 28 31 public SimpleNodeRenderFactory() { 32 super(); 33 } 34 35 38 public IRender getRenderByID( 39 Object objUniqueKey, 40 ITreeModelSource objTreeModelSource, 41 IRequestCycle cycle) 42 { 43 Object objValue = objTreeModelSource.getTreeModel().getTreeDataModel().getObject(objUniqueKey); 44 return getRender(objValue, objTreeModelSource, cycle); 45 } 46 47 50 public IRender getRender(Object objValue, ITreeModelSource objTreeModelSource, IRequestCycle objCycle) { 51 return new RenderString(objValue.toString()); 52 } 53 54 } 55 | Popular Tags |