2012-02-03 22 views

risposta

14

ha trovato la mia risposta se si restituisce false, non eseguirà l'iterazione successiva sul ciclo.

Ext.each(arrayObj, function(obj){ 
    if(obj.isSomethingTrue()){ 
     doSomething(); 
     return false; /*this will prevent each from looking at 
         the next obj in the arrayObj*/ 
    } 
});