在这里lz使用了很笨的remove,add方法

1.

Ext.getCmp('testform').remove(Ext.getCmp('question'),true)


question是一个fieldset 
 
移除form中的一些item,全部清除可以用removeAll的办法
 
2.
record.pojoa().each(function(answerArray){
    	 //console.log(answerArray)
    	 var checkbox = {
    	 name:answerArray.id,
    	 xtype:'checkboxfield',
    	 label:answerArray.get('answerArray'),
    	 checked:answerArray.get('checked')
    	 };
    	 myfieldset.add(checkbox);
    	 });

 
添加到form的容器中
最后利用form的submit方法提交到服务器。。。。。。。
 
其中fieldset是动态生成的,最后添加到form中去了,整个项目只有一个form,不断的从从移除fieldset,添加新的

相关文章:

  • 2022-03-09
  • 2022-12-23
  • 2022-01-26
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-06
  • 2021-09-23
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案