You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bd...@apache.org on 2006/06/29 13:13:13 UTC

svn commit: r418006 - in /cocoon/whiteboard/example-apps/bricks-archetype: ./ src/main/java/org/apache/cocoon/apps/bricks/data/ src/main/java/org/apache/cocoon/apps/bricks/persistence/ src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/ src/m...

Author: bdelacretaz
Date: Thu Jun 29 04:13:07 2006
New Revision: 418006

URL: http://svn.apache.org/viewvc?rev=418006&view=rev
Log:
persistence and wiki parsing skeleton code added

Added:
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java   (with props)
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java   (with props)
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java   (with props)
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java   (with props)
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java   (with props)
Modified:
    cocoon/whiteboard/example-apps/bricks-archetype/pom.xml
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/WEB-INF/spring/test-components.xml
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/flow/document-editor.js
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/forms/document-template.xml
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/sitemap.xmap
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/static-content/pages/admin-homepage.xml
    cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/test/ping.js

Modified: cocoon/whiteboard/example-apps/bricks-archetype/pom.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/pom.xml?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/pom.xml (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/pom.xml Thu Jun 29 04:13:07 2006
@@ -73,6 +73,11 @@
       <artifactId>cocoon-template-impl</artifactId>
       <version>1.0.0-SNAPSHOT</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.cocoon</groupId>
+      <artifactId>cocoon-forms-impl</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
   </dependencies>
   
   <pluginRepositories>

Added: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java?rev=418006&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java (added)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java Thu Jun 29 04:13:07 2006
@@ -0,0 +1,79 @@
+/*
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.data;
+
+import org.apache.cocoon.apps.bricks.persistence.ObjectStore;
+
+import java.util.Date;
+import java.sql.Timestamp;
+
+/**  The documents that are managed by our toy CMS
+ * 	Objects of this class are stored in the database by OJB, based
+ * 	on the mappings defined in the OBJ repository file.
+ */
+public class BricksDocument implements ObjectStore.TemplateObjectProvider {
+	
+	/** Nothing special needed to store our fields in the database, OJB is clever
+	 * 	enough to persist private fields there.
+	 */
+    private int id;
+    private int persistentStorageVersion;
+    private String title = "";
+    private String content = "";
+    private Timestamp created = new Timestamp(System.currentTimeMillis());
+    private Timestamp lastModified = new Timestamp(System.currentTimeMillis());
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+        updated();
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+        updated();
+    }
+
+    public Date getCreated() {
+        return created;
+    }
+
+    public Date getLastModified() {
+        return lastModified;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    private void updated() {
+        lastModified = new Timestamp(System.currentTimeMillis());
+    }
+
+    public Object getTemplateObject(int key) throws Exception {
+        final BricksDocument result = new BricksDocument();
+        result.id = key;
+        return result;
+    }
+}

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/data/BricksDocument.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java?rev=418006&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java (added)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java Thu Jun 29 04:13:07 2006
@@ -0,0 +1,53 @@
+/*
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.persistence;
+
+import java.util.Collection;
+import java.util.Map;
+
+/** Store and retrieve java objects */
+public interface ObjectStore {
+
+    /** data objects implement this to provide a key object for retrieval */
+    static interface TemplateObjectProvider {
+        Object getTemplateObject(int key) throws Exception;
+    };
+
+    /** save or update given object */
+    void store(Object o) throws Exception;
+
+    /** generic object retrieval */
+    Object queryByKey(Object exampleHavingSpecifiedKey,boolean forWriting) throws Exception;
+
+    /** create a template object, as needed for queryByKey */
+    Object getTemplateObject(Class clazz,int key) throws Exception;
+
+    /** create an empty object of the given class */
+    Object createNew(Class clazz) throws Exception;
+
+    /** query parameters, not implemented yet */
+	public static interface QueryParameters extends Map {
+	}
+	
+	/** Build a QueryParameters which is appropriate for this ObjectStore */
+	QueryParameters createParameters();
+	
+	/** Run a query and return results
+	 * 	TODO should implement result set paging
+	 */
+	Collection runQuery(QueryParameters params) throws Exception;
+}

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/ObjectStore.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java?rev=418006&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java (added)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java Thu Jun 29 04:13:07 2006
@@ -0,0 +1,84 @@
+/*
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.persistence.impl;
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+
+import org.apache.cocoon.apps.bricks.data.BricksDocument;
+import org.apache.cocoon.apps.bricks.persistence.ObjectStore;
+import org.apache.cocoon.apps.bricks.persistence.ObjectStore.QueryParameters;
+
+/** Dummy object store, temporary until we get a database working */
+public class DummyObjectStore implements ObjectStore {
+
+	private BricksDocument dummyDoc;
+	
+	public DummyObjectStore() {
+		dummyDoc = new BricksDocument();
+		dummyDoc.setTitle("Created by DummyObjectStore at " + new Date());
+		dummyDoc.setTitle("Using DummyObjectStore! objects are not stored yet.");
+	}
+	
+    /** we don't use these parameters yet, so this is simplistic */
+    static class QueryParametersImpl extends HashMap implements QueryParameters {
+    }
+
+    /* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#createNew(java.lang.Class)
+	 */
+	public Object createNew(Class clazz) throws Exception {
+		return clazz.newInstance();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#createParameters()
+	 */
+	public QueryParameters createParameters() {
+		return new QueryParametersImpl();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#getTemplateObject(java.lang.Class, int)
+	 */
+	public Object getTemplateObject(Class clazz, int key) throws Exception {
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#queryByKey(java.lang.Object, boolean)
+	 */
+	public Object queryByKey(Object exampleHavingSpecifiedKey, boolean forWriting) throws Exception {
+		return dummyDoc;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#runQuery(org.apache.cocoon.apps.bricks.persistence.ObjectStore.QueryParameters)
+	 */
+	public Collection runQuery(QueryParameters params) throws Exception {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.apps.bricks.persistence.ObjectStore#store(java.lang.Object)
+	 */
+	public void store(Object o) throws Exception {
+		dummyDoc = (BricksDocument)o;
+	}
+}

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/persistence/impl/DummyObjectStore.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java?rev=418006&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java (added)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java Thu Jun 29 04:13:07 2006
@@ -0,0 +1,28 @@
+/*
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.wikiparser;
+
+import org.apache.excalibur.xml.sax.XMLizable;
+
+/** Parse text (usually with a wiki parser) and return an
+ * 	XMLizable so that the parsed result can be written
+ * 	to a ContentHandler
+ */
+public interface TextParser {
+	/** return an XMLizable which parses given text */
+	XMLizable parse(String text) throws Exception;
+}

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/TextParser.java
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java?rev=418006&view=auto
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java (added)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java Thu Jun 29 04:13:07 2006
@@ -0,0 +1,66 @@
+/*
+    Copyright 2005 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+*/
+
+package org.apache.cocoon.apps.bricks.wikiparser.impl;
+
+import org.apache.cocoon.apps.bricks.wikiparser.TextParser;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.apache.excalibur.xml.sax.XMLizable;
+import org.apache.cocoon.xml.StringXMLizable;
+// TODO import net.sf.textile4j.Textile;
+
+/** TextParser which uses textile4j for the wiki syntax.
+ * 
+ * 	Unfortunately textile4j (like most wiki parsers) outputs
+ * 	a String, which must be parsed to generate proper XML. It
+ * 	would be better if the parser could write directly to 
+ * 	a ContentHandler.
+ * 
+ * 	For now we use a StringXMLizable for this - if the wiki
+ * 	parsed might return non-well-formed XHTML we could use
+ * 	NekoHTML to parse its output.
+ */
+public class TextileTextParserImpl implements TextParser,XMLizable {
+
+	private final String input;
+	public static final String OUTPUT_ELEMENT = "parsed-text";
+	
+	/** service constructor, used by Hivemind */
+	public TextileTextParserImpl() {
+		input = null;
+	}
+	
+	/** instance constructor used in parse() */
+	private TextileTextParserImpl(String text) {
+		input = text;
+	}
+	
+	/** factory method, returns a new instance initialized to parse given text */ 
+	public XMLizable parse(String text) throws Exception {
+		return new TextileTextParserImpl(text);
+	}
+	
+	/** parse text and output to contentHandler */
+	public void toSAX(ContentHandler contentHandler) throws SAXException {
+		if(input==null) throw new IllegalArgumentException("null input, cannot parse");
+		//final String parsedText = new Textile().process(input);
+		final String parsedText = "Sorry, Textile class not available to parse yet...";
+		final String startTag = "<" + OUTPUT_ELEMENT + " source='" + getClass().getName() + "'>";
+		final String endTag = "</" + OUTPUT_ELEMENT + ">";
+		new StringXMLizable(startTag + parsedText + endTag).toSAX(contentHandler);
+	}
+}

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/whiteboard/example-apps/bricks-archetype/src/main/java/org/apache/cocoon/apps/bricks/wikiparser/impl/TextileTextParserImpl.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/WEB-INF/spring/test-components.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/WEB-INF/spring/test-components.xml?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/WEB-INF/spring/test-components.xml (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/WEB-INF/spring/test-components.xml Thu Jun 29 04:13:07 2006
@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
 
+<!-- 
+  Note the Spring bug (fixed now, but still present in the version we use:
+  DOCTYPE has to be in the first 5 lines of this file.
+ -->
+
 <!--
   Copyright 2006 The Apache Software Foundation
 
@@ -21,7 +26,7 @@
   Java components used for tests
  -->
 <beans>
-<bean id="pingBean"
+<bean id="PingBean"
   class="org.apache.cocoon.apps.bricks.util.ComponentManagerPing"
   singleton="true"/>
 </beans>

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/flow/document-editor.js
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/flow/document-editor.js?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/flow/document-editor.js (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/flow/document-editor.js Thu Jun 29 04:13:07 2006
@@ -17,9 +17,10 @@
 // document editor flowscript
 
 cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
-cocoon.load("context://bricks-cms/admin/document-editor/flow/example-text.js");
+cocoon.load("context://admin/document-editor/flow/example-text.js");
 
-var DOC_CLASS = Packages.org.apache.cocoon.apps.bricks.cms.data.BricksDocument;
+var DOC_CLASS = Packages.org.apache.cocoon.apps.bricks.data.BricksDocument;
+var OS_BEAN = "ObjectStore";
 
 // called by the handleForm to run the document editor form
 function form_editDocument(form) {
@@ -27,7 +28,7 @@
     var docId = cocoon.parameters.docId;
     var formDisplayPipeline = cocoon.parameters.formDisplayURI;
     var nextURI = cocoon.parameters.nextURI;
-    var objectStore = get_objectStore();
+    var objectStore = cocoon.getComponent(OS_BEAN);
     var document = null;
     var createDocument = (docId=="NEW_DOCUMENT");
 
@@ -73,13 +74,13 @@
     var displayURI = cocoon.parameters.displayURI;
 
     var forEditing = false;
-    var document = getDocument(get_objectStore(),docId,false);
+    var document = getDocument(cocoon.getComponent(OS_BEAN),docId,false);
 
     if(document == null) {
         throw new java.lang.Exception("BricksDocument having id '" + docId + "' not found");
     }
     
-    var wikiXMLizable = get_wikiParser().parse(document.content);
+    var wikiXMLizable = cocoon.getComponent("WikiParser").parse(document.content);
 
     cocoon.sendPage(
         displayURI,

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/forms/document-template.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/forms/document-template.xml?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/forms/document-template.xml (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/forms/document-template.xml Thu Jun 29 04:13:07 2006
@@ -43,7 +43,7 @@
 
   <content>
 
-    <ft:form-template action="#{$continuation/id}.continue" method="POST">
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
 
       <div id="documentEntryForm">
 

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/sitemap.xmap?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/sitemap.xmap (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/document-editor/sitemap.xmap Thu Jun 29 04:13:07 2006
@@ -24,7 +24,14 @@
 <map:sitemap
   xmlns:map="http://apache.org/cocoon/sitemap/1.0"
   >
-
+  
+  <map:components>
+    <map:actions>
+      <!-- TODO define this in the sitemap-additions? -->
+      <map:action logger="sitemap.action.resource-exists" name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/>
+    </map:actions>
+  </map:components>
+  
   <map:views>
 	  <map:view name="data" from-label="data">
 		<map:serialize type="xml"/>	  
@@ -114,7 +121,7 @@
         <map:generate type="jx" src="forms/{1}-template.xml"/>
         <map:transform type="i18n"/>
         <map:transform src="../xslt/page-to-html.xsl"/>
-        <map:transform src="context://bricks-cms/common/forms/form-styling.xsl">
+        <map:transform src="context://common/forms/form-styling.xsl">
           <map:parameter name="resources-uri" value="admin-resources"/>
         </map:transform>
         <map:transform type="i18n"/>

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/static-content/pages/admin-homepage.xml
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/static-content/pages/admin-homepage.xml?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/static-content/pages/admin-homepage.xml (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/admin/static-content/pages/admin-homepage.xml Thu Jun 29 04:13:07 2006
@@ -22,31 +22,23 @@
 -->       
 <page>
   <metadata>
-    <title>bricks-cms archetype prototype admin homepage</title>
+    <title>bricks archetype prototype admin homepage</title>
   </metadata>
 
   <content>
     <div class="warning">
-      This is an incomplete port of the Cocoon 2.1.x bricks-cms application,
+      This is an incomplete port of the Cocoon 2.1.x bricks application,
       most things do not work yet!
     </div>
     
-    <h2>What is bricks-cms?</h2>
+    <h2>What is bricks?</h2>
     <p>
-      Bricks-cms is NOT a real CMS, it's only an example application meant to
-      demonstrate how to work with database and java components in Cocoon, and how
+      Bricks is an example application meant to
+      demonstrate how to work with database and java components in Cocoon 2.2, and how
       to implement <a href="http://en.wikipedia.org/wiki/CRUD">CRUD</a> applications.
     </p>
     <p>
-      It was called "cms" because a content management system is a good use case
-      for Cocoon.
-    </p>
-    <p>
-      But it's no competition for the "real" Cocoon-based CMSes out there - if you're looking
-      for a CMS there are several serious systems based on Cocoon, but this one is only really a toy.
-    </p>
-    <p>
-      The <a href="http://wiki.apache.org/cocoon/BricksCms">BricksCms wiki page</a> contains
+      The <a href="http://wiki.apache.org/cocoon/Bricks22">Bricks22 wiki page</a> contains
       up-to-date information about this example application.
     </p>
 

Modified: cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/test/ping.js
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/test/ping.js?rev=418006&r1=418005&r2=418006&view=diff
==============================================================================
--- cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/test/ping.js (original)
+++ cocoon/whiteboard/example-apps/bricks-archetype/src/main/webapp/test/ping.js Thu Jun 29 04:13:07 2006
@@ -20,7 +20,7 @@
     var title = "Ping!";
     var message = "Flowscript is alive";
 
-	var pingComponent = cocoon.getComponent("pingBean");
+	var pingComponent = cocoon.getComponent("PingBean");
     message = pingComponent.ping();
 
     var comment =