public void clearView(Class[] classesToIgnore) {
        YIComponent view = controller.getView();
        ArrayList comps = YUIToolkit.getViewComponents(view);
        Iterator it = comps.iterator();
        while (it.hasNext()) {
            Object obj = it.next();
            if (obj instanceof YIModelComponent) {
                YIModelComponent comp = (YIModelComponent) obj;
                boolean ignore=false;
                for (int i=0; i < classesToIgnore.length; i++) {
                    if (classesToIgnore[i].isAssignableFrom(obj.getClass())) {
                        ignore = true;
                    }
                }
                if (!ignore) {
                    try {
                        comp.setModelValue(null);
                    } catch (Exception ex) {
                        // unexpected exception, this should never happen:
                        controller.handleException(ex);
                    }
                }
            }
        }
        controller.copyToModel(null);
    }