0

How do i get the components with same 'itemId'? using ExtJS 3.4.

I have 4 combos in different hbox layout with same itemId. I need get the values of all these combox. Is there any api's available for this?

  form1  
    row1 combo1
  form1
    row2 combo2
  form1
    row3 combo3
  form1
    row4 combo4

Please help.

AJJ
  • 3,570
  • 7
  • 43
  • 76
  • This will return the dom element. Ext.query(#itemId); but how can i get the complete component (ike what is returned from Ext.getCmp();) – AJJ Aug 27 '12 at 14:32

1 Answers1

1

I solved it by using 'hiddeName' for components inside the form. Through Ext.query() we can get all the hbox forms and from that form.getValues() will provide the values of components inside the form.

   forms = Ext.query(#formId); 
   for (var i=0; i < forms.length; i ++) {
     formValues = new Ext.form.BasicForm(forms[i]).getValues();
   }
AJJ
  • 3,570
  • 7
  • 43
  • 76