cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sylv...@apache.org
Subject svn commit: r154563 [3/3] - in cocoon/branches/BRANCH_2_1_X/src/blocks/forms: conf/ java/org/apache/cocoon/forms/binding/ java/org/apache/cocoon/forms/datatype/ java/org/apache/cocoon/forms/datatype/convertor/ java/org/apache/cocoon/forms/flow/javascript/v3/ java/org/apache/cocoon/forms/formmodel/ java/org/apache/cocoon/forms/generation/ java/org/apache/cocoon/forms/resources/mattkruse-lib/ java/org/apache/cocoon/forms/transformation/ java/org/apache/cocoon/forms/util/ samples/ samples/flow/ samples/forms/ samples/forms/binding/ samples/messages/ samples/xsl/ test/org/apache/cocoon/forms/datatype/convertor/
Date Sun, 20 Feb 2005 21:45:11 GMT
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/SimpleServiceSelector.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/SimpleServiceSelector.java?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/SimpleServiceSelector.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/SimpleServiceSelector.java
Sun Feb 20 13:45:05 2005
@@ -84,7 +84,6 @@
 					getLogger(),
 					context,
 					serviceManager,
-					null, // RoleManager
 					componentConfs[i]);
             } catch (Exception e) {
                 throw new ConfigurationException("Error creating " + hintShortHand + " declared
at " + componentConfs[i].getLocation(), e);

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/XMLAdapter.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/XMLAdapter.java?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/XMLAdapter.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/util/XMLAdapter.java
Sun Feb 20 13:45:05 2005
@@ -30,7 +30,6 @@
 import org.apache.cocoon.forms.formmodel.MultiValueField;
 import org.apache.cocoon.forms.formmodel.Repeater;
 import org.apache.cocoon.forms.formmodel.Widget;
-import org.apache.commons.lang.BooleanUtils;
 import org.apache.excalibur.xml.sax.XMLizable;
 import org.xml.sax.Attributes;
 import org.xml.sax.ContentHandler;
@@ -308,7 +307,7 @@
             // FIXME: BooleanField should implement DataWidget, which
             // would make this case unnecessary
             if (widget.getValue() != null) {
-                data(BooleanUtils.toStringTrueFalse((Boolean)widget.getValue()));
+                data(widget.getValue().toString());
             }
         } else if (widget instanceof MultiValueField) {
             Datatype datatype = ((MultiValueField)widget).getDatatype();

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/forms_flow_example.js
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/forms_flow_example.js?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/forms_flow_example.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/flow/forms_flow_example.js Sun Feb
20 13:45:05 2005
@@ -52,6 +52,14 @@
     cocoon.sendPage("carselector-success-pipeline.xsp");
 }
 
+function xhrSelectCar() {
+    var form = new Form("forms/xhr_carselector_form.xml");
+    // form.lookupWidget("make").setValue(cocoon.parameters.defaultMake);
+    form.showForm("xhr_carselector-display-pipeline");
+    cocoon.request.setAttribute("carselectorform", form.getWidget());
+    cocoon.sendPage("carselector-success-pipeline.xsp");
+}
+
 var states = [
     { key: "AL", value: "Alabama" },
     { key: "AK", value: "Alaska" },

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-bind.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-bind.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml
Sun Feb 20 13:45:05 2005
@@ -13,17 +13,17 @@
   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.
--->
-<test>
-    <html:html xmlns:html="http://www.w3.org/1999/xhtml">
-        <html:head>
-            <html:title>some title</html:title>
-        </html:head>
-    </html:html>
-    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-        <xsl:template name="template-name"/>
-    </xsl:stylesheet>
+-->
+<test>
+    <html:html xmlns:html="http://www.w3.org/1999/xhtml">
+        <html:head>
+            <html:title>some title</html:title>
+        </html:head>
+    </html:html>
+    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+        <xsl:template name="template-name"/>
+    </xsl:stylesheet>
     <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <fo:page-sequence><fo:flow flow-name="flow-name" /></fo:page-sequence>
-    </fo:root>
-</test>
+    </fo:root>
+</test>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-data.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-def.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/binding/06namespaced-def.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml
Sun Feb 20 13:45:05 2005
@@ -0,0 +1,29 @@
+<?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.
+-->
+
+<!--
+  @version $Id$
+-->
+
+<page>
+  <title>Car selector result</title>
+  <content>
+    You selected: maker ${request.getAttribute("carselectorform").lookupWidget("make").getValue()},
+    type ${request.getAttribute("carselectorform").lookupWidget("type").getValue()},
+    model ${request.getAttribute("carselectorform").lookupWidget("model").getValue()}
+  </content>
+</page>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/carselector_success_jx.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml
Sun Feb 20 13:45:05 2005
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<!--
+  @version $Id$
+-->
+
+<page>
+  <title>Country selector result</title>
+  <content>
+    You selected: ${request.getAttribute("countryselectorform").lookupWidget("us-nonus").getValue()}
+    country/state ${request.getAttribute("countryselectorform").lookupWidget("country").getValue()}
+  </content>
+</page>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/countryselector_success_jx.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml Sun Feb
20 13:45:05 2005
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<!--
+  @version $Id$
+-->
+
+<page>
+  <title>Sample form result</title>
+  <content>
+  <!--
+    <xsp:logic>
+        // get reference to form and some of the widgets on it
+        Form form = (Form)request.getAttribute("form1");
+        Field field = (Field)form.lookupWidget("email");
+        BooleanField booleanField = (BooleanField)form.lookupWidget("somebool");
+        Field field2 = (Field)((Repeater)form.lookupWidget("contacts")).getWidget(1, "firstname");
+      </xsp:logic>
+    -->
+    email has the following value:
+    ${request.getAttribute("form1").lookupWidget("email").getValue()}
+    <br/>
+    Second person has this firstname:
+    ${request.getAttribute("form1").lookupWidget("contacts").getWidget(1, "firstname").getValue()}
+    <br/>
+    The value of the checkbox is:
+    ${request.getAttribute("form1").lookupWidget("somebool").getValue()}
+  </content>
+</page>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form1_success_jx.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml
Sun Feb 20 13:45:05 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.
+-->
+
+<!--
+  @version $Id$
+-->
+
+<page>
+  <title>Sample form result</title>
+  <content>
+    Repeater has ${request.getAttribute("form_model_gui").lookupWidget("widgets").getSize()}
row(s).
+  </content>
+</page>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/form_model_gui_success_jx.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml Sun
Feb 20 13:45:05 2005
@@ -0,0 +1,66 @@
+<?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.
+-->
+<!-- form used to illustrate programmatic changing of listbox content. -->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+  <fd:widgets>
+    <fd:field id="make" required="true">
+      <fd:label>Make:</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list src="cocoon:/cars" dynamic="true"/>
+    </fd:field>
+  
+    <fd:field id="type" required="true">
+      <fd:label>Type:</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list>
+        <fd:item value="">
+          <fd:label>Select a maker first</fd:label>
+        </fd:item>
+      </fd:selection-list>
+    </fd:field>
+    
+    <fd:field id="model" required="true">
+      <fd:label>Model:</fd:label>
+      <fd:datatype base="string"/>
+      <fd:selection-list>
+        <fd:item value="">
+          <fd:label>Select a type first</fd:label>
+        </fd:item>
+      </fd:selection-list>
+      <fd:on-value-changed>
+        <javascript>
+          var value = event.source.value;
+          if (value != null) {
+            event.source.lookupWidget("../message").setValue("Model " + value + " is a great
car!");
+          } else {
+            // Reset value
+            event.source.value = null;
+          }
+        </javascript>
+      </fd:on-value-changed>
+    </fd:field>
+  
+    <fd:output id="message">
+      <fd:datatype base="string"/>
+    </fd:output>
+  
+  </fd:widgets>
+
+</fd:form>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_form.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml
Sun Feb 20 13:45:05 2005
@@ -0,0 +1,111 @@
+<?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">
+    <script language="Javascript">
+<![CDATA[
+var xmlhttp;
+/*@cc_on @*/
+/*@if (@_jscript_version >= 5)
+// JScript gives us Conditional compilation, we can cope with old IE versions.
+// and security blocked creation of the objects.
+ try {
+  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e) {
+  try {
+   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+  } catch (E) {
+   xmlhttp = false;
+  }
+ }
+@else
+ xmlhttp = false;
+@end @*/
+if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
+  xmlhttp = new XMLHttpRequest();
+} else {
+  xmlhttp = false;
+}
+
+function repopulateSelection(id, xmlhttp) {
+  var select = document.getElementById(id);
+  while (select.length > 0) {
+    select.remove(0);
+  }
+  var xml = xmlhttp.responseXML;
+  var newSelect = xml.documentElement;
+  var options = newSelect.getElementsByTagName("option");
+  for (var i = 0 ; i < options.length ; ++i) {
+    var option = document.createElement("option");
+    option.setAttribute("value", options.item(i).getAttribute("value"));
+    if (options.item(i).firstChild) {
+      var text = document.createTextNode(options.item(i).firstChild.nodeValue);
+      option.appendChild(text);
+    } else {
+      var text = document.createTextNode(option.getAttribute("value"));
+      option.appendChild(text);
+    }
+    select.appendChild(option);
+  }
+}
+
+function changeMake(make, model) {
+  xmlhttp.open("GET", "xhr_cars/" + make.value, true);
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4) {
+      repopulateSelection("type", xmlhttp);
+      while (model.length > 0) {
+        model.remove(0);
+      }
+    }
+  }
+  xmlhttp.send(null)  
+}
+
+function changeType(make, type) {
+  xmlhttp.open("GET", "xhr_cars/" + make.value + "/" + type.value, true);
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4) {
+      repopulateSelection("model", xmlhttp);
+    }
+  }
+  xmlhttp.send(null)  
+}
+]]>      
+    </script>
+  <title>Car selector with XMLHTTPRequest</title>
+  <content>
+    <ft:form-template action="carselector" method="POST">
+      <ft:continuation-id/>
+      <fi:group>
+        <fi:styling layout="columns"/>
+        <fi:items>
+          <ft:widget id="make">
+            <fi:styling submit-on-change="false" onchange="changeMake(this, document.getElementById('model'));
return false;"/>
+          </ft:widget>
+          <ft:widget id="type">
+            <fi:styling submit-on-change="false" onchange="changeType(document.getElementById('make'),
this); return false;"/>
+          </ft:widget>
+          <ft:widget id="model">
+            <fi:styling submit-on-change="true"/>
+          </ft:widget>
+          <ft:widget id="message"/>
+          <input type="submit" value="Buy it!"/>
+        </fi:items>
+      </fi:group>
+    </ft:form-template>
+  </content>
+</page>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/forms/xhr_carselector_template.xml
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/messages/FormsMessages_zh_CN.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/messages/FormsMessages_zh_CN.xml?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/messages/FormsMessages_zh_CN.xml
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/messages/FormsMessages_zh_CN.xml
Sun Feb 20 13:45:05 2005
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   Copyright 1999-2004 The Apache Software Foundation
 
