formPanel load()方法

FormPanel的api中说formPanel.getForm.load()是远程加载内容,那我现在要做界面原型,不用服务器数据交互,请问怎么能做到把数据添加到Form中呢,具体看图片

[color=red]1.看到修改按钮[/color]
[img]http://dl.iteye.com/upload/attachment/478835/f2f78212-e0d5-3af1-bcef-1c5e551ea778.png[/img]

[color=red]2.单击修改按钮,弹出alert()测试说明数据已经完全取到[/color][img]http://dl.iteye.com/upload/attachment/478837/bc366378-17a7-3de5-a98f-28a102565a28.png[/img]

[color=red]3.怎么能把取到的数据放到formPanel中[/color]

[img]http://dl.iteye.com/upload/attachment/478839/6e4c97a1-9df2-3fa9-8f01-9752ee7398d7.png[/img]

1个回答

var obj={
name:'部门名称',
description:'部门描述'

}

formPanel.getForm().setValues(obj);

立即提问