blob: ed575befd68e4009adfcd40213a7c33fc2cd61b1 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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:wt="http://apache.org/cocoon/woody/template/1.0"
xmlns:wi="http://apache.org/cocoon/woody/instance/1.0">
<title>Custom validation sample</title>
<content>
<wt:form-template action="#{$continuation/id}.continue" method="POST">
<p>This form illustrates a number of validation related features.</p>
<p>First of all, if there are any validation errors attached to widgets
in the form, you can have them all displayed at one location by using
the &lt;wi:validation-errors/&gt; tag, as we have done here: (you'll
only see something after submitting the form).</p>
<wi:validation-errors/>
<p>Below, a messages widget is inserted, which allows to display messages
such as validation errors that are not related to any widget in
particular: (you'll only see something after submitting the form)</p>
<wt:widget id="messages"/>
<br/>
<br/>
<wt:widget-label id="number1"/>:
<wt:widget id="number1"/>
<br/>
<wt:widget-label id="number2"/>:
<wt:widget id="number2"/>
<br/>
<br/>
<input type="submit"/>
</wt:form-template>
</content>
</page>