首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Sencha Touch :如何使用Sencha Touch实现xForms?

Sencha Touch :如何使用Sencha Touch实现xForms?
EN

Stack Overflow用户
提问于 2013-03-01 02:05:49
回答 1查看 273关注 0票数 1

我们的WEB应用程序使用xForms来验证和显示不同国家/地区的不同模板。我必须使用Sencha Touch实现相同的东西。我在不同的论坛上搜索,但没有找到任何明确的答案。

WEB/ioS/Android应用使用的xForms如下所示。

代码语言:javascript
复制
<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>

我想在我的sencha touch应用程序中实现类似的功能。有没有什么好的方法来实现这一点?任何指针都会有很大帮助。

下面是两个有用的链接。

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

感谢Gendaful

EN

回答 1

Stack Overflow用户

发布于 2013-09-13 19:07:53

我认为您应该能够使用XSLTFORMS,它是xforms的客户端实现,并将其集成到您的sencha touch应用程序中。

我自己还没有尝试过,但不久前我做了一些研究,XSLTFORMS似乎工作得很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15142514

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档