@@ -16,40 +16,40 @@
 -->
 <!-- This catalogue file contains translations for built-in CForms messages. -->
 <catalogue>
-  <message key="general.field-required">此域是必须的</message>
+  <message key="general.field-required">此域是必须的</message>
 
-  <message key="datatype.conversion-failed">不是一个有效的{0}类型.</message>
-  <message key="datatype.decimal">小数</message> 
-  <message key="datatype.integer">æ•´æ•°</message> 
-  <message key="datatype.long">æ•´æ•°</message>
-  <message key="datatype.float">小数</message> 
-  <message key="datatype.double">小数</message> 
-  <message key="datatype.date.date">日期</message>
+  <message key="datatype.conversion-failed">不是一个有效的{0}类型.</message>
+  <message key="datatype.decimal">小数</message> 
+  <message key="datatype.integer">整数</message> 
+  <message key="datatype.long">整数</message>
+  <message key="datatype.float">小数</message> 
+  <message key="datatype.double">小数</message> 
+  <message key="datatype.date.date">日期</message>
   <message key="datatype.date.time">#time#</message>
   <message key="datatype.date.datetime">#date-time#</message>
 
-  <message key="validation.string.exact-length">应为{0}个字符.</message>
-  <message key="validation.string.range-length">应包含{0}到{1}个字符.</message>
-  <message key="validation.string.min-length">应包含至少{0}个字符.</message>
-  <message key="validation.string.max-length">不应超过{0}个字符.</message>
-  <message key="validation.string.regexp">不能满足如下表达式:
{0}</message>
+  <message key="validation.string.exact-length">应为{0}个字符.</message>
+  <message key="validation.string.range-length">应包含{0}到{1}个字符.</message>
+  <message key="validation.string.min-length">应包含至少{0}个字符.</message>
+  <message key="validation.string.max-length">不应超过{0}个字符.</message>
+  <message key="validation.string.regexp">不能满足如下表达式:
{0}</message>
 
