Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_success_jx.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_success_jx.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_success_jx.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_success_jx.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,22 @@
+<?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>
+ <title>Registration successful</title>
+ <content>
+ Registration was successful for ${username}!
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/registration_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,41 @@
+<?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="continue" method="POST">
+ <ft:continuation-id/>
+ <fi:group>
+ <fi:styling layout="columns"/>
+ <fi:items>
+ <ft:widget id="name"/>
+ <ft:widget id="email"/>
+ <ft:widget id="age"/>
+ <ft:widget id="password">
+ <fi:styling type="password"/>
+ </ft:widget>
+ <ft:widget id="confirmPassword">
+ <fi:styling type="password"/>
+ </ft:widget>
+ <ft:widget id="spam"/>
+ <input type="submit"/>
+ </fi:items>
+ </fi:group>
+ </ft:form-template>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,96 @@
+<?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.
+-->
+
+<!--
+ A form for a work breakdown in a tree of tasks.
+
+ @version $Id$
+-->
+
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+ <fd:widgets>
+
+ <!-- a list of tasks -->
+ <fd:class id="tasklist-class">
+ <fd:widgets>
+ <fd:repeater id="tasks">
+ <fd:widgets>
+ <!-- inline widget definitions from task-class -->
+ <fd:new id="task-class"/>
+ </fd:widgets>
+ </fd:repeater>
+ <fd:repeater-action id="addsub" repeater="tasks" command="add-row">
+ <fd:label>Add subtasks</fd:label>
+ <fd:hint>Creates a task subtree</fd:hint>
+ </fd:repeater-action>
+ </fd:widgets>
+ </fd:class>
+
+ <!-- a task -->
+ <fd:class id="task-class">
+ <fd:widgets>
+ <!-- FIXME: doesn't work if there's not an enclosing group -->
+ <fd:group id="task">
+ <fd:widgets>
+ <fd:field id="title">
+ <fd:datatype base="string"/>
+ </fd:field>
+ <fd:field id="start">
+ <fd:datatype base="date"/>
+ </fd:field>
+ <fd:field id="end">
+ <fd:datatype base="date"/>
+ </fd:field>
+
+ <!-- these actions will act on the "tasks" repeater in which this
class is inlined -->
+ <fd:row-action id="add" command="add-after">
+ <fd:label>+</fd:label>
+ </fd:row-action>
+ <fd:row-action id="up" command="move-up">
+ <fd:label>^</fd:label>
+ </fd:row-action>
+ <fd:row-action id="down" command="move-down">
+ <fd:label>v</fd:label>
+ </fd:row-action>
+ <fd:row-action id="delete" command="delete">
+ <fd:label>X</fd:label>
+ </fd:row-action>
+
+ <!-- the substasks -->
+ <fd:new id="tasklist-class"/>
+
+ </fd:widgets>
+ </fd:group>
+ </fd:widgets>
+ </fd:class>
+
+ <!-- the project's name -->
+ <fd:field id="name" required="true">
+ <fd:datatype base="string"/>
+ </fd:field>
+
+ <!-- the top-level tasks -->
+ <fd:new id="tasklist-class"/>
+
+ <fd:submit id="ok">
+ <fd:label>OK</fd:label>
+ </fd:submit>
+
+ </fd:widgets>
+</fd:form>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_binding.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_binding.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_binding.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_binding.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,49 @@
+<?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$
+-->
+
+<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"
+ xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+ path="project">
+
+ <fb:class id="tasklist-class">
+ <fb:simple-repeater id="tasks" parent-path="tasks" row-path="task"
+ delete-parent-if-empty="true">
+ <fb:new id="task-class"/>
+ </fb:simple-repeater>
+ </fb:class>
+
+ <fb:class id="task-class">
+ <fb:group id="task" path=".">
+ <fb:value id="title" path="title"/>
+ <fb:value id="start" path="@start">
+ <fd:convertor datatype="date" type="formatting" style="short"/>
+ </fb:value>
+ <fb:value id="end" path="@end">
+ <fd:convertor datatype="date" type="formatting" style="short"/>
+ </fb:value>
+ <fb:new id="tasklist-class"/>
+ </fb:group>
+ </fb:class>
+
+ <fb:value id="name" path="name"/>
+
+ <fb:new id="tasklist-class"/>
+</fb:context>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/tasktree_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,122 @@
+<?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"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+
+ <!-- Import the macros that define CForms template elements -->
+ <jx:import
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
+
+ <!-- Debugging utility that dumps the result of widget.getChildren().
+ Sometimes useful when setting up recursive templates ! -->
+ <jx:macro name="dump">
+ <jx:parameter name="iterator"/>
+
+ <jx:if test="${iterator.hasNext()}">
+ ${iterator.next()} -
+ <dump iterator="${iterator}"/>
+ </jx:if>
+ </jx:macro>
+
+ <title>Task list editor</title>
+
+ <style type="text/css">
+ /* The actions buttons, placed on the right */
+ .actions {
+ float: right;
+ padding-top: 0.2em;
+ }
+
+ /* A "section" contains a task, related actions and subtasks */
+ div.section {
+ padding-top: 0.4em;
+ padding-bottom: 0.4em;
+ padding-left: 0.4em;
+ border: 1px dotted black;
+ mmargin-top: 0.4em;
+ margin-bottom: -1px;
+ }
+
+ /* Indent sub-sections (recursively) */
+ div.section div.section {
+ margin-left: 3em;
+ border-right: none;
+ }
+
+ /* Change bg color depending on nesting depth */
+ div.section div.section { background-color: #F0F0F0; }
+ div.section div.section div.section { background-color: #E0E0E0; }
+ div.section div.section div.section div.section { background-color:
#D0D0D0; }
+ div.section div.section div.section div.section div.section {
background-color: #C0C0C0; }
+
+ </style>
+ <content>
+ <ft:form-template action="#{$cocoon/continuation/id}.continue"
method="POST">
+
+ <ft:class id="task-class">
+ <div class="section">
+ <ft:group id="task">
+ <span class="actions">
+ <ft:widget id="down"><fi:styling type="image"
src="resources/img/move_down.gif"/></ft:widget>
+ <ft:widget id="up"><fi:styling type="image"
src="resources/img/move_up.gif"/></ft:widget>
+ <ft:widget id="delete"><fi:styling type="image"
src="resources/img/delete.gif"/></ft:widget>
+ <ft:widget id="add"><fi:styling type="image"
src="resources/img/new.gif"/></ft:widget>
+ </span>
+ Title: <ft:widget id="title"/>
+ From <ft:widget id="start"><fi:styling size="10"/></ft:widget>
+ to <ft:widget id="end"><fi:styling size="10"/></ft:widget>
+
+ <!-- Recurse -->
+ <ft:new id="tasklist-class"/>
+
+ </ft:group>
+ </div>
+ </ft:class>
+
+ <ft:class id="tasklist-class">
+ <!-- Show the "Add subtask" button only if there are currently no
subtasks.
+ If there are some, more subtasks can be added using the "+"
button -->
+ <jx:choose>
+ <jx:when test="${widget.getChild('tasks').getSize() > 0}">
+ <ft:repeater-widget id="tasks">
+ <!-- recurse -->
+ <ft:new id="task-class"/>
+
+ </ft:repeater-widget>
+ </jx:when>
+ <jx:otherwise>
+ <ft:widget id="addsub">
+ <fi:styling type="link"/>
+ </ft:widget>
+ </jx:otherwise>
+ </jx:choose>
+ </ft:class>
+
+ Project name: <ft:widget id="name"/>
+
+ <br/>
+
+ <ft:new id="tasklist-class"/>
+
+ <br/>
+
+ <ft:widget id="ok"/>
+ <br/>
+ <a href="do-taskTree.flow">Restart this sample</a> - <a href="./">Back
to samples</a>
+ </ft:form-template>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/textresult_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/textresult_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/textresult_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/textresult_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,31 @@
+<?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:jx="http://apache.org/cocoon/templates/jx/1.0">
+
+ <title>Text success page</title>
+ <content>
+ <form action="./" method="GET">
+ <p>${title}</p>
+
+ <pre>
+${text}
+ </pre>
+
+ <input type="submit" value="Back to samples page"/>
+ </form>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_model.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_model.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_model.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_model.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,31 @@
+<?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:field id="user" required="true">
+ <fd:datatype base="string"/>
+ <fd:label>User name</fd:label>
+ </fd:field>
+
+ <fd:upload id="upload" mime-types="text/plain" required="true">
+ <fd:label>Upload a text file</fd:label>
+ <fd:hint>You must choose a text file</fd:hint>
+ </fd:upload>
+
+ </fd:widgets>
+</fd:form>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_success_jx.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_success_jx.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_success_jx.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_success_jx.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,26 @@
+<?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>
+ <title>Sample form result</title>
+ <content>
+ User '${username}' uploaded file '${filename}' whose content is :
+ <br/>
+ <pre>
+${uploadContent}
+ </pre>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/upload_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,35 @@
+<?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>Upload Sample</title>
+ <content>
+ <para>
+ For this example to work, you must enable uploads in your web.xml file.
+ </para>
+ <ft:form-template action="#{$cocoon/continuation/id}.continue"
method="POST" enctype="multipart/form-data">
+ <fi:group>
+ <fi:styling layout="columns"/>
+ <fi:items>
+ <ft:widget id="user"/>
+ <ft:widget id="upload"/>
+ <input type="submit"/>
+ </fi:items>
+ </fi:group>
+ </ft:form-template>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_form.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_form.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_form.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_form.xml
Mon Jun 20 07:47:39 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>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xhr_carselector_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,121 @@
+<?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>
+ <para>
+ This experimental sample demonstrates the use of XMLHttpRequest to
update
+ fields without refreshing the page. It is currently broken: the form
+ cannot be successfully submitted, as the form model does not contain
the
+ values of the type and model selection lists. After selecting a value
in
+ the "model" field, the "type" and "model" fields are reset to their
initial
+ values, instead of submitting the form. See also bugzilla 34077.
+ </para>
+
+ <ft:form-template action="xhr_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>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xmlresult_template.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xmlresult_template.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xmlresult_template.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/forms/xmlresult_template.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,35 @@
+<?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:jx="http://apache.org/cocoon/templates/jx/1.0">
+
+ <title>XML success page</title>
+ <content>
+ <form action="./" method="GET">
+ <p>${title}</p>
+
+ <!-- Set serializer properties for clean indent output -->
+ <jx:set var="props"
value="${Packages.org.apache.cocoon.xml.XMLUtils.createPropertiesForXML(true)}"/>
+ <jx:set var="foo" value="${props.put('indent', 'yes')}"/>
+ <jx:set var="foo"
value="${props.put('{http://xml.apache.org/xalan\}indent-amount', '2')}"/>
+ <pre>
+${Packages.org.apache.cocoon.xml.XMLUtils.serializeNode(document, props)}
+ </pre>
+
+ <input type="submit" value="Back to samples page"/>
+ </form>
+ </content>
+</page>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,53 @@
+<?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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages.
-->
+<catalogue>
+ <message key="general.field-required">This field is required.</message>
+
+ <message key="datatype.conversion-failed">Not a valid {0}.</message>
+ <message key="datatype.decimal">decimal number</message>
+ <message key="datatype.integer">integer number</message>
+ <message key="datatype.long">integer number</message>
+ <message key="datatype.float">decimal number</message>
+ <message key="datatype.double">decimal number</message>
+ <message key="datatype.date.date">date</message>
+ <message key="datatype.date.time">time</message>
+ <message key="datatype.date.datetime">date-time</message>
+
+ <message key="validation.string.exact-length">Should be exactly {0}
characters.</message>
+ <message key="validation.string.range-length">Should contain from {0} to {1}
characters.</message>
+ <message key="validation.string.min-length">Should be at least {0}
characters.</message>
+ <message key="validation.string.max-length">Should be at most {0}
characters.</message>
+ <message key="validation.string.regexp">Does not match the following regular
expression: {0}</message>
+ <message key="validation.string.invalidemail">This field does not contain a
valid email address</message>
+
+ <message key="validation.array.exact-valuecount">Exactly {0} item(s) should
be selected.</message>
+ <message key="validation.array.range-valuecount">At least {0} item(s) and at
most {1} items should be selected.</message>
+ <message key="validation.array.min-valuecount">At least {0} item(s) should
be selected.</message>
+ <message key="validation.array.max-valuecount">At most {0} items should be
selected.</message>
+
+ <message key="multivaluefield.conversionfailed">One of the selected values
is of an incorrect type.</message>
+
+ <message key="validation.numeric.range">Number should be in the range from
{0} to {1}.</message>
+ <message key="validation.numeric.min">Number should be greater than or equal
to {0}.</message>
+ <message key="validation.numeric.max">Number should be less than or equal to
{0}.</message>
+
+ <message key="validation.mod10">Mod 10 check failed.</message>
+
+ <message key="aggregatedfield.split-failed">Content of this field does not
match the following regular expression: {0}</message>
+ <message key="upload.invalid-type">Invalid content type.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_de.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_de.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_de.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_de.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<!-- This catalogue file contains translations for built-in Woody messages. -->
+<catalogue xml:lang="de">
+ <message key="general.field-required">Dieses Feld muss aufgefüllt
werden.</message>
+
+ <message key="datatype.conversion-failed">Ungültige {0}.</message>
+ <message key="datatype.decimal">Dezimalzahl</message>
+ <message key="datatype.integer">natürliche Zahl</message>
+ <message key="datatype.long">natürliche Zahl</message>
+ <message key="datatype.float">Dezimalzahl</message>
+ <message key="datatype.double">Dezimalzahl</message>
+ <message key="datatype.date.date">Datumsangabe</message>
+ <message key="datatype.date.time">Zeitangabe</message>
+ <message key="datatype.date.datetime">Datums- und Zeitangabe</message>
+
+ <message key="validation.string.exact-length">Bitte geben Sie genau {0}
Zeichen ein.</message>
+ <message key="validation.string.range-length">Bitte geben Sie zwischen {0}
und {1} Zeichen ein.</message>
+ <message key="validation.string.min-length">Bitte geben Sie mindestens {0}
Zeichen ein.</message>
+ <message key="validation.string.max-length">Bitte geben Sie höchstens {0}
Zeichen ein.</message>
+ <message key="validation.string.regexp">Die Eingabe entspricht nicht dem
regulären Ausdruck: {0}</message>
+
+ <message key="validation.string.invalidemail">Dieses Feld enthält keine
gültige Email Adresse</message>
+
+ <message key="validation.array.exact-valuecount">Es müssen genau {0}
Objekt(e) selektiert sein.</message>
+ <message key="validation.array.range-valuecount">Es müssen mindestens {0}
Objekt(e) und höchstens {1} Objekt(e) selektiert werden.</message>
+ <message key="validation.array.min-valuecount">Es müssen mindestens {0}
Objekt(e) selektiert sein.</message>
+ <message key="validation.array.max-valuecount">Es dürfen höchstens {0}
Objekt(e) selektiert werden.</message>
+
+ <message key="multivaluefield.conversionfailed">Eines der selektierten
Objekte ist vom falschen Typ.</message>
+
+ <message key="validation.numeric.range">Die Zahl sollte aus dem Bereich {0}
und {1} sein.</message>
+ <message key="validation.numeric.min">Die Zahl sollte grösser oder gleich
{0} sein.</message>
+ <message key="validation.numeric.max">Die Zahl sollte kleiner oder gleich
{0} sein.</message>
+
+ <message key="validation.mod10">Modulo 10 Test gescheitert.</message>
+
+
+ <message key="aggregatedfield.split-failed">Der Inhalt des Feldes entspricht
nicht dem regul. Ausdruck: {0}</message>
+ <message key="upload.invalid-type">Falscher Inhaltstyp.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_fr.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_fr.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_fr.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_fr.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,55 @@
+<?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.
+-->
+<!-- This catalogue file contains translations for built-in Cocoon Forms
messages. -->
+<catalogue>
+ <message key="general.field-required">Cette donnée est
obligatoire.</message>
+
+ <message key="datatype.conversion-failed">N'est pas un(e) {0}.</message>
+ <message key="datatype.decimal">#decimal number#</message>
+ <message key="datatype.integer">nombre entier</message>
+ <message key="datatype.long">nombre entier</message>
+ <message key="datatype.float">#decimal number#</message>
+ <message key="datatype.double">#decimal number#</message>
+ <message key="datatype.date.date">date</message>
+ <message key="datatype.date.time">#time#</message>
+ <message key="datatype.date.datetime">#date-time#</message>
+
+ <message key="validation.string.exact-length">Doit avoir exactement {0}
caractères.</message>
+ <message key="validation.string.range-length">Doit avoir entre {0} et {1}
caractères.</message>
+ <message key="validation.string.min-length">Doit avoir au moins {0}
caractères.</message>
+ <message key="validation.string.max-length">Doit avoir au plus {0}
caractères.</message>
+ <message key="validation.string.regexp">Ne correspond pas à l'expression
régulière : {0}</message>
+
+ <message key="validation.string.invalidemail">N'est pas une adresse mail
correcte.</message>
+
+ <message key="validation.array.exact-valuecount">{0} éléments doivent
être séléctionnés.</message>
+ <message key="validation.array.range-valuecount">Entre {0} et {1} éléments
doivent être sélectionnés.</message>
+ <message key="validation.array.min-valuecount">Au moins {0} éléments
doivent être séléctionnés.</message>
+ <message key="validation.array.max-valuecount">Au plus {0} éléments
peuvent être séléctionnés.</message>
+
+ <message key="multivaluefield.conversionfailed">Un des éléments
séléctionnées a un type incorrect.</message>
+
+ <message key="validation.numeric.range">Doit être compris entre {0} et
{1}.</message>
+ <message key="validation.numeric.min">Doit être supérieur ou égal Ã
{0}.</message>
+ <message key="validation.numeric.max">Doit être inférieur ou égal Ã
{0}.</message>
+
+ <message key="validation.mod10">Numéro de carte incorrect.</message>
+
+
+ <message key="aggregatedfield.split-failed">Ne correspond pas Ã
l'expression régulière: {0}</message>
+ <message key="upload.invalid-type">Type de fichier incorrect.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_it_IT.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_it_IT.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_it_IT.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_it_IT.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,55 @@
+<?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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages.
-->
+<catalogue xml:lang="it_IT">
+ <message key="general.field-required">Questo campo è obbligatorio.</message>
+
+ <message key="datatype.conversion-failed">Formato {0} non valido.</message>
+ <message key="datatype.decimal">#decimal number#</message>
+ <message key="datatype.integer">numero intero</message>
+ <message key="datatype.long">numero intero</message>
+ <message key="datatype.float">#decimal number#</message>
+ <message key="datatype.double">#decimal number#</message>
+ <message key="datatype.date.date">data</message>
+ <message key="datatype.date.time">#time#</message>
+ <message key="datatype.date.datetime">#date-time#</message>
+
+ <message key="validation.string.exact-length">Questo campo deve essere lungo
esattamente {0} caratteri.</message>
+ <message key="validation.string.range-length">Questo campo deve contenere
fra {0} e {1} caratteri.</message>
+ <message key="validation.string.min-length">Questo campo deve essere lungo
almeno {0} caratteri.</message>
+ <message key="validation.string.max-length">Questo campo deve essere lungo
al più {0} caratteri.</message>
+ <message key="validation.string.regexp">Il valore non corrisponde alla
seguente espressione regolare: {0}</message>
+
+ <message key="validation.string.invalidemail">Questo campo non contiene un
indirizzo email valido</message>
+
+ <message key="validation.array.exact-valuecount">Selezionare esattamente {0}
elementi.</message>
+ <message key="validation.array.range-valuecount">Selezionare almeno {0} e al
più {1} elementi.</message>
+ <message key="validation.array.min-valuecount">Selezionare almeno {0}
elementi.</message>
+ <message key="validation.array.max-valuecount">Selezionare al più {0}
elementi.</message>
+
+ <message key="multivaluefield.conversionfailed">Uno dei valori selezionati
non è del tipo corretto.</message>
+
+ <message key="validation.numeric.range">Il valore deve essere compreso fra
{0} e {1}.</message>
+ <message key="validation.numeric.min">Il valore deve essere maggiore o
uguale a {0}.</message>
+ <message key="validation.numeric.max">Il valore deve essere minore o uguale
a {0}.</message>
+
+ <message key="validation.mod10">Verifica Mod 10 fallita.</message>
+
+
+ <message key="aggregatedfield.split-failed">Il valore non corrisponde alla
seguente espressione regolare: {0}</message>
+ <message key="upload.invalid-type">Tipo del contenuto non valido.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_nl.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_nl.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_nl.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_nl.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<!-- This catalogue file contains translations for built-in Woody messages. -->
+<catalogue xml:lang="nl">
+ <message key="general.field-required">Dit veld moet ingevuld zijn.</message>
+ <message key="datatype.conversion-failed">Ongeldig {0}.</message>
+ <message key="datatype.decimal">#decimal number#</message>
+ <message key="datatype.integer">integer getal</message>
+ <message key="datatype.long">integer getal</message>
+ <message key="datatype.float">#decimal number#</message>
+ <message key="datatype.double">#decimal number#</message>
+ <message key="datatype.date.date">datum</message>
+ <message key="datatype.date.time">#time#</message>
+ <message key="datatype.date.datetime">#date-time#</message>
+
+ <message key="validation.string.exact-length">Dit veld moet precies {0}
tekens lang zijn.</message>
+ <message key="validation.string.range-length">Het aantal tekens moet tussen
de {0} en {1} liggen.</message>
+ <message key="validation.string.min-length">Dit veld moet minimaal {0}
tekens lang zijn.</message>
+ <message key="validation.string.max-length">Dit veld mag maximaal {0} tekens
lang zijn.</message>
+ <message key="validation.string.regexp">De waarde komt niet overeen met deze
reg. exp.: {0}</message>
+ <message key="validation.string.invalidemail">Dit is geen geldig email
adres</message>
+
+ <message key="validation.array.exact-valuecount">Kies precies {0}
elementen.</message>
+ <message key="validation.array.range-valuecount">Kies tussen de {0} en {1}
elementen.</message>
+ <message key="validation.array.min-valuecount">Kies minimaal {0}
elementen.</message>
+ <message key="validation.array.max-valuecount">Kies maximaal {0}
elementen.</message>
+
+ <message key="multivaluefield.conversionfailed">Een van de gekozen waarden
is ongeldig.</message>
+
+ <message key="validation.numeric.range">De waarde moet liggen tussen {0} en
{1}.</message>
+ <message key="validation.numeric.min">De waarde is minimaal {0}.</message>
+ <message key="validation.numeric.max">De waarde is maximaal {0}.</message>
+
+ <message key="validation.mod10">De Mod 10 verificatie is mislukt.</message>
+
+ <message key="aggregatedfield.split-failed">De waarde komt niet overeen met
deze reg. exp.: {0}</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_pl.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_pl.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_pl.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_pl.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages.
-->
+<catalogue>
+ <message key="general.field-required">To pole jest wymagane.</message>
+
+ <message key="datatype.conversion-failed">Niepoprawna wartoÅÄ typu:
{0}.</message>
+ <message key="datatype.decimal">liczba rzeczywista</message>
+ <message key="datatype.integer">liczba caÅkowita</message>
+ <message key="datatype.long">liczba caÅkowita</message>
+ <message key="datatype.float">liczba rzeczywista</message>
+ <message key="datatype.double">liczba rzeczywista</message>
+ <message key="datatype.date.date">data</message>
+ <message key="datatype.date.time">czas</message>
+ <message key="datatype.date.datetime">data i czas</message>
+
+ <message key="validation.string.exact-length">Wprowadź dokÅadnie {0}
znaków.</message>
+ <message key="validation.string.range-length">Wprowadź od {0} do {1}
znaków.</message>
+ <message key="validation.string.min-length">Wprowadź przynajmniej {0}
znaków.</message>
+ <message key="validation.string.max-length">Wprowadź co najwyżej {0}
znaków.</message>
+ <message key="validation.string.regexp">WartoÅÄ nie odpowiada wyrażeniu
regularnemu: {0}.</message>
+ <message key="validation.string.invalidemail">To pole nie zawiera poprawnego
adresu e-mail.</message>
+
+ <message key="validation.array.exact-valuecount">DokÅadnie {0} element(ów)
powinno zostaÄ zaznaczonych.</message>
+ <message key="validation.array.range-valuecount">Co najmniej {0} i co
najwyżej {1} element(ów) powinno zostaÄ zaznaczonych.</message>
+ <message key="validation.array.min-valuecount">Co najmniej {0} element(ów)
powinno zostaÄ zaznaczonych.</message>
+ <message key="validation.array.max-valuecount">Co najwyżej {0} element(ów)
powinno zostaÄ zaznaczonych.</message>
+
+ <message key="multivaluefield.conversionfailed">Jedna z zaznaczonych
wartoÅci jest niepoprawnego typu.</message>
+
+ <message key="validation.numeric.range">Wprowadź liczbÄ w zakresie od {0}
do {1}.</message>
+ <message key="validation.numeric.min">Wprowadź liczbÄ wiÄkszÄ
lub
równÄ
{0}.</message>
+ <message key="validation.numeric.max">Wprowadź liczbÄ mniejszÄ
lub
równÄ
{0}.</message>
+
+ <message key="validation.mod10">WartoÅÄ nie dzieli siÄ bez reszty przez
10.</message>
+
+ <message key="aggregatedfield.split-failed">ZawartoÅÄ tego pola nie
odpowiada wyrażeniu regularnemu: {0}.</message>
+ <message key="upload.invalid-type">Niepoprawny typ.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_zh_CN.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_zh_CN.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_zh_CN.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/FormsMessages_zh_CN.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages.
-->
+<catalogue>
+ <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.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.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="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.mod10">Mod 10 æ£æ¥å¤±è´¥.</message>
+
+
+ <message
key="aggregatedfield.split-failed">åçå
容ä¸è½æ»¡è¶³å¦ä¸è¡¨è¾¾å¼:
{0}</message>
+ <message key="upload.invalid-type">å
容类å䏿£ç¡®.</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">female</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">male</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_de.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_de.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_de.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_de.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">weiblich</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">männlich</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_fr.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_fr.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_fr.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_fr.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">féminin</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">masculin</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_it_IT.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_it_IT.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_it_IT.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_it_IT.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">femmina</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">maschio</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_nl.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_nl.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_nl.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_nl.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">vrouw</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">man</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_pl.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_pl.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_pl.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_pl.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">żeÅski</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">mÄski</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_zh_CN.xml
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_zh_CN.xml?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_zh_CN.xml
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/messages/OtherMessages_zh_CN.xml
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<catalogue>
+ <message key="org.apache.cocoon.forms.samples.Sex.FEMALE">女æ§</message>
+ <message key="org.apache.cocoon.forms.samples.Sex.MALE">ç·æ§</message>
+</catalogue>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/def2binding.xsl
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/def2binding.xsl?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/def2binding.xsl
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/def2binding.xsl
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,82 @@
+<?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.
+-->
+<!--
+ Transforms a form definition file into a binding file. This is an attempt at
merging
+ these two files in only one.
+ To use it, simply load the form bindings from a cocoon: pipeline that
applies this stylesheet
+ on a form definition. Next step will by to rewrite this directly into Cocoon
Forms binding system.
+
+ The binding is created according to the following rules :
+ - fb:* attributes on widget definitions lead to the creation of
+ - <fb:context> if a @fb:context attribute is found
+ - <fb:simple-repeater> if a @fb:parent-path is found on a <fd:repeater>
+ - <fb:value> if a @fb:path is found on any fd:* element
+ - if a <fd:binding> is present, its content is copied as is with the @id of
the enclosing widget
+
+ @author Sylvain Wallez
+ @version $Id: def2binding.xsl 151180 2005-02-03 16:56:09Z tim $
+-->
+
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+ xmlns:fb="http://apache.org/cocoon/forms/1.0#binding">
+
+<xsl:template match="fd:*[@fb:context]">
+ <fb:context path="{@fb:context}">
+ <xsl:for-each select="@*[(local-name(.) != 'context') and (namespace-uri()
= 'http://apache.org/cocoon/forms/1.0#binding')]">
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of
select="."/></xsl:attribute>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </fb:context>
+</xsl:template>
+
+<xsl:template match="fd:*[@fb:path]">
+ <fb:value id="{@id}">
+ <xsl:for-each select="@*[namespace-uri() =
'http://apache.org/cocoon/forms/1.0#binding']">
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of
select="."/></xsl:attribute>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </fb:value>
+</xsl:template>
+
+<xsl:template match="fd:repeater[@fb:parent-path]">
+ <fb:simple-repeater id="{@id}">
+ <xsl:for-each select="@*[namespace-uri() =
'http://apache.org/cocoon/forms/1.0#binding']">
+ <xsl:attribute name="{local-name(.)}"><xsl:value-of
select="."/></xsl:attribute>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </fb:simple-repeater>
+</xsl:template>
+
+<xsl:template match="fd:*[fd:binding]">
+ <!-- copy the binding element -->
+ <xsl:variable name="binding" select="fd:binding/fb:*[1]"/>
+ <xsl:element name="{local-name($binding)}"
namespace="{namespace-uri($binding)}">
+ <xsl:copy-of select="$binding/@*"/>
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
+ <xsl:copy-of select="$binding/node()"/>
+ <!-- and recurse in the widgets while in the binding element -->
+ <xsl:apply-templates/>
+ </xsl:element>
+</xsl:template>
+
+<!-- avoid copying text -->
+<xsl:template match="text()|@*"/>
+
+</xsl:stylesheet>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-advanced-field-styling.xsl
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-advanced-field-styling.xsl?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-advanced-field-styling.xsl
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-advanced-field-styling.xsl
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,184 @@
+<?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:fi="http://apache.org/cocoon/forms/1.0#instance"
+ exclude-result-prefixes="fi">
+ <!--+
+ | This stylesheet is designed to be included by
'forms-samples-styling.xsl'.
+ | It extends the 'forms-field-styling.xsl' with additional stylings.
+ | The very specific advanced stylings as the calendar or htmlarea (both
+ | also need additional JS files) are separated out of this file.
+ +-->
+
+ <xsl:import href="forms-field-styling.xsl"/>
+ <xsl:include href="forms-calendar-styling.xsl"/>
+ <xsl:include href="forms-htmlarea-styling.xsl"/>
+ <!-- Location of the resources directory, where JS libs and icons are stored
-->
+ <xsl:param name="resources-uri">resources</xsl:param>
+
+ <xsl:template match="head" mode="forms-field">
+ <xsl:apply-imports/>
+ <script src="{$resources-uri}/mattkruse-lib/AnchorPosition.js"
type="text/javascript"/>
+ <script src="{$resources-uri}/mattkruse-lib/PopupWindow.js"
type="text/javascript"/>
+ <script src="{$resources-uri}/mattkruse-lib/OptionTransfer.js"
type="text/javascript"/>
+ <script src="{$resources-uri}/mattkruse-lib/selectbox.js"
type="text/javascript"/>
+ <xsl:apply-templates select="." mode="forms-calendar"/>
+ <xsl:apply-templates select="." mode="forms-htmlarea"/>
+ </xsl:template>
+
+ <xsl:template match="body" mode="forms-field">
+ <xsl:apply-imports/>
+ <xsl:apply-templates select="." mode="forms-calendar"/>
+ <xsl:apply-templates select="." mode="forms-htmlarea"/>
+ </xsl:template>
+
+ <!--+ This template should not be necessary as this stylesheet "inherits"
+ | all templates from 'forms-field-styling.xsl', but without it, it does
+ | not work for me (using Xalan 2.5.1). It's like adding all methods of
+ | a superclass in a subclass and calling everywhere only the super
+ | implementation.
+ +-->
+ <xsl:template match="*">
+ <xsl:apply-imports/>
+ </xsl:template>
+
+ <!--+
+ | Add fi:help to the common stuff.
+ +-->
+ <xsl:template match="fi:*" mode="common">
+ <xsl:apply-imports/>
+ <xsl:apply-templates select="fi:help"/>
+ </xsl:template>
+
+ <!--+
+ |
+ +-->
+ <xsl:template match="fi:help">
+ <xsl:variable name="id" select="generate-id()"/>
+ <div class="forms-help" id="help{$id}" style="visibility:hidden;
position:absolute;">
+ <span style="float:right"><a href="#"
onClick="helpWin{$id}.hidePopup();return false;"><img align="top" alt="close"
src="{$resources-uri}/img/close.gif" height="6" width="6"/></a></span>
+ <xsl:apply-templates select="node()"/>
+ </div>
+ <script type="text/javascript">
+ var helpWin<xsl:value-of select="$id"/> =
forms_createPopupWindow('help<xsl:value-of select="$id"/>');
+ </script>
+ <a id="{$id}" name="{$id}" href="#"
onclick="helpWin{$id}.showPopup('{$id}');return false;">
+ <!-- TODO: i18n key for helppopup -->
+ <img src="{$resources-uri}/img/help.gif" alt="helppopup"/>
+ </a>
+ </xsl:template>
+
+ <!--+
+ | fi:multivaluefield with list-type='double-listbox' styling
+ +-->
+ <xsl:template
match="fi:multivaluefield[fi:styling/@list-type='double-listbox']">
+ <xsl:variable name="id" select="@id"/>
+ <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+ <div class="forms-doubleList" title="{fi:hint}">
+ <table>
+ <xsl:if
test="fi:styling/fi:available-label|fi:styling/fi:selected-label">
+ <tr>
+ <th>
+ <xsl:copy-of select="fi:styling/fi:available-label/node()"/>
+ </th>
+ <th> </th>
+ <th>
+ <xsl:copy-of select="fi:styling/fi:selected-label/node()"/>
+ </th>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td>
+ <!-- select for the unselected values -->
+ <select id="{@id}.unselected" name="{@id}.unselected"
multiple="multiple"
+ ondblclick="opt{generate-id()}.forms_transferRight()">
+ <xsl:apply-templates select="." mode="styling"/>
+ <xsl:for-each select="fi:selection-list/fi:item">
+ <xsl:variable name="value" select="@value"/>
+ <xsl:if test="not($values[. = $value])">
+ <option value="{$value}">
+ <xsl:copy-of select="fi:label/node()"/>
+ </option>
+ </xsl:if>
+ </xsl:for-each>
+ </select>
+ </td>
+ <td>
+ <!-- command buttons -->
+ <!-- strangely, IE adds an extra blank line if there only a button
on a line. So we surround it with nbsp -->
+ <xsl:text> </xsl:text>
+ <input type="button" value=">"
onclick="opt{generate-id()}.forms_transferRight()">
+ <xsl:if test="@state='disabled'">
+ <xsl:attribute name="disabled">disabled</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xsl:text> </xsl:text>
+ <br/>
+ <xsl:text> </xsl:text>
+ <input type="button" value=">>"
onclick="opt{generate-id()}.forms_transferAllRight()">
+ <xsl:if test="@state='disabled'">
+ <xsl:attribute name="disabled">disabled</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xsl:text> </xsl:text>
+ <br/>
+ <xsl:text> </xsl:text>
+ <input type="button" value="<"
onclick="opt{generate-id()}.forms_transferLeft()">
+ <xsl:if test="@state='disabled'">
+ <xsl:attribute name="disabled">disabled</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xsl:text> </xsl:text>
+ <br/>
+ <xsl:text> </xsl:text>
+ <input type="button" value="<<"
onclick="opt{generate-id()}.forms_transferAllLeft()">
+ <xsl:if test="@state='disabled'">
+ <xsl:attribute name="disabled">disabled</xsl:attribute>
+ </xsl:if>
+ </input>
+ <xsl:text> </xsl:text>
+ <br/>
+ <xsl:apply-templates select="." mode="common"/>
+ </td>
+ <td>
+ <!-- select for the selected values -->
+ <select id="{@id}" name="{@id}" multiple="multiple"
+ ondblclick="opt{generate-id()}.forms_transferLeft()" >
+ <xsl:apply-templates select="." mode="styling"/>
+ <xsl:for-each select="fi:selection-list/fi:item">
+ <xsl:variable name="value" select="@value"/>
+ <xsl:if test="$values[. = $value]">
+ <option value="{$value}">
+ <xsl:copy-of select="fi:label/node()"/>
+ </option>
+ </xsl:if>
+ </xsl:for-each>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <script type="text/javascript">
+ var opt<xsl:value-of select="generate-id()"/> =
forms_createOptionTransfer('<xsl:value-of select="@id"/>', <xsl:value-of
select="fi:styling/@submit-on-change = 'true'"/>);
+ </script>
+ </div>
+ </xsl:template>
+
+ <xsl:template
match="fi:multivaluefield/fi:styling[@list-type='double-listbox']/@submit-on-change"
mode="styling"/>
+
+</xsl:stylesheet>
Added:
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-calendar-styling.xsl
URL:
http://svn.apache.org/viewcvs/lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-calendar-styling.xsl?rev=191478&view=auto
==============================================================================
---
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-calendar-styling.xsl
(added)
+++
lenya/sandbox/cforms-default-pub/src/webapp/lenya/pubs/default/forms-samples_BAK/resources/forms-calendar-styling.xsl
Mon Jun 20 07:47:39 2005
@@ -0,0 +1,92 @@
+<?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:fi="http://apache.org/cocoon/forms/1.0#instance"
+ exclude-result-prefixes="fi">
+ <!--+
+ | This stylesheet is designed to be included by
'forms-advanced-styling.xsl'.
+ +-->
+
+ <!-- Location of the resources directory, where JS libs and icons are stored
-->
+ <xsl:param name="resources-uri">resources</xsl:param>
+
+ <xsl:template match="head" mode="forms-calendar">
+ <script src="{$resources-uri}/mattkruse-lib/CalendarPopup.js"
type="text/javascript"/>
+ <script src="{$resources-uri}/mattkruse-lib/date.js"
type="text/javascript"/>
+ <script type="text/javascript">
+ // Setup calendar
+ var forms_calendar = CalendarPopup('forms_calendarDiv');
+ forms_calendar.setWeekStartDay(1);
+ forms_calendar.showYearNavigation();
+ forms_calendar.showYearNavigationInput();
+ forms_calendar.setCssPrefix("forms_");
+ </script>
+ <link rel="stylesheet" type="text/css"
href="{$resources-uri}/css/forms-calendar.css"/>
+ </xsl:template>
+
+ <xsl:template match="body" mode="forms-calendar">
+ <div id="forms_calendarDiv"/>
+ </xsl:template>
+
+ <!--+
+ | fi:field or fi:aggregatefield with either
+ | - explicit styling @type = 'date' or
+ | - implicit if no styling @type is specified,
+ | but datatype/@type = 'date' and datatype/convertor/@variant = 'date',
+ | selection lists must be excluded here
+ +-->
+ <xsl:template match="fi:field[fi:styling/@type='date'] |
+
fi:field[not(fi:styling/@type)][fi:datatype[@type='date'][fi:convertor/@variant='date']][not(fi:selection-list)]
|
+
fi:aggregatefield[not(fi:styling/@type)][fi:datatype[@type='date'][fi:convertor/@variant='date']][not(fi:selection-list)]
+ ">
+ <xsl:variable name="id" select="generate-id()"/>
+
+ <xsl:variable name="format">
+ <xsl:choose>
+ <xsl:when test="fi:datatype[@type='date']/fi:convertor/@pattern">
+ <xsl:value-of
select="fi:datatype[@type='date']/fi:convertor/@pattern"/>
+ </xsl:when>
+ <xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!-- regular input -->
+ <input id="{@id}" name="{@id}" value="{fi:value}"
title="{normalize-space(fi:hint)}" type="text">
+ <xsl:apply-templates select="." mode="styling"/>
+ </input>
+
+ <!-- calendar popup -->
+ <xsl:choose>
+ <xsl:when test="@state = 'disabled'">
+ <!-- TODO: i18n key for @alt -->
+ <img src="{$resources-uri}/img/cal.gif" alt="Calendar"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="#" name="{$id}" id="{$id}"
+
onclick="forms_calendar.select(forms_getForm(this)['{@id}'],'{$id}','{$format}');
return false;">
+ <!-- TODO: i18n key for @alt -->
+ <img src="{$resources-uri}/img/cal.gif" alt="Calendar"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- common stuff -->
+ <xsl:apply-templates select="." mode="common"/>
+ </xsl:template>
+
+</xsl:stylesheet>
|