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; +/[EMAIL PROTECTED] @*/ +/[EMAIL PROTECTED] (@_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; + } + } [EMAIL PROTECTED] + xmlhttp = false; [EMAIL PROTECTED] @*/ +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="[EMAIL PROTECTED]"/> + </xsl:for-each> + </fd:selection-list> + </xsl:template> + + <xsl:template name="types-list"> + <select> + <option value="">-- Choose type --</option> + <xsl:for-each select="cars/[EMAIL PROTECTED]/type"> + <option value="[EMAIL PROTECTED]"/> + </xsl:for-each> + </select> + </xsl:template> + + <xsl:template name="models-list"> + <select> + <option value="">-- Choose model --</option> + <xsl:choose> + <xsl:when test="cars/[EMAIL PROTECTED]/[EMAIL PROTECTED]/model"> + <xsl:for-each select="cars/[EMAIL PROTECTED]/[EMAIL PROTECTED]/model"> + <option value="[EMAIL PROTECTED]"/> + </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);