-  <message key="validation.string.invalidemail">域不包含有效的邮件地址</message>
+  <message key="validation.string.invalidemail">域不包含有效的邮件地址</message>
 
-  <message key="validation.array.exact-valuecount">应有{0}个项目被选中.</message>
-  <message key="validation.array.range-valuecount">至少{0}个和最多{1}个项目应被选中.</message>
-  <message key="validation.array.min-valuecount">至少{0}个项目应被选中.</message>
-  <message key="validation.array.max-valuecount">至多{0}个项目应被选中.</message>
+  <message key="validation.array.exact-valuecount">应有{0}个项目被选中.</message>
+  <message key="validation.array.range-valuecount">至少{0}个和最多{1}个项目应被选中.</message>
+  <message key="validation.array.min-valuecount">至少{0}个项目应被选中.</message>
+  <message key="validation.array.max-valuecount">至多{0}个项目应被选中.</message>
 
-  <message key="multivaluefield.conversionfailed">选中的值当中有一个类型不正确.</message>
+  <message key="multivaluefield.conversionfailed">选中的值当中有一个类型不正确.</message>
 
-  <message key="validation.numeric.range">数字范围应在{0}到{1}之间.</message>
-  <message key="validation.numeric.min">数字应大于等于{0}.</message>
-  <message key="validation.numeric.max">数字应小于等于{0}.</message>
+  <message key="validation.numeric.range">数字范围应在{0}到{1}之间.</message>
+  <message key="validation.numeric.min">数字应大于等于{0}.</message>
+  <message key="validation.numeric.max">数字应小于等于{0}.</message>
 
