You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by mp...@apache.org on 2005/08/25 23:27:53 UTC

svn commit: r240142 - in /cocoon/gsoc/mpfingsthorn/forms/samples: library/flow/library.js library/forms/form2_binding.xml library/forms/form2_data.xml library/forms/form2_model.xml library/forms/form2_template.xml welcome.xml

Author: mpfingsthorn
Date: Thu Aug 25 14:27:37 2005
New Revision: 240142

URL: http://svn.apache.org/viewcvs?rev=240142&view=rev
Log:
Added another sample to test the reloading of forms _after_ another form already rebuild a changed library both depend on

e.g.:  form1 depends on lib1
       form2 depends on lib1

       lib1 changes

       form1 is reloaded and thus updates lib1 in the cache and rebuilds
       form2 is reloaded and notices lib1 is not the same anymore (even though its 'still' in cache) and rebuilds itself

Added:
    cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml   (with props)
    cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml   (with props)
    cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml   (with props)
    cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml   (with props)
Modified:
    cocoon/gsoc/mpfingsthorn/forms/samples/library/flow/library.js
    cocoon/gsoc/mpfingsthorn/forms/samples/welcome.xml

Modified: cocoon/gsoc/mpfingsthorn/forms/samples/library/flow/library.js
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/library/flow/library.js?rev=240142&r1=240141&r2=240142&view=diff
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/library/flow/library.js (original)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/library/flow/library.js Thu Aug 25 14:27:37 2005
@@ -26,6 +26,10 @@
     process_form(form, "form1", "forms/form1_data.xml");
 }
 
+function show_form2(form) {
+    process_form(form, "form2", "forms/form2_data.xml");
+}
+
 function process_form(form, type, input) {
 
     var locale = determineLocale();

Added: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml?rev=240142&view=auto
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml (added)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml Thu Aug 25 14:27:37 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 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.
+-->
+<fb:context 
+  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+  path="/data" >
+  
+  <fb:value id="field1" path="field1"/>
+  <fb:value id="field2" path="field2"/>
+  <fb:value id="field3" path="field3"/>
+  <fb:value id="somefield" path="somefield"/>
+  
+</fb:context>
\ No newline at end of file

Propchange: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml?rev=240142&view=auto
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml (added)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml Thu Aug 25 14:27:37 2005
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<data>
+  <field1/>
+</data>
\ No newline at end of file

Propchange: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_data.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml?rev=240142&view=auto
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml (added)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml Thu Aug 25 14:27:37 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+  
+  <fd:widgets>
+    <fd:import prefix="lib" uri="libraries/library_form1.xml"/>
+    
+    <fd:new id="lib:class1"/>
+    <fd:expand id="lib:field2"/>
+    
+    <fd:field id="field3" extends="lib:field2">
+      <fd:datatype base="integer"/>
+    </fd:field>
+    
+    <fd:field id="somefield">
+      <fd:label>Somefield</fd:label>
+    </fd:field>
+    
+  </fd:widgets>
+</fd:form>
\ No newline at end of file

Propchange: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_model.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml?rev=240142&view=auto
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml (added)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml Thu Aug 25 14:27:37 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 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.
+-->
+<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+  xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+  <title>Registration</title>
+  <content>
+    <ft:form-template action="#{$cocoon/continuation/id}.continue" method="POST">
+      <fi:group>
+        <fi:styling layout="columns"/>
+        <fi:items>
+          <ft:widget id="field1"/>
+          <ft:widget id="field2"/>
+          <ft:widget id="field3"/>
+          <ft:widget id="somefield"/>
+        </fi:items>
+      </fi:group>
+      <input type="submit"/>
+    </ft:form-template>
+  </content>
+</page>
\ No newline at end of file

Propchange: cocoon/gsoc/mpfingsthorn/forms/samples/library/forms/form2_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/gsoc/mpfingsthorn/forms/samples/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/gsoc/mpfingsthorn/forms/samples/welcome.xml?rev=240142&r1=240141&r2=240142&view=diff
==============================================================================
--- cocoon/gsoc/mpfingsthorn/forms/samples/welcome.xml (original)
+++ cocoon/gsoc/mpfingsthorn/forms/samples/welcome.xml Thu Aug 25 14:27:37 2005
@@ -155,6 +155,7 @@
       This demonstrates the new library subsystem of Cocoon Forms.
     </note>
     <sample name="Basic Sample" href="library/form1.form">Basic Sample</sample>
+    <sample name="Basic Sample 2" href="library/form2.form">Basic Sample 2 (depends on the same library as above, see how it still changes after editing the library and reloading the first)</sample>
   </group>
 
 </samples>