cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Created: Flow Object Model (FOM)
Date Wed, 30 May 2007 18:51:20 GMT
A new document has been created.

http://cocoon.zones.apache.org/daisy/documentation/1371.html

Document ID: 1371
Branch: main
Language: default
Name: Flow Object Model (FOM)
Document Type: Cocoon Document
Created: 5/30/07 6:51:09 PM
Creator (owner): Reinhard Pötz
State: publish

Parts
=====

Content
-------
Mime type: text/xml
Size: 23989 bytes
Content:
<html>
<body>

<p>Cocoon provides a set of system objects for use by Flowscripts. We call this
set of objects the <em>Flow Object Model</em> (FOM). The Flow Object Model
consists of the following objects:</p>

<ul>
<li><a href="#cocoon">Cocoon</a></li>
<li><a href="#request">Request</a></li>
<li><a href="#response">Response</a></li>
<li><a href="#session">Session</a></li>
<li><a href="#context">Context</a></li>
<li><a href="#cookie">Cookie</a></li>
<li><a href="#log">Log</a></li>
<li><a href="#WebContinuation">WebContinuation</a></li>
</ul>

<h1>Cocoon Object</h1>

<p>The <tt>Cocoon</tt> object represents the current Cocoon Sitemap. This
is the
entry point into the FOM. There is one instance of <tt>Cocoon</tt> which you may
access in your scripts as the global variable <tt>cocoon</tt>, for example like
this:</p>

<pre>      var value = cocoon.request.getAttribute("blah");
    </pre>

<p>The <tt>Cocoon</tt> object supports the following properties and functions:
</p>

<h2>request</h2>

<p>The current Cocoon request:</p>

<p><em>Property</em> [<a href="#request">Request</a>] <tt>request</tt></p>

<h2>response</h2>

<p>The current Cocoon response:</p>

<p><em>Property</em> [<a href="#response">Response</a>] <tt>response</tt></p>

<h2>session</h2>

<p>The current Cocoon session:</p>

<p><em>Property</em> [<a href="#session">Session</a>] <tt>session</tt></p>

<h2>context</h2>

<p>The current Cocoon application context:</p>

<p><em>Property</em> [<a href="#context">Context</a>] <tt>context</tt></p>

<h2>log</h2>

<p>A reference to the current logger:</p>

<p><em>Property</em> [<a href="#log">Log</a>] <tt>log</tt></p>

<h2>parameters</h2>

<p>Any parameters passed to the script by the Cocoon Sitemap</p>

<p><em>Property</em> <tt>[Object] parameters</tt></p>

<h2>sendPage</h2>

<p><em>Function</em> <tt>sendPage([String] uri, [Object] bean)</tt></p>

<p>Passes control to the Cocoon sitemap to generate the output page.</p>

<p><tt>uri</tt> is the sitemap URI of the page to be sent back to the client.
If
the URI starts with a slash, it is resolved starting at the root sitemap,
otherwise it is resolved relative to the current sitemap. The URI should not
contain a scheme (such as cocoon:).</p>

<p><tt>bean</tt> is a context object which can be accessed either inside
this
page to extract various values and place them in the generated page or in the
sitemap to use values as parameters for actions or transformers.</p>

<p class="note">Use <tt>value="{flow-attribute:name}"</tt> in any parameter
tag
in the sitemap to access a value from the bean.</p>

<h2>sendPageAndWait</h2>

<p><em>Function</em> <tt>[WebContinuation] sendPageAndWait([String]
uri,
[Object] bean, [Function] postPipelineCode, [Number] timeToLive)</tt></p>

<p>Passes control to the Cocoon sitemap to generate the output page.</p>

<p>The flow script is suspended after the page is generated and the whole
execution stack saved in the WebContinuation object returned from this function.
</p>

<p><tt>uri</tt> is the relative URL of the page to be sent back to the client.
If the URI starts with a slash, it is resolved starting at the root sitemap,
otherwise it is resolved relative to the current sitemap. The URI should not
contain a scheme (such as cocoon:).</p>

<p><tt>bean</tt> is a context object which can be accessed either inside
this
page to extract various values and place them in the generated page or in the
sitemap to use values as parameters for actions or transformers.</p>

<p class="note">Use <tt>value="{flow-attribute:name}"</tt> in any parameter
tag
in the sitemap to access a value from the bean.</p>

<p>If provided, the <tt>postPipelineCode</tt> function will be executed
after
pipeline processing is complete but before the script is suspended. You can use
this to release resources that are needed during the pipeline processing but
should not become part of the continuation. For example:</p>

<pre>function processPage() {
   var id = ...
   var bizData = ...
   var uri = ...
   var comp = cocoon.getComponent(id);
   // use comp
   ...
   cocoon.sendPageAndWait(uri, bizData, function() {
      cocoon.releaseComponent(comp);
      comp = null;
   });
}
</pre>

<p><tt>timeToLive</tt> is the time to live in milliseconds for the continuation
created.</p>

<p>The return value is the <a href="#WebContinuation">continuation</a> object.
</p>

<h2>sendStatus</h2>

<p><em>Function</em> <tt>sendStatus([Number] sc)</tt></p>

<p>Sends an empty response with the provided HTTP status code.</p>

<h2>createPageLocal</h2>

<p><em>Function</em> <tt>[Object] createPageLocal()</tt></p>

<p>Creates a <em>Page Local</em> object. The returned object behaves like
a
normal JavaScript object, but restores the property values it had when
<a href="#sendPageAndWait">sendPageAndWait</a> was originally called, each time
a page is resubmitted (e.g. after hitting the back button). Such objects can be
used to associate state with one particular page sent to the browser.</p>

<h2>processPipelineTo</h2>

<p><em>Function</em> <tt>processPipelineTo([String] uri, [Object]
bizData,
[java.io.OutputStream] stream)</tt></p>

<p>Call the Cocoon sitemap for the given URI, sending the output of the
eventually matched pipeline to the specified <tt>OutputStream</tt>.</p>

<p><tt>uri</tt> is the URI for which the request should be generated. If
the URI
starts with a slash, it is resolved starting at the root sitemap, otherwise it
is resolved relative to the current sitemap. The URI should not contain a scheme
(such as cocoon:).</p>

<p><tt>bizData</tt> is the business data object to be made available to
the
forwarded pipeline</p>

<p><tt>stream</tt> is an <tt>OutputStream</tt> where the output
should be
written to.</p>

<h2>redirectTo</h2>

<p><em>Function</em> <tt>redirectTo([String] uri, [boolean] isGlobal)</tt></p>

<p>Send a client-side redirect to the browser. The <tt>uri</tt> argument
is the
URI to which the browser should be redirected.</p>

<p>The <tt>isGlobal</tt> argument, if <tt>true</tt>, causes
an HTTP redirect to
be sent to the client browser in all cases. When <tt>isGlobal</tt> is
<tt>false</tt> and the request is an internal one (using "cocoon:"), the
internal request will be redirected. For example, if you have a pipeline called
from an aggregation:</p>

<pre><tt>&lt;map:aggregate&gt;</tt>
<tt>  &lt;map:part src="cocoon:/callflow"/&gt;</tt>
<tt>&lt;/map:aggregate&gt;
</tt></pre>

<p>and in some flow function:</p>

<pre><tt>cocoon.redirectT</tt>o("http://www.google.com",<tt> false);</tt></pre>

<p>then the map:aggregate will try to read the content for its part from Google.
</p>

<h2>createWebContinuation</h2>

<p><em>Function</em> <tt>[WebContinuation] createWebContinuation()</tt></p>

<p>Creates a new "bookmark" <a href="#WebContinuation">WebContinuation</a>
object. When invoked it will cause the script to resume right after the call. By
calling this function prior to sendPageAndWait() you can be create a "bookmark"
which will cause the page to be redisplayed in the browser. Note: the
WebContinuation associated with sendPageAndWait() doesn't do this. Rather it
resumes execution after the the page is submitted.</p>

<p>For example:</p>

<pre>function processPage() {

  var bkm = cocoon.createWebContinuation();
  var biz = getBizData();
  cocoon.sendPageAndWait("uri",
                         {bookmark: bkm, biz: biz},
                         function() { releaseData(biz); });
}
</pre>

<h2>load</h2>

<p><em>Function</em> <tt>load([String] uri)</tt></p>

<p>Load the JavaScript script specified by <tt>uri</tt>. The Cocoon source
resolver is used to resolve <tt>uri</tt>.</p>

<h2>getComponent</h2>

<p><em>Function</em> <tt>Object getComponent([String] id)</tt></p>

<p>Access an Avalon component or Spring bean.</p>

<h2>releaseComponent</h2>

<p><em>Function</em> <tt>releaseComponent([Object] component)</tt></p>

<p>Release a pooled Avalon component.</p>

<h2>createObject</h2>

<p><em>Function</em> <tt>createObject([JavaClass] componentClass)</tt></p>

<p>Create and setup an object so that it can access the information provided to
regular components. This is done by calling the various Avalon lifecycle
interfaces implemented by the object.</p>

<h2>disposeObject</h2>

<p><em>Function</em> <tt>disposeObject([Object] object)</tt></p>

<p>Dispose an object that has been created using <tt>createObject</tt>.</p>

<h2>exit</h2>

<p><em>Function</em> exit()</p>

<p>Exit the current flowscript invocation.</p>

<p>There are some flowscript use cases where we want to stop the current
flowscript without creating a continuation, as we don't want the user to go back
to the script and return from the current function.</p>

<p>An example is a "login" function where the caller function expects this
function to exit only if login is successful, but that has to handle e.g. a
registration process that includes a "cancel" button.</p>

<h1>Request Object</h1>

<p>The <tt>Request</tt> object represents the current Cocoon request. It
provides the following functions and properties:</p>

<h2>get</h2>

<p><em>Function</em> <tt>[String] get([String] name)</tt></p>

<p>Get the request parameter or attribute with the specified <tt>name</tt>.</p>

<h2>getAttribute</h2>

<p><em>Function</em> <tt>[String] getAttribute([String] name)</tt></p>

<p>Get the request attribute with the specified <tt>name</tt>.</p>

<h2>getAttributeNames</h2>

<p><em>Function</em> <tt>[java.util.Enumeration] getAttributeNames()</tt></p>

<p>Get an enumeration of request attribute names.</p>

<h2>setAttribute</h2>

<p><em>Function</em> <tt>setAttribute([String] name, [Object] value)</tt></p>

<p>Set the value of a request attribute.</p>

<h2>removeAttribute</h2>

<p><em>Function</em> <tt>removeAttribute([String] name)</tt></p>

<p>Remove the attribute with the name <tt>name</tt> from this request.</p>

<h2>getCharacterEncoding</h2>

<p><em>Function</em> <tt>[String]getCharacterEncoding()</tt></p>

<p>Return the character encoding used by this request.</p>

<h2>setCharacterEncoding</h2>

<p><em>Function</em> <tt>setCharacterEncoding([String] value)</tt></p>

<p>Set the character encoding used by this request.</p>

<h2>getContentLength</h2>

<p><em>Function</em> <tt>[Number] getContentLength()</tt></p>

<p>Get the content-length of this request</p>

<h2>getContentType</h2>

<p><em>Function</em> <tt>[String] getContentType()</tt></p>

<p>Get the content-type of this request</p>

<h2>getParameter</h2>

<p><em>Function</em> <tt>[String] getParameter([String] name)</tt></p>

<p>Get the request parameter with the specified <tt>name</tt>.</p>

<h2>getParameterValues</h2>

<p><em>Function</em> <tt>[Array] getParameterValues([String] name)</tt></p>

<p>Get an array of request parameters with the specified <tt>name</tt>.</p>

<h2>getParameterNames</h2>

<p><em>Function</em> <tt>[java.util.Enumeration] getParameterNames()</tt></p>

<p>Get an enumeration of the parameter names in this request.</p>

<h2>getAuthType</h2>

<p><em>Function</em> <tt>[String] getAuthType()</tt></p>

<p>Get the authorization type used in this request.</p>

<h2>getProtocol</h2>

<p><em>Function</em> <tt>[String] getProtocol()</tt></p>

<p>Get the protocol used in this request.</p>

<h2>getScheme</h2>

<p><em>Function</em> <tt>[String] getScheme()</tt></p>

<p>Get the scheme used in this request.</p>

<h2>getMethod</h2>

<p><em>Function</em> <tt>[String] getMethod()</tt></p>

<p>Get the method used in this request.</p>

<h2>getServerName</h2>

<p><em>Function</em> <tt>[String] getServerName()</tt></p>

<p>Get the server name of this request.</p>

<h2>getServerPort</h2>

<p><em>Function</em> <tt>[Number] getServerPort()</tt></p>

<p>Get the server port of this request.</p>

<h2>getRemoteAddr</h2>

<p><em>Function</em> <tt>[String] getRemoteAddr()</tt></p>

<p>Get the remote address of this request.</p>

<h2>isSecure</h2>

<p><em>Function</em> <tt>[Boolean] isSecure()</tt></p>

<p>Get the <tt>secure</tt> property of this request.</p>

<h2>getLocale</h2>

<p><em>Function</em> <tt>[String] getLocale()</tt></p>

<p>Get the locale of this request.</p>

<h2>getLocales</h2>

<p><em>Function</em> <tt>[Array [String]] getLocales()</tt></p>

<p>Get the locales of this request.</p>

<h2>getCookies</h2>

<p><em>Function</em> <tt>[Array [Cookie]] getCookies()</tt></p>

<p>Get the cookies associated with this request.</p>

<h2>getHeader</h2>

<p><em>Function</em> <tt>[String] getHeader([String] name)</tt></p>

<p>Get the header with <tt>name</tt> from this request.</p>

<h2>getHeaders</h2>

<p><em>Function</em> <tt>[Array] getHeaders()</tt></p>

<p>Get the headers associated with this request.</p>

<h2>getHeaderNames</h2>

<p><em>Function</em> <tt>[java.util.Enumeration] getHeaderNames()</tt></p>

<p>Get an enumeration of header names from this request.</p>

<h2>getRemoteUser</h2>

<p><em>Function</em> <tt>[String] getRemoteUser()</tt></p>

<p>Get the remote user associated with this request.</p>

<h2>getUserPrincipal</h2>

<p><em>Function</em> <tt>[String] getUserPrincipal()</tt></p>

<p>Get the user principal associated with this request.</p>

<h2>isUserInRole</h2>

<p><em>Function</em> <tt>[Boolean] isUserInRole([String] role)</tt></p>

<p>Returns whether the user associated with this request is in the specified
<tt>role</tt>.</p>

<h2>Properties</h2>

<p><tt>Request</tt> properties map to request parameters, i.e.
<tt>request.blah</tt> is equivalent to <tt>request.getParameter("blah")</tt>.
</p>

<h1>Response Object</h1>

<p>The <tt>Response</tt> object represents the Cocoon response associated
with
the current request.</p>

<p>The response object contains hooks only to the cookies and to the response
headers. Everything else will be controlled by the rest of the cocoon pipeline
machinery (like output encoding, for example, which should *NOT* be determined
by the flow).</p>

<p>It provides the following functions and properties:</p>

<h2>createCookie</h2>

<p><em>Function</em> <tt>[Cookie] createCookie([String] name, [String]
value)</tt></p>

<p>Creates a new <a href="#cookie">Cookie</a>.</p>

<h2>addCookie</h2>

<p><em>Function</em> <tt>addCookie([Cookie] cookie)</tt></p>

<p>Adds <tt>cookie</tt> to the current response.</p>

<h2>containsHeader</h2>

<p><em>Function</em> <tt>[Boolean] containsHeader([String] name)</tt></p>

<p>Returns whether the current response contains a header with the specified
<tt>name</tt>.</p>

<h2>setHeader</h2>

<p><em>Function</em> <tt>setHeader([String] name, [String] value)</tt></p>

<p>Replaces the value of the header with <tt>name</tt> with <tt>value</tt>.</p>

<h2>addHeader</h2>

<p><em>Function</em> <tt>addHeader([String] name, [String] value)</tt></p>

<p>Creates a new header in the current response with the specified <tt>name</tt>
and <tt>value</tt>.</p>

<h2>setStatus</h2>

<p><em>Function</em> <tt>setStatus([Number] sc)</tt></p>

<p>Sets the status code for this response.</p>

<h1>Session Object</h1>

<p>The <tt>Session</tt> object represents the user session associated with
the
current Cocoon request.</p>

<p>It provides the following functions and properties:</p>

<h2>getAttribute</h2>

<p><em>Function</em> <tt>[Object] getAttribute([String] name)</tt></p>

<p>Get the value of the session attribute with the specified <tt>name</tt>.</p>

<h2>setAttribute</h2>

<p><em>Function</em> <tt>setAttribute([String] name, [Object] value)</tt></p>

<p>Set the value of the session attribute with the specified <tt>name</tt>
to
<tt>value</tt>.</p>

<h2>removeAttribute</h2>

<p><em>Function</em> <tt>removeAttribute([String] name)</tt></p>

<p>Remove the session attribute with the specified <tt>name</tt>.</p>

<h2>invalidate</h2>

<p><em>Function</em> <tt>invalidate()</tt></p>

<p>Invalidate this session, releasing all resources associated with it.</p>

<h2>isNew</h2>

<p><em>Function</em> <tt>[Boolean] isNew()</tt></p>

<p>Returns <tt>true</tt> if the client does not yet know about the session
or if
the client chooses not to join the session. For example, if the server used only
cookie-based sessions, and the client had disabled the use of cookies, then a
session would be new on each request.</p>

<h2>getId</h2>

<p><em>Function</em> <tt>[String] getId()</tt></p>

<p>Returns the unique id associated with this session.</p>

<h2>getCreationTime</h2>

<p><em>Function</em> <tt>[Number] getCreationTime()</tt></p>

<p>Returns the time when this session was created, measured in milliseconds
since midnight January 1, 1970 GMT.</p>

<h2>getLastAccessedTime</h2>

<p><em>Function</em> <tt>[Number] getLastAccessedTime()</tt></p>

<p>Returns the last time the client sent a request associated with this session,
as the number of milliseconds since midnight January 1, 1970 GMT.</p>

<h2>setMaxInactiveInterval</h2>

<p><em>Function</em> <tt>setMaxInactiveInterval([Number] interval)</tt></p>

<p>Specifies the time, in seconds, between client requests before the
contextcontainer will invalidate this session. A negative time indicates the
session should never timeout.</p>

<h2>getMaxInactiveInterval</h2>

<p><em>Function</em> <tt>[Number] getMaxInactiveInterval()</tt></p>

<p>Returns the maximum time interval, in seconds, that the context container
will keep this session open between client accesses. After this interval, the
context container will invalidate the session. The maximum time interval can be
set with the <tt>setMaxInactiveInterval</tt> method. A negative time indicates
the session should never timeout.</p>

<h2>Properties</h2>

<p><tt>Session</tt> properties map to session attributes, i.e.
<tt>session.blah</tt> is equivalent to <tt>session.getAttribute("blah")</tt>.
</p>

<h1>Context Object</h1>

<p>The <tt>Context</tt> object represents the client context associated
with the
current Cocoon request.</p>

<p>It provides the following functions and properties:</p>

<h2>getAttribute</h2>

<p><em>Function</em> <tt>[Object] getAttribute([String] name)</tt></p>

<p>Get the value of the context attribute with the specified <tt>name</tt>.</p>

<h2>setAttribute</h2>

<p><em>Function</em> <tt>setAttribute([String] name, [Object] value)</tt></p>

<p>Set the value of the context attribute with the specified <tt>name</tt>
to
<tt>value</tt>.</p>

<h2>removeAttribute</h2>

<p><em>Function</em> <tt>removeAttribute([String] name)</tt></p>

<p>Remove the context attribute with the specified <tt>name</tt>.</p>

<h2>getInitParameter</h2>

<p><em>Function</em> <tt>getInitParameter([String] name)</tt></p>

<p>Get the value of the context initialization parameter with the specified
<tt>name</tt>.</p>

<h2>Properties</h2>

<p><tt>Context</tt> properties map to context attributes, i.e.
<tt>context.blah</tt> is equivalent to <tt>context.getAttribute("blah")</tt>.
</p>

<h1>Cookie Object</h1>

<p><tt>Cookie</tt> provides the following functions and properties:</p>

<h2>getName</h2>

<p><em>Function</em> <tt>[String] getName()</tt></p>

<p>Get the name of this cookie.</p>

<h2>getVersion</h2>

<p><em>Function</em> <tt>[String] getVersion()</tt></p>

<p>Get the version of this cookie.</p>

<h2>setVersion</h2>

<p><em>Function</em> <tt>setVersion([String] version)</tt></p>

<p>Set the version of this cookie.</p>

<h2>getValue</h2>

<p><em>Function</em> <tt>[String] getValue()</tt></p>

<p>Get the value of this cookie.</p>

<h2>setValue</h2>

<p><em>Function</em> <tt>setValue([String] value)</tt></p>

<p>Set the value of this cookie.</p>

<h2>getComment</h2>

<p><em>Function</em> <tt>[String] getComment()</tt></p>

<p>Get the comment of this cookie.</p>

<h2>setComment</h2>

<p><em>Function</em> <tt>setComment([String] comment)</tt></p>

<p>Set the comment of this cookie.</p>

<h2>getDomain</h2>

<p><em>Function</em> <tt>[String] getDomain()</tt></p>

<p>Get the domain of this cookie.</p>

<h2>setDomain</h2>

<p><em>Function</em> <tt>setDomain([String] domain)</tt></p>

<p>Set the domain of this cookie.</p>

<h2>getPath</h2>

<p><em>Function</em> <tt>[String] getPath()</tt></p>

<p>Get the path of this cookie.</p>

<h2>setPath</h2>

<p><em>Function</em> <tt>setPath([String] path)</tt></p>

<p>Set the path of this cookie.</p>

<h2>getSecure</h2>

<p><em>Function</em> <tt>[Boolean] getSecure()</tt></p>

<p>Get the secure property of this cookie.</p>

<h2>setSecure</h2>

<p><em>Function</em> <tt>setSecure([Boolean] value)</tt></p>

<p>Set the secure property of this cookie.</p>

<h1>Log Object</h1>

<p>The <tt>Log</tt> object provides an interface to the Cocoon logging system.
</p>

<p>It supports the following functions:</p>

<h2>error</h2>

<p><em>Function</em> <tt>error([String] message, [java.lang.Throwable]
exception)</tt></p>

<p>Log an error message. If <tt>exception</tt> is provided its stack trace
will
also be logged.</p>

<h2>debug</h2>

<p><em>Function</em> <tt>debug([String] message, [java.lang.Throwable]
exception)</tt></p>

<p>Log a debug message. If <tt>exception</tt> is provided its stack trace
will
also be logged.</p>

<h2>warn</h2>

<p><em>Function</em> <tt>warn([String] message, [java.lang.Throwable]
exception)</tt></p>

<p>Log a warning message. If <tt>exception</tt> is provided its stack trace
will
also be logged.</p>

<h2>info</h2>

<p><em>Function</em> <tt>info([String] message, [java.lang.Throwable]
exception)</tt></p>

<p>Log an information message. If <tt>exception</tt> is provided its stack
trace
will also be logged.</p>

<h2>isErrorEnabled</h2>

<p><em>Function</em> <tt>[Boolean] isErrorEnabled()</tt></p>

<p>Returns whether error message logging is enabled.</p>

<h2>isDebugEnabled</h2>

<p><em>Function</em> <tt>[Boolean] isDebugEnabled()</tt></p>

<p>Returns whether debug message logging is enabled.</p>

<h2>isWarnEnabled</h2>

<p><em>Function</em> <tt>[Boolean] isWarnEnabled()</tt></p>

<p>Returns whether warning message logging is enabled.</p>

<h2>isInfoEnabled</h2>

<p><em>Function</em> <tt>[Boolean] isInfoEnabled()</tt></p>

<p>Returns whether information message logging is enabled.</p>

<h1>WebContinuation</h1>

<p>A <tt>WebContinuation</tt> represents a continuation of a Flowscript.
Because
a user may click on the back button in the browser and restart a saved
computation in a continuation, each <tt>WebContinuation</tt> becomes the parent
of a subtree of continuations.</p>

<p>If there is no parent <tt>WebContinuation</tt>, the created continuation
becomes the root of a tree of <tt>WebContinuation</tt>s.</p>

<p><tt>WebContinuation</tt> objects support the following functions and
properties:</p>

<h2>id</h2>

<p><em>Property</em> <tt>[String] id</tt></p>

<p>Returns the unique string identifier of this Web Continuation.</p>

<h2>continuation</h2>

<p><em>Property</em> <tt>[Continuation] continuation</tt></p>

<p>Returns the JavaScript continuation associated with this Web Continuation.
</p>

<h2>previousBookmark</h2>

<p><em>Property</em> <tt>[WebContinuation] previousBookmark</tt></p>

<p>Returns a reference to the first bookmark continuation among the pages
preceding the one associated with this object, or null if no such bookmark
continuation exists. The returned object is the continuation you would invoke to
implement a "Back" button.</p>

<h2>isBookmark</h2>

<p><em>Function</em> <tt>[Boolean] isBookmark()</tt></p>

<p>Returns <tt>true</tt> if this continuation was <em>not</em>
created by
<a href="#sendPageAndWait">sendPageAndWait</a>.</p>

<h2>getParent</h2>

<p><em>Function</em> <tt>[WebContinuation] getParent()</tt></p>

<p>Get the parent continuation of this continuation.</p>

<h2>getChildren</h2>

<p><em>Function</em> <tt>[Array [WebContinuation]] getChildren()</tt></p>

<p>Get the child continuations of this continuation.</p>

<h2>invalidate</h2>

<p><em>Function</em> <tt>invalidate()</tt></p>

<p>Invalidates a <tt>WebContinuation</tt>. This effectively means that the
continuation object associated with it will no longer be accessible from Web
pages. Invalidating a <tt>WebContinuation</tt> invalidates all the
<tt>WebContinuation</tt>s which are children of it.</p>

</body>
</html>

Collections
===========
The document belongs to the following collections: cdocs-flowscript

Mime
View raw message