void copy(boolean toModel, String fieldToUpdate, YIComponent view, Object model) {
       ArrayList components = YUIToolkit.getViewComponents(view);
       Iterator it = components.iterator();
       while (it.hasNext()) {
           Object comp = it.next();
           // copying first extended fields since this is usually desired order (YComboBox):
           if (comp instanceof YIExtendedModelComponent) {
               YIExtendedModelComponent extComp = (YIExtendedModelComponent) comp;
               String[] fieldNames = extComp.getExtendedFields();
               for (int i=0; i < fieldNames.length; i++) {
                   String fieldName = fieldNames[i];
                   if (shouldCopy(fieldName, fieldToUpdate)) {
                       if (toModel) {
                           copyFromComponentToModel(extComp, fieldName, model);
                       } else {
                           copyFromModelToComponent(extComp, fieldName, model);
                       }
                   }
               }
           }
           // copying then model value:
           if (comp instanceof YIModelComponent) {
               YIModelComponent modelComponent = (YIModelComponent) comp;
               String mvcName = (String) modelComponent.getYProperty().get(YIComponent.MVC_NAME);
               if (shouldCopy(mvcName, fieldToUpdate)) {
                   if (toModel) {
                       copyFromComponentToModel(modelComponent, model);
                   } else {
                       copyFromModelToComponent(modelComponent, model);
                   }
               }
           }
       }
   }