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: Java API
Date Mon, 07 Nov 2005 21:24:31 GMT
A document has been updated:

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

Document ID: 498
Branch: main
Language: default
Name: Java API (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 11/7/05 9:24:26 PM
Updated by: Bruno Dumon

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 12742 bytes (previous version: 12225 bytes)
Content diff:
(40 equal lines skipped)
    <tt>sendPage</tt> or <tt>redirectTo</tt> method on the supplied
    <tt>appleResponse</tt> object.</p>
    
+++ <p class="warn">In contrast with the continuations-based flow solutions, calling
+++ sendPage or redirectTo does not stop the execution of the current method, it
+++ only configures what pipeline to call or where to redirect to in the
+++ AppleResponse object. It is only after the process method has returned that this
+++ information will be used by the Apples flow implementation.</p>
+++ 
    <p>To continue interacting with the same Apple instance, use map:call with the
    contination attribute:</p>
    
(66 equal lines skipped)
    import org.apache.avalon.framework.service.ServiceManager;
    
    public class FormHelper {
---     public static Form createForm(ServiceManager serviceManager, String formDefinitionFileName)
throws Exception {
+++     public static Form createForm(ServiceManager serviceManager,
+++                                   String formDefinitionFileName) throws Exception {
            FormManager formManager = null;
            try {
                formManager = (FormManager)serviceManager.lookup(FormManager.ROLE);
(4 equal lines skipped)
            }
        }
    
---     public static Binding createBinding(ServiceManager serviceManager, String bindingDefinitionFileName)
throws Exception {
+++     public static Binding createBinding(ServiceManager serviceManager,
+++                               String bindingDefinitionFileName) throws Exception {
            BindingManager bindingManager = null;
            try {
                bindingManager = (BindingManager)serviceManager.lookup(BindingManager.ROLE);
(39 equal lines skipped)
            this.serviceManager = serviceManager;
        }
    
---     public void process(AppleRequest appleRequest, AppleResponse appleResponse) throws
Exception {
+++     public void process(AppleRequest appleRequest, AppleResponse appleResponse)
+++             throws Exception {
            if (!init) {
---             form = FormHelper.createForm(serviceManager, "resources/form/firstform_definition.xml");
+++             form = FormHelper.createForm(serviceManager,
+++                            "resources/form/firstform_definition.xml");
                init = true;
            }
    
(6 equal lines skipped)
                    showForm(appleResponse);
                } else {
                    String name = (String)form.getChild("name").getValue();
---                 appleResponse.redirectTo("http://google.com/search?q=" + URLEncoder.encode(name,
"UTF-8"));
+++                 appleResponse.redirectTo("http://google.com/search?q="
+++                                          + URLEncoder.encode(name, "UTF-8"));
                }
            } else {
                throw new Exception("Unexpected HTTP method: " + request.getMethod());
(137 equal lines skipped)


Fields
======
no changes

Links
=====
no changes

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

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

Mime
View raw message