-  <message key="validation.mod10">Mod 10 检查失败.</message>
+  <message key="validation.mod10">Mod 10 检查失败.</message>
 
 
-  <message key="aggregatedfield.split-failed">域的内容不能满足如下表达式:
{0}</message>
-  <message key="upload.invalid-type">内容类型不正确.</message>
+  <message key="aggregatedfield.split-failed">域的内容不能满足如下表达式:
{0}</message>
+  <message key="upload.invalid-type">内容类型不正确.</message>
 </catalogue>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/sitemap.xmap?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/sitemap.xmap Sun Feb 20 13:45:05
2005
@@ -114,9 +114,9 @@
 
              <!-- the content of this action is only executed in case validation
                   succeeded, thus if the form handling is completed -->
-             <map:generate type="serverpages" src="forms/form1_success.xsp"/>
+             <map:generate type="jx" src="forms/form1_success_jx.xml"/>
              <map:call resource="simple-page2html">
-               <map:parameter name="file" value="forms/form1_success.xsp"/>
+               <map:parameter name="file" value="forms/form1_success_jx.xml"/>
              </map:call>
              <map:serialize/>
            </map:act>
@@ -196,9 +196,9 @@
         | Display a success page using XSP
         -->
      <map:match pattern="*-success-pipeline.xsp">
