org.apache.tapestry.pageload
Class PageLoader

java.lang.Object
  extended by org.apache.tapestry.pageload.PageLoader
All Implemented Interfaces:
IPageLoader

public class PageLoader
extends Object
implements IPageLoader

Implementation of tapestry.page.PageLoader. Runs the process of building the component hierarchy for an entire page.

This implementation is not threadsafe, therefore the pooled service model must be used.

Author:
Howard Lewis Ship

Constructor Summary
PageLoader()
           
 
Method Summary
 IComponent createImplicitComponent(IRequestCycle cycle, IComponent container, String componentId, String componentType, org.apache.hivemind.Location location)
          Invoked to create an implicit component (one which is defined in the containing component's template, rather that in the containing component's specification).
 void initializeService()
           
 IPage loadPage(String name, INamespace namespace, IRequestCycle cycle, IComponentSpecification specification)
          Invoked by the IPageSourceto load a specific page.
 void loadTemplateForComponent(IRequestCycle cycle, ITemplateComponent component)
          Invoked by a component (from within its IComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)method) to load the template for the component.
 void setAssetSource(AssetSource assetSource)
           
 void setBindingSource(BindingSource bindingSource)
           
 void setClassResolver(org.apache.hivemind.ClassResolver classResolver)
           
 void setComponentClassProvider(ComponentClassProvider componentClassProvider)
           
 void setComponentConstructorFactory(ComponentConstructorFactory componentConstructorFactory)
           
 void setComponentPropertySource(ComponentPropertySource componentPropertySource)
           
 void setComponentResolver(ComponentSpecificationResolver resolver)
           
 void setComponentTemplateLoader(ComponentTemplateLoader componentTemplateLoader)
           
 void setComponentTypeVisitor(IComponentVisitor visitor)
           
 void setEstablishDefaultParameterValuesVisitor(IComponentVisitor establishDefaultParameterValuesVisitor)
           
 void setEventConnectionVisitor(IComponentVisitor eventConnectionVisitor)
           
 void setLog(Log log)
           
 void setPageClassProvider(ComponentClassProvider pageClassProvider)
           
 void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageLoader

public PageLoader()
Method Detail

initializeService

public void initializeService()

createImplicitComponent

public IComponent createImplicitComponent(IRequestCycle cycle,
                                          IComponent container,
                                          String componentId,
                                          String componentType,
                                          org.apache.hivemind.Location location)
Invoked to create an implicit component (one which is defined in the containing component's template, rather that in the containing component's specification).

Specified by:
createImplicitComponent in interface IPageLoader
Since:
3.0
See Also:
ComponentTemplateLoaderImpl

loadPage

public IPage loadPage(String name,
                      INamespace namespace,
                      IRequestCycle cycle,
                      IComponentSpecification specification)
Description copied from interface: IPageLoader
Invoked by the IPageSourceto load a specific page. This method is not reentrant. The page is immediately attached to the engine.

Specified by:
loadPage in interface IPageLoader
Parameters:
name - the simple (unqualified) name of the page to load
namespace - from which the page is to be loaded (used when resolving components embedded by the page)
cycle - the request cycle the page is initially loaded for (this is used to define the locale of the new page, and provide access to the corect specification source, etc.).
specification - the specification for the page

loadTemplateForComponent

public void loadTemplateForComponent(IRequestCycle cycle,
                                     ITemplateComponent component)
Description copied from interface: IPageLoader
Invoked by a component (from within its IComponent.finishLoad(IRequestCycle, IPageLoader, IComponentSpecification)method) to load the template for the component. This will result in new components being created, and the "outers" of the component being updated.

Specified by:
loadTemplateForComponent in interface IPageLoader
Since:
4.0
See Also:
ITemplateComponent

setLog

public void setLog(Log log)

setComponentResolver

public void setComponentResolver(ComponentSpecificationResolver resolver)

setBindingSource

public void setBindingSource(BindingSource bindingSource)

setComponentTemplateLoader

public void setComponentTemplateLoader(ComponentTemplateLoader componentTemplateLoader)

setEstablishDefaultParameterValuesVisitor

public void setEstablishDefaultParameterValuesVisitor(IComponentVisitor establishDefaultParameterValuesVisitor)

setEventConnectionVisitor

public void setEventConnectionVisitor(IComponentVisitor eventConnectionVisitor)

setComponentTypeVisitor

public void setComponentTypeVisitor(IComponentVisitor visitor)

setComponentConstructorFactory

public void setComponentConstructorFactory(ComponentConstructorFactory componentConstructorFactory)

setAssetSource

public void setAssetSource(AssetSource assetSource)

setPageClassProvider

public void setPageClassProvider(ComponentClassProvider pageClassProvider)

setClassResolver

public void setClassResolver(org.apache.hivemind.ClassResolver classResolver)

setComponentClassProvider

public void setComponentClassProvider(ComponentClassProvider componentClassProvider)

setThreadLocale

public void setThreadLocale(org.apache.hivemind.service.ThreadLocale threadLocale)

setComponentPropertySource

public void setComponentPropertySource(ComponentPropertySource componentPropertySource)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.