1 15 package org.apache.tapestry.services.impl; 16 17 import org.apache.commons.logging.Log; 18 import org.apache.tapestry.IRender; 19 import org.apache.tapestry.IRequestCycle; 20 import org.apache.tapestry.ITemplateComponent; 21 import org.apache.tapestry.binding.BindingSource; 22 import org.apache.tapestry.engine.IPageLoader; 23 import org.apache.tapestry.parse.ComponentTemplate; 24 import org.apache.tapestry.services.ComponentTemplateLoader; 25 import org.apache.tapestry.services.TemplateSource; 26 27 41 42 public class ComponentTemplateLoaderImpl implements ComponentTemplateLoader 43 { 44 private Log _log; 45 46 private IPageLoader _pageLoader; 47 48 private TemplateSource _templateSource; 49 50 51 52 private BindingSource _bindingSource; 53 54 public void loadTemplate(IRequestCycle requestCycle, ITemplateComponent loadComponent) 55 { 56 ComponentTemplate template = _templateSource.getTemplate(requestCycle, loadComponent); 57 58 ComponentTemplateLoaderLogic logic = new ComponentTemplateLoaderLogic(_log, _pageLoader, 59 _bindingSource); 60 61 logic.loadTemplate(requestCycle, loadComponent, template); 62 } 63 64 65 66 public void setPageLoader(IPageLoader pageLoader) 67 { 68 _pageLoader = pageLoader; 69 } 70 71 72 73 public void setLog(Log log) 74 { 75 _log = log; 76 } 77 78 81 82 public void setTemplateSource(TemplateSource templateSource) 83 { 84 _templateSource = templateSource; 85 } 86 87 90 91 public void setBindingSource(BindingSource bindingSource) 92 { 93 _bindingSource = bindingSource; 94 } 95 } | Popular Tags |