[DAISY] Updated: A Simple Example
| Newsgroups | gmane.text.xml.cocoon.documentation |
|---|---|
| Message-ID | <[email protected]> |
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/478.html
Document ID: 478
Branch: main
Language: default
Name: A Simple Example (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 3/14/08 5:35:50 PM
Updated by: Grzegorz Kossakowski
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 15359 bytes (previous version: 15363 bytes)
Content diff:
(29 equal lines skipped)
-DartifactId=simple-sample</pre>
<p class="note">As of the writing of this page, the Maven archetype plugin
--- version has to be specified,due to a bug in the current release of it.</p>
+++ version has to be specified, due to a bug in the current release of it.</p>
<p>Edit the <tt>simple-sample/pom.xml</tt> file and add the support for Cocoon
Forms:</p>
(13 equal lines skipped)
<p>To access resources hold in the fomrs-impla and ajax-impl blocks, the Servlet
Service Framework has to be instructed to fine them. Hence, open
<tt>src/main/resources/META-INF/cocoon/spring/servlet-service.xml</tt> and add
--- the following in the<tt> servlet-context</tt> element:</p>
+++ the following in the<tt> <servlet:context></tt> element:</p>
<pre><servlet:connections>
<entry key="ajax" value-ref="org.apache.cocoon.ajax.impl.servlet"/>
(91 equal lines skipped)
xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
--- <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+++ <jx:import uri="servlet:forms:/resource/internal/generation/jx-macros.xml"/>
<head>
<title>Registration form</title>
(68 equal lines skipped)
<p>Here's the flowscript for our example, <tt>registration.js</tt> (put it under
<tt>src/main/resources/COB-INF/flow</tt>):</p>
--- <pre>cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
+++ <pre>cocoon.load("servlet:forms:/resource/internal/flow/javascript/Form.js");
function registration() {
var form = new Form("cocoon://resource/internal/registration_definition.xml");
(32 equal lines skipped)
src="org.apache.cocoon.transformation.I18nTransformer">
<catalogues default="forms">
<catalogue id="forms" name="messages"
--- location="resource://org/apache/cocoon/forms/system/i18n"/>
+++ location="servlet:forms:/resource/internal/i18n"/>
</catalogues>
<cache-at-startup>true</cache-at-startup>
</map:transformer>
(139 equal lines skipped)