如何使用“HTML”中的现有值使用 Sencha Touch 进行配置?
由于 Sencha Touch 拥有所有界面元素,我决定使用它。有人可以告诉我如何将现有值集成到项目“HTML”配置中吗?
代码如下所示:
我有一个 form1
var form1 = new Ext.form.FormPanel({
id: 'form1',
standardSubmit : false,
scroll:'vertical',
dockedItems: [
form1topToolBar
],
items: [
{
xtype: 'textfield',
name: 'form1One',
label: 'Name'
}
]
});
我也有一个 form2
var form2 = new Ext.form.FormPanel({
id: 'form2',
standardSubmit : false,
scroll:'vertical',
dockedItems: [
form2topToolBar
],
items: [
{
html: [
'<table class="outputTable">',
'<tr>',
'<td>form1.getValues().form1One</td>', <-------- Here is the value that I want.
'</tr>',
'</table>'
]
}
]
});
Since Sencha Touch has all the interface elements, I decided to use it. Can someone tell me how to integrate the existing value in an items "HTML" config?
Codes are showing below:
I've got a form1
var form1 = new Ext.form.FormPanel({
id: 'form1',
standardSubmit : false,
scroll:'vertical',
dockedItems: [
form1topToolBar
],
items: [
{
xtype: 'textfield',
name: 'form1One',
label: 'Name'
}
]
});
I've also got a form2
var form2 = new Ext.form.FormPanel({
id: 'form2',
standardSubmit : false,
scroll:'vertical',
dockedItems: [
form2topToolBar
],
items: [
{
html: [
'<table class="outputTable">',
'<tr>',
'<td>form1.getValues().form1One</td>', <-------- Here is the value that I want.
'</tr>',
'</table>'
]
}
]
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我假设您尝试在用户更改值时更新
元素。以下是执行此操作的代码:
转到此处 了解有关模板的更多信息。
I'm going to assume you are trying to update the
<td>
element when the user changes values. Here is the code to do that:Go here to learn more about templates.