Package org.zkoss.zk.ui
Class AbstractPage
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractPage
-
- All Implemented Interfaces:
java.io.Serializable
,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 protected
AbstractPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Called when this page is about to be destroyed.Component
getFellow(java.lang.String compId)
Returns a component of the specified ID in this ID space.Component
getFellow(java.lang.String compId, boolean recurse)
The same asgetFellow(String)
.Component
getFellowIfAny(java.lang.String compId)
Returns a component of the specified ID in this ID space, or null if not found.Component
getFellowIfAny(java.lang.String compId, boolean recurse)
The same asgetFellowIfAny(String)
.java.util.Collection<Component>
getFellows()
Returns all fellows in this ID space.Component
getFirstRoot()
Returns the first root component.Component
getLastRoot()
Returns the last root component.java.util.Collection<Component>
getRoots()
Returns a readonly list of the root components.boolean
hasFellow(java.lang.String compId)
Returns whether there is a fellow named with the specified component ID.boolean
hasFellow(java.lang.String compId, boolean recurse)
The same ashasFellow(String)
.void
removeComponents()
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:Page
Returns the first root component.- Specified by:
getFirstRoot
in interfacePage
-
getLastRoot
public Component getLastRoot()
Description copied from interface:Page
Returns the last root component.- Specified by:
getLastRoot
in interfacePage
-
hasFellow
public boolean hasFellow(java.lang.String compId)
Description copied from interface:IdSpace
Returns 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:IdSpace
Returns a component of the specified ID in this ID space. Components in the same ID space are called fellows.Unlike
IdSpace.getFellowIfAny(String)
, it throwsComponentNotFoundException
if not found.- Specified by:
getFellow
in 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:
getFellow
in interfaceIdSpace
recurse
- 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:IdSpace
Returns 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:
getFellowIfAny
in 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:
getFellowIfAny
in interfaceIdSpace
recurse
- 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:IdSpace
Returns all fellows in this ID space. The returned collection is readonly.- Specified by:
getFellows
in interfaceIdSpace
-
getRoots
public java.util.Collection<Component> getRoots()
Description copied from interface:Page
Returns a readonly list of the root components.
-
removeComponents
public void removeComponents()
Description copied from interface:Page
Removes all components in this page.- Specified by:
removeComponents
in interfacePage
- See Also:
Execution.createComponents(String,Component,Map)
-
-