public class ComponentSourceImpl extends Object implements ComponentSource
Constructor and Description |
---|
ComponentSourceImpl(RequestPageCache pageCache,
ComponentClassResolver resolver,
RequestGlobals globals) |
Modifier and Type | Method and Description |
---|---|
Component |
getActivePage()
Returns the active page, as defined by
RequestGlobals.getActivePageName() . |
Component |
getComponent(String completeId)
Gets a component by its complete id.
|
Component |
getPage(Class pageClass)
A convienience for obtaining a page instance via a class instance.
|
Component |
getPage(String pageName)
Returns the page identified by its logical page name.
|
public ComponentSourceImpl(RequestPageCache pageCache, ComponentClassResolver resolver, RequestGlobals globals)
public Component getComponent(String completeId)
ComponentSource
getComponent
in interface ComponentSource
completeId
- complete component id (case insensitive)ComponentResourcesCommon.getCompleteId()
public Component getPage(String pageName)
ComponentSource
getPage
in interface ComponentSource
pageName
- the logical page namepublic Component getPage(Class pageClass)
ComponentSource
getPage
in interface ComponentSource
pageClass
- used to locate the page instancepublic Component getActivePage()
ComponentSource
RequestGlobals.getActivePageName()
. This is the primary
page for handling the current request, the page which will be activated for
the request.
The identity of the active page is not known until the correct Dispatcher
determines this.getActivePage
in interface ComponentSource
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.