1

Our WEB application uses xForms to validate and display the different template for different countries. The same thing I have to implement using Sencha Touch. I searched on various forums but could not find any definitive answer.

The xForms used by WEB/ioS/Android application looks like as below.

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:xf="http://www.w3.org/2002/xforms" 
      xmlns:xs="http://www.w3.org/2001/XMLSchema" 
      xmlns:xrsi="http://www.westernunion.com/schema/xrsi" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"> 
  <head> 
    <title>Bank Account details</title> 
    <xf:model>
      <xf:instance xmlns=""> 
        <bank_account> 
          <bank_name/>
          <swift_code/> 
          <account_number/> 
        </bank_account> 
      </xf:instance> 
      <xf:bind nodeset="bank_name" 
           type="xs:string" 
           required="true()" 
           constraint="string-length(.) &lt; 31"/> 
      <xf:bind nodeset="bank_code" 
           type="xrsi:alphanum" 
           required="true()" 
           constraint="string-length(.) &lt; 12"/> 
      <xf:bind nodeset="account_number" 
           type="xrsi:alphanum" 
           required="true()" 
           constraint="string-length(.) &lt; 25"/>
    </xf:model> 
  </head>
  <body> 
    <section> 
      <dl>
    <dt>Bank Name*:</dt> 
    <dd> 
      <xf:input ref="bank_name" 
                incremental="true" 
                xxforms:maxlength="30"> 
        <xf:alert>Bank Name is required</xf:alert>
        <xf:hint>Bank Name</xf:hint> 
      </xf:input> 
    </dd> 
    <dd> 
      <xf:input ref="bank_code" 
                incremental="true" 
                xxforms:maxlength="11"> 
        <xf:alert>AlphaNumeric</xf:alert> 
        <xf:hint>BIC</xf:hint> 
      </xf:input>
    </dd>

    <dd> 
      <xf:input ref="account_number" 
                incremental="true" 
                xxforms:maxlength="24">
        <xf:alert>IBAN is AlphaNumeric</xf:alert>
        <xf:hint>IBAN</xf:hint>
      </xf:input> 
    </dd> 
      </dl> 
    </section>
  </body>
</html>

I want to implement similar functionality in my sencha touch application. Is there any good way to implement this? Any pointers would help a lot.

Following are the 2 useful links.

Is anyone using XForms in their web applications? http://www.sencha.com/forum/archive/index.php/t-26497.html

Thanks Gendaful

Community
  • 1
  • 1
Gendaful
  • 5,522
  • 11
  • 57
  • 76

1 Answers1

0

It seems t me that you should be able to use XSLTFORMS wich is a client side implementation of xforms and integrate that into your sencha touch application.

I have not tried it myself but some time back I did som research XSLTFORMS seemed to work well.

osantos
  • 352
  • 2
  • 18
  • Sorry .. Did not realize that the useful links you mention in your post already mention XSLTFORMS as a possible alternative. – osantos Sep 13 '13 at 11:10