Package org.jdesktop.binding

Examples of org.jdesktop.binding.DataModel


    public boolean validate() {
        boolean result = true;
        ArrayList models = new ArrayList();
        for (Iterator iter = getBindingList().iterator(); iter.hasNext();) {
            Binding element = (Binding) iter.next();
            DataModel bindingModel = element.getDataModel();
            if (!models.contains(bindingModel)) {
                models.add(bindingModel);
            }
            if (!element.isValid()) {
                result = false;
            }

        }
        if (result) {
            for (int i = 0; i < models.size(); i++) {
                DataModel model = (DataModel) models.get(i);
                Validator validators[] = model.getValidators();
                for (int j = 0; j < validators.length; j++) {
                    String error[] = new String[1];
                    /** @todo aim: where to put error? */
                    if (!validators[j].validate(model, /* getLocale() */null,
                            error)) {
View Full Code Here

TOP

Related Classes of org.jdesktop.binding.DataModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.