{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"itemId":"html controls"},"expanded":true,"children":[{"configs":{"itemId":"nation","createInstance":"false","keyName":"nation"},"expanded":false,"children":[],"type":"tselect"},{"configs":{"itemId":"sex","createInstance":"false"},"expanded":false,"children":[],"type":"ttoggle","events":{"change":"toggle.element.up('td').prev().setHtml('性别（' + (newValue ? '男' : '女') + '）');"}}],"type":"folder"},{"configs":{"layout":"fit","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"toolbar1","docked":"top"},"expanded":true,"children":[{"configs":{"itemId":"getItem","text":"获取值"},"expanded":false,"children":[],"type":"tbutton","events":{"tap":"Wb.info('你输入的姓名为：' + app.name.getValue()); //Wb.getValue(app.container1);"}},{"configs":{"itemId":"setItem","text":"设置值"},"expanded":false,"children":[],"type":"tbutton","events":{"tap":"Wb.setValue(app.container1, {\n  name: 'Your name',\n  sex: true,\n  birthdate: new Date()\n});"}},{"configs":{"itemId":"updateItem","text":"动态更新"},"expanded":false,"children":[],"type":"tbutton","events":{"tap":"app.container1.setHtml(\"<table width='100%'><tr><td width='40%' align='right'>动态生成页面：<\/td><td width='60%' obj=\\\"{itemId:'name',xtype:'textfield'}\\\"><\/td><tr><\/table>\");\napp.container1.updateObject(); //根据dom的obj属性动态生成控件"}}],"type":"ttoolbar"},{"configs":{"itemId":"container1","html":"<div style=\"padding:8px;\">\n  <table class=\"wb_tb wb_white wb_pad\" border=\"1\" style=\"line-height:3;\" width='100%'>\n    <tr>\n      <td width=\"40%\" class=\"wb_gray\">姓名<\/td><td width='60%' obj=\"{itemId:'name',xtype:'textfield',allowBlank:false}\"><\/td>\n    <tr>\n    <tr>\n      <td class=\"wb_gray\">性别<\/td><td obj=\"sex\"><\/td>\n    <\/tr>\n    <tr>\n      <td class=\"wb_gray\">出生日期<\/td><td>##{itemId:'birthdate',xtype:'datepickerfield'}<\/td> <\/tr>\n    <tr>\n      <td class=\"wb_gray\">民族<\/td><td>##nation<\/td>\n    <\/tr>\n    <tr>\n      <td class=\"wb_gray\">住址<\/td><td obj=\"{itemId:'address',xtype:'textfield'}\"><\/td>\n    <\/tr>\n  <\/table>\n<\/div>\n","createObject":"true","scrollable":"true"},"expanded":false,"children":[],"type":"tcontainer"}],"type":"tviewport"}],"type":"module"}],"roles":{"demo":1},"title":"HTML和控件的混合","iconCls":"","inframe":true,"pageLink":""}