{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"itemId":"html controls"},"expanded":true,"children":[{"configs":{"itemId":"nation","createInstance":"false","keyName":"nation","width":"160"},"expanded":false,"children":[],"type":"combo"}],"type":"folder"},{"configs":{"itemId":"viewport1","html":"<div style=\"padding:8px;\">\n  <table class=\"wb_tb\" border=\"1\" cellpadding=\"4\" style=\"width:500px\">\n    <tr>\n      <td width=\"80px\" class=\"wb_gray\">姓名<\/td><td obj=\"{itemId:'name',xtype:'textfield',allowBlank:false,width:160}\"><\/td>\n      <td width=\"80px\" class=\"wb_gray\">性别<\/td><td obj=\"{itemId:'sex',xtype:'radiogroup',width:160,items:[{boxLabel:'男'},{boxLabel:'女',checked:true}]}\"><\/td>\n    <\/tr>\n    <tr>\n      <td class=\"wb_gray\">出生日期<\/td><td>##{itemId:'birthdate',xtype:'datefield',width:160}<\/td>\n      <td class=\"wb_gray\">民族<\/td><td obj=\"nation\"><\/td>\n    <\/tr>\n    <tr><td class=\"wb_gray\">住址<\/td><td colspan=\"3\" obj=\"{itemId:'address',xtype:'textfield',width:'100%'}\"><\/td><\/tr>\n  <\/table>\n<\/div>","createObject":"true"},"expanded":true,"children":[{"configs":{"itemId":"toolbar1"},"expanded":true,"children":[{"configs":{"itemId":"getItem","text":"获取值"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.info(Wb.encode(Wb.getValue(app.viewport1)));"}},{"configs":{"itemId":"setItem","text":"设置值"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.setValue(app.viewport1, {\n  name: 'Your name',\n  sex: 0,\n  birthdate: new Date()\n});"}},{"configs":{"itemId":"verifyItem","text":"验证值"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.verify(app.viewport1);"}},{"configs":{"itemId":"updateItem","text":"动态更新"},"expanded":false,"children":[],"type":"item","events":{"click":"app.viewport1.update(\"<table><tr><td>这是动态生成的页面：<\/td><td obj=\\\"{itemId:'name',xtype:'textfield',allowBlank:false,width:160}\\\"><\/td><tr><\/table>\");\napp.viewport1.updateObject(); //根据dom的obj属性动态生成控件"}}],"type":"toolbar"}],"type":"viewport"}],"type":"module"}],"roles":{"demo":1},"title":"HTML和控件的混合","iconCls":"","inframe":false,"pageLink":""}