-       <map:generate type="serverpages" src="forms/{1}_success.xsp"/>
+       <map:generate type="jx" src="forms/{1}_success_jx.xml"/>
        <map:call resource="simple-page2html">
-         <map:parameter name="file" value="forms/{1}_template.xsp"/>
+         <map:parameter name="file" value="forms/{1}_template_jx.xml"/>
        </map:call>
        <map:serialize/>
      </map:match>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/welcome.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/welcome.xml?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/welcome.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/welcome.xml Sun Feb 20 13:45:05
2005
@@ -37,6 +37,7 @@
   <sample name="Various (Flowscript)" href="form1.flow">The same sample as above using
Flowscript.</sample>
   <sample name="Registration" href="registration">A simple registration form.</sample>
   <sample name="Car selector" href="carselector">Illustrates programmatically changing
selectionlists.</sample>
+  <sample name="XHR Car selector" href="xhr_carselector">Same sample, using XmlHttpRequest
to reduce client/server roundtrips.</sample>
   <sample name="Country selector" href="countryselector">Illustrates programmatically
changing flow-jxpath selectionlists.</sample>
   <sample name="Upload" href="upload">Shows an upload widget used with Flowscript</sample>
   <sample name="Form Model GUI" href="form_model_gui.flow">Illustrates the use of Class,
New, Struct, and Union.</sample>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl?view=auto&rev=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl (added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl Sun Feb 20
13:45:05 2005
@@ -0,0 +1,81 @@
+<?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.
+-->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+
+  <xsl:param name="list"/>
+  <xsl:param name="make"/>
+  <xsl:param name="type"/>
+
+  <xsl:template match="/">
+    <xsl:choose>
+      <xsl:when test="$list = 'makes'">
+        <xsl:call-template name="makes-list"/>
+      </xsl:when>
+      <xsl:when test="$list = 'models'">
+        <xsl:call-template name="models-list"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:call-template name="types-list"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template name="makes-list">
+    <fd:selection-list>
+      <fd:item value="">
+        <fd:label>-- Choose maker --</fd:label>
+      </fd:item>
+      <xsl:for-each select="cars/make">
+        <fd:item value="{@name}"/>
+      </xsl:for-each>
+    </fd:selection-list>
+  </xsl:template>
+
+  <xsl:template name="types-list">
+    <select>
+      <option value="">-- Choose type --</option>
+      <xsl:for-each select="cars/make[@name=$make]/type">
+        <option value="{@name}"/>
+      </xsl:for-each>
+    </select>
+  </xsl:template>
+
+  <xsl:template name="models-list">
+    <select>
+      <option value="">-- Choose model --</option>
+      <xsl:choose>
+        <xsl:when test="cars/make[@name=$make]/type[@name=$type]/model">
+          <xsl:for-each select="cars/make[@name=$make]/type[@name=$type]/model">
+            <option value="{@name}"/>
+          </xsl:for-each>
+        </xsl:when>
+        <xsl:otherwise>
+          <!-- dummy list -->
+          <option value="{$type} model 1"/>
+          <option value="{$type} model 2"/>
+          <option value="{$type} model 3"/>
+          <option value="{$type} model 4"/>
+          <option value="{$type} model 5"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </select>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/samples/xsl/xhr_carfilter.xsl
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java?view=diff&r1=154562&r2=154563
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/forms/test/org/apache/cocoon/forms/datatype/convertor/EnumConvertorBuilderTestCase.java
Sun Feb 20 13:45:05 2005
@@ -45,9 +45,6 @@
         parser = factory.newDocumentBuilder();
     }
 
-    /* (non-Javadoc)
-     * @see junit.framework.TestCase#tearDown()
-     */
 
     public EnumConvertorBuilderTestCase(String name) {
         super(name);



Mime
View raw message