[英]Sencha Touch : How to implement xForms with Sencha Touch?
我们的WEB应用程序使用xForms验证并显示不同国家/地区的不同模板。 我必须使用Sencha Touch实现相同的操作。 我在各种论坛上进行了搜索,但找不到任何明确的答案。
WEB / ioS / Android应用程序使用的xForms如下所示。
<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(.) < 31"/>
<xf:bind nodeset="bank_code"
type="xrsi:alphanum"
required="true()"
constraint="string-length(.) < 12"/>
<xf:bind nodeset="account_number"
type="xrsi:alphanum"
required="true()"
constraint="string-length(.) < 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应用程序中实现类似的功能。 有什么好的方法可以实现吗? 任何指针都会有很大帮助。
以下是2个有用的链接。
是否有人在其Web应用程序中使用XForms? http://www.sencha.com/forum/archive/index.php/t-26497.html
谢谢Gendaful
在我看来,您应该能够使用XSLTFORMS,这是xforms的客户端实现,并将其集成到sencha touch应用程序中。
我自己还没有尝试过,但不久前我做了XSLTFORMS的研究,似乎效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.