cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/samples/forms form1.xml form1_template.xml
Date Thu, 26 Jun 2003 09:18:41 GMT
bruno       2003/06/26 02:18:41

  Modified:    src/blocks/woody/samples/forms form1.xml form1_template.xml
  Log:
  Added aggregatefield sample
  
  Revision  Changes    Path
  1.4       +33 -0     cocoon-2.1/src/blocks/woody/samples/forms/form1.xml
  
  Index: form1.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/forms/form1.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- form1.xml	14 May 2003 11:36:46 -0000	1.3
  +++ form1.xml	26 Jun 2003 09:18:41 -0000	1.4
  @@ -88,6 +88,39 @@
       </wd:datatype>
     </wd:multivaluefield>
   
  +  <wd:aggregatefield id="visa" required="true">
  +    <wd:label>Enter your (16-digit) visa number (without spaces)
  +      <br/>Your credit card will be billed.
  +      <br/>Valid test number is: 4111111111111111</wd:label>
  +    <wd:split pattern="([0-9]{4})([0-9]{4})([0-9]{4})([0-9]{4})">
  +      <wd:map group="1" field="part1"/>
  +      <wd:map group="2" field="part2"/>
  +      <wd:map group="3" field="part3"/>
  +      <wd:map group="4" field="part4"/>
  +      <wd:failmessage>Not a valid 16-digit visa number.</wd:failmessage>
  +    </wd:split>
  +    <wd:combine expression='Concat(part1,part2,part3,part4)'/>
  +    <wd:children>
  +      <wd:field id="part1">
  +        <wd:datatype base="string"/>
  +      </wd:field>
  +      <wd:field id="part2">
  +        <wd:datatype base="string"/>
  +      </wd:field>
  +      <wd:field id="part3">
  +        <wd:datatype base="string"/>
  +      </wd:field>
  +      <wd:field id="part4">
  +        <wd:datatype base="string"/>
  +      </wd:field>
  +    </wd:children>
  +    <wd:validation>
  +      <wd:mod10>
  +        <wd:failmessage>Invalid credit card number.</wd:failmessage>
  +      </wd:mod10>
  +    </wd:validation>
  +  </wd:aggregatefield>
  +
     <wd:repeater id="contacts">
       <wd:field id="firstname">
         <wd:label>Firstname</wd:label>
  
  
  
  1.5       +4 -0      cocoon-2.1/src/blocks/woody/samples/forms/form1_template.xml
  
  Index: form1_template.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/forms/form1_template.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- form1_template.xml	16 May 2003 14:25:37 -0000	1.4
  +++ form1_template.xml	26 Jun 2003 09:18:41 -0000	1.5
  @@ -47,6 +47,10 @@
             <td valign="top"><wt:widget-label id="drinks"/></td>
             <td valign="top"><wt:widget id="drinks"/></td>
           </tr>
  +        <tr>
  +          <td valign="top"><wt:widget-label id="visa"/></td>
  +          <td valign="top"><wt:widget id="visa"/></td>
  +        </tr>
         </table>
   
         <wt:widget-label id="contacts"/><br/>
  
  
  

Mime
View raw message