cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Advanced Control Flow
Date Fri, 14 Oct 2005 13:05:53 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/legacydocs/518.html

Document ID: 518
Branch: main
Language: default
Name: Advanced Control Flow (unchanged)
Document Type: Document (unchanged)
Updated on: 10/14/05 1:05:40 PM
Updated by: Helma van der Linden

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 23943 bytes (previous version: 23003 bytes)
Content diff:
(33 equal lines skipped)
    access in your scripts as the global variable <tt>cocoon</tt>, for example
like
    this:</p>
    
--- <pre>
---       var value = cocoon.request.getAttribute("blah");
+++ <pre>      var value = cocoon.request.getAttribute("blah");
        </pre>
    
    <p>The <tt>Cocoon</tt> object supports the following properties and
functions:
(46 equal lines skipped)
    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 inside this
page to
--- extract various values and place them in the generated page.</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>
+++ 
    <h3 id="sendPageAndWait">sendPageAndWait</h3>
    
    <p><em>Function</em> <tt>[WebContinuation] sendPageAndWait([String]
uri,
(10 equal lines skipped)
    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 inside this
page to
--- extract various values and place them in the generated page.</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() {
+++ <pre>function processPage() {
       var id = ...
       var bizData = ...
       var uri = ...
(68 equal lines skipped)
    
    <p>For example:</p>
    
--- <pre>
+++ <pre>function processPage() {
    
--- function processPage() {
--- 
      var bkm = cocoon.createWebContinuation();
      var biz = getBizData();
      cocoon.sendPageAndWait("uri",
(35 equal lines skipped)
    
    <p>Dispose an object that has been created using <tt>createObject</tt>.</p>
    
+++ <h3>exit</h3>
+++ 
+++ <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>
+++ 
    <h2 id="request">Request Object</h2>
    
    <p>The <tt>Request</tt> object represents the current Cocoon request.
It
(568 equal lines skipped)


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
no changes

Mime
View raw message