AJJ
AJJ

Reputation: 3628

ExtJs - Get element by itemId in extJs 3.4

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.

Upvotes: 0

Views: 3859

Answers (1)

AJJ
AJJ

Reputation: 3628

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();
   }

Upvotes: 1

Related Questions