|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PageCtrl
Addition interface to Page
for implementation purpose.
Application developers shall never access any of this methods.
Field Summary | |
---|---|
static java.lang.String |
ATTR_REDRAW_BY_INCLUDE
Deprecated. As of release 5.0.0, replaced with Attributes.PAGE_REDRAW_CONTROL . |
Method Summary | |
---|---|
void |
addDeferredZScript(Component parent,
ZScript zscript)
Adds a deferred zscript. |
void |
destroy()
Called when this page is about to be detroyed. |
java.lang.Boolean |
getAutomaticTimeout()
Returns whether to automatically redirect to the timeout URI. |
java.lang.Boolean |
getCacheable()
Returns if the client can cache the rendered result, or null to use the device default. |
java.lang.String |
getContentType()
Returns the content type, or null to use the device default. |
Component |
getDefaultParent()
Deprecated. As of release 5.0.0, it is removed to simplify ZK. |
java.lang.String |
getDocType()
Returns the doc type (<! |
java.lang.String |
getFirstLine()
Returns the first line to be generated to the output, or null if nothing to generate. |
java.lang.String |
getHeaders()
Returns all content that will be generated inside the header element (never null). |
java.lang.String |
getHeaders(boolean before)
Returns the content of the specified condition that shall be generated inside the header element (never null). |
Component |
getOwner()
Returns the owner of this page, or null if it is not owned by any component. |
java.lang.String |
getRootAttributes()
Returns the attributes of the root element declared in this page (never null). |
void |
init(PageConfig config)
Initializes this page by assigning the info provided by the specified PageConfig , and then adds it
to a desktop (by use of Execution.getDesktop() ). |
void |
preInit()
Pre-initializes this page. |
void |
redraw(java.io.Writer out)
Redraws the whole page into the specified output. |
void |
sessionDidActivate(Desktop desktop)
Notification that the session, which owns this page, has just been activated (aka., deserialized). |
void |
sessionWillPassivate(Desktop desktop)
Notification that the session, which owns this page, is about to be passivated (aka., serialized). |
void |
setAutomaticTimeout(java.lang.Boolean autoTimeout)
Sets whether to automatically redirect to the timeout URI. |
void |
setCacheable(java.lang.Boolean cacheable)
Sets if the client can cache the rendered result. |
void |
setContentType(java.lang.String contentType)
Sets the content type. |
void |
setDefaultParent(Component comp)
Deprecated. As of release 5.0.0, it is removed to simplify ZK. |
void |
setDocType(java.lang.String docType)
Sets the doc type (<! |
void |
setFirstLine(java.lang.String firstLine)
Sets the first line to be generated to the output. |
void |
setOwner(Component comp)
Sets the owner of this page. |
void |
setRootAttributes(java.lang.String rootAttributes)
Set the attributes of the root element declared in this page Default: "". |
Field Detail |
---|
static final java.lang.String ATTR_REDRAW_BY_INCLUDE
Attributes.PAGE_REDRAW_CONTROL
.Method Detail |
---|
void preInit()
Page.getDesktop()
,
but it doesn't add this page to the desktop yet
(which is done by init(org.zkoss.zk.ui.sys.PageConfig)
).
Note: it is called before
Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map)
and init(org.zkoss.zk.ui.sys.PageConfig)
.
Since Page.getDesktop()
is initialized in this
method, it is OK to create components in
Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map)
.
void init(PageConfig config)
PageConfig
, and then adds it
to a desktop (by use of Execution.getDesktop()
).
Note: this method is called after preInit()
and
Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map)
.
This method shall be called only after the current execution is activated.
config
- the info about how to initialize this pagevoid destroy()
java.lang.String getHeaders(boolean before)
For HTML, the header element is the HEAD element.
before
- whether to return the headers that shall be shown
before ZK's CSS/JS headers.
If true, only the headers that shall be shown before (such as meta)
are returned.
If true, only the headers that shall be shown after (such as link)
are returned.getHeaders()
java.lang.String getHeaders()
For HTML, the header element is the HEAD element.
It returns all header no matter it shall be shown before or
after ZK's CSS/JS headers. To have more control, use
getHeaders(boolean)
instead.
getHeaders(boolean)
java.lang.String getRootAttributes()
For HTML, the root element is the HTML element.
void setRootAttributes(java.lang.String rootAttributes)
Default: "".
java.lang.String getDocType()
void setDocType(java.lang.String docType)
Default: null (i.e., the device default)
java.lang.String getFirstLine()
For XML devices, it is usually the xml processing instruction:
<?xml version="1.0" encoding="UTF-8"?>
void setFirstLine(java.lang.String firstLine)
Default: null (i.e., nothing generated)
java.lang.String getContentType()
void setContentType(java.lang.String contentType)
java.lang.Boolean getCacheable()
void setCacheable(java.lang.Boolean cacheable)
Default: null (use the device default).
java.lang.Boolean getAutomaticTimeout()
setAutomaticTimeout(java.lang.Boolean)
void setAutomaticTimeout(java.lang.Boolean autoTimeout)
Default: null (use the device default).
If it is set to false, it means this page is redirected to the timeout URI when the use takes some action after timeout. In other words, nothing happens if the user does nothing. If it is set to true, it is redirected as soon as timeout, no matter the user takes any action.
Refer to Configuration.setAutomaticTimeout(java.lang.String, boolean)
for how to configure the device default (default: false).
Component getOwner()
void setOwner(Component comp)
Used only internally.
void redraw(java.io.Writer out) throws java.io.IOException
You could use Attributes.PAGE_REDRAW_CONTROL
and/or Attributes.PAGE_RENDERER
to control how to render manually.
java.io.IOException
void addDeferredZScript(Component parent, ZScript zscript)
parent
- the component that is the parent of zscript (in
the ZUML page), or null if it belongs to the page.zscript
- the zscript that shall be evaluated as late as
when the interpreter of the same language is being loaded.Component getDefaultParent()
void setDefaultParent(Component comp)
void sessionWillPassivate(Desktop desktop)
void sessionDidActivate(Desktop desktop)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |