Package org.zkoss.zk.ui
Class AbstractPage
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractPage
-
- All Implemented Interfaces:
java.io.Serializable,org.zkoss.lang.ClassResolver,Scope,IdSpace,Page,PageCtrl
- Direct Known Subclasses:
PageImpl
public abstract class AbstractPage extends java.lang.Object implements Page, PageCtrl, java.io.Serializable
A skeletal implementation ofPage.- Since:
- 3.5.2
- Author:
- tomyeh
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.zkoss.zk.ui.Page
APPLICATION_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Called when this page is about to be destroyed.ComponentgetFellow(java.lang.String compId)Returns a component of the specified ID in this ID space.ComponentgetFellow(java.lang.String compId, boolean recurse)The same asgetFellow(String).ComponentgetFellowIfAny(java.lang.String compId)Returns a component of the specified ID in this ID space, or null if not found.ComponentgetFellowIfAny(java.lang.String compId, boolean recurse)The same asgetFellowIfAny(String).java.util.Collection<Component>getFellows()Returns all fellows in this ID space.ComponentgetFirstRoot()Returns the first root component.ComponentgetLastRoot()Returns the last root component.java.util.Collection<Component>getRoots()Returns a readonly list of the root components.booleanhasFellow(java.lang.String compId)Returns whether there is a fellow named with the specified component ID.booleanhasFellow(java.lang.String compId, boolean recurse)The same ashasFellow(String).voidremoveComponents()Removes all components in this page.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.zk.ui.Page
addClassResolver, addEventListener, addFunctionMapper, addTemplate, addVariableResolver, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getComponentDefinition, getComponentDefinition, getComponentDefinitionMap, getDesktop, getEventListeners, getExpressionFactoryClass, getFunctionMapper, getId, getInterpreter, getLanguageDefinition, getLoadedInterpreters, getRequestPath, getStyle, getTemplate, getTitle, getUuid, getViewport, getXelVariable, getXelVariable, getZScriptClass, getZScriptFunction, getZScriptFunction, getZScriptLanguage, getZScriptVariable, getZScriptVariable, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFunctionMapper, hasVariableResolver, interpret, invalidate, isAlive, isComplete, isListenerAvailable, removeAttribute, removeAttribute, removeEventListener, removeFunctionMapper, removeTemplate, removeVariableResolver, resolveClass, setAttribute, setAttribute, setComplete, setExpressionFactoryClass, setId, setStyle, setTitle, setViewport, setZScriptLanguage
-
Methods inherited from interface org.zkoss.zk.ui.sys.PageCtrl
addAfterHeadTags, addBeforeHeadTags, addDeferredZScript, getAfterHeadTags, getAutomaticTimeout, getBeforeHeadTags, getCacheable, getContentType, getDocType, getFirstLine, getOwner, getResponseHeaders, getRootAttributes, getWidgetClass, init, preInit, redraw, sessionDidActivate, sessionWillPassivate, setAutomaticTimeout, setCacheable, setContentType, setDocType, setFirstLine, setOwner, setRootAttributes, setWidgetClass
-
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
-
-
-
Method Detail
-
getFirstRoot
public Component getFirstRoot()
Description copied from interface:PageReturns the first root component.- Specified by:
getFirstRootin interfacePage
-
getLastRoot
public Component getLastRoot()
Description copied from interface:PageReturns the last root component.- Specified by:
getLastRootin interfacePage
-
hasFellow
public boolean hasFellow(java.lang.String compId)
Description copied from interface:IdSpaceReturns whether there is a fellow named with the specified component ID.
-
hasFellow
public boolean hasFellow(java.lang.String compId, boolean recurse)The same ashasFellow(String). In other words, the recurse parameter is not applicable.
-
getFellow
public Component getFellow(java.lang.String compId) throws ComponentNotFoundException
Description copied from interface:IdSpaceReturns a component of the specified ID in this ID space. Components in the same ID space are called fellows.Unlike
IdSpace.getFellowIfAny(String), it throwsComponentNotFoundExceptionif not found.- Specified by:
getFellowin interfaceIdSpace- Throws:
ComponentNotFoundException- is thrown if this component doesn't belong to any ID space
-
getFellow
public Component getFellow(java.lang.String compId, boolean recurse) throws ComponentNotFoundException
The same asgetFellow(String). In other words, the recurse parameter is not applicable.- Specified by:
getFellowin interfaceIdSpacerecurse- whether to look up the parent ID space for the existence of the fellow- Throws:
ComponentNotFoundException- is thrown if this component doesn't belong to any ID space- Since:
- 5.0.0
-
getFellowIfAny
public Component getFellowIfAny(java.lang.String compId)
Description copied from interface:IdSpaceReturns a component of the specified ID in this ID space, or null if not found.Unlike
IdSpace.getFellow(String), it returns null if not found.- Specified by:
getFellowIfAnyin interfaceIdSpace
-
getFellowIfAny
public Component getFellowIfAny(java.lang.String compId, boolean recurse)
The same asgetFellowIfAny(String). In other words, the recurse parameter is not applicable.- Specified by:
getFellowIfAnyin interfaceIdSpacerecurse- whether to look up the parent ID space for the existence of the fellow- Since:
- 5.0.0
-
getFellows
public java.util.Collection<Component> getFellows()
Description copied from interface:IdSpaceReturns all fellows in this ID space. The returned collection is readonly.- Specified by:
getFellowsin interfaceIdSpace
-
getRoots
public java.util.Collection<Component> getRoots()
Description copied from interface:PageReturns a readonly list of the root components.
-
removeComponents
public void removeComponents()
Description copied from interface:PageRemoves all components in this page.- Specified by:
removeComponentsin interfacePage- See Also:
Execution.createComponents(String,Component,Map)
-
-