Package pl.net.bluesoft.rnd.processtool.ui.basewidgets.xml.validation

Examples of pl.net.bluesoft.rnd.processtool.ui.basewidgets.xml.validation.XmlValidationError


    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasText(format)) {
            errors.add(new XmlValidationError("date", "format", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here


    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasText(url)) {
            errors.add(new XmlValidationError("link", "url", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasLength(pos)) {
            errors.add(new XmlValidationError("align", "pos", XML_TAG_EMPTY));
        }
        else if (!(ALIGN_POS_LEFT_TOP.equalsIgnoreCase(pos) || ALIGN_POS_LEFT_BOTTOM.equalsIgnoreCase(pos) || ALIGN_POS_LEFT_MIDDLE.equalsIgnoreCase(pos)
                || ALIGN_POS_CENTER_TOP.equalsIgnoreCase(pos) || ALIGN_POS_CENTER_BOTTOM.equalsIgnoreCase(pos) || ALIGN_POS_CENTER_MIDDLE.equalsIgnoreCase(pos)
                || ALIGN_POS_RIGHT_TOP.equalsIgnoreCase(pos) || ALIGN_POS_RIGHT_BOTTOM.equalsIgnoreCase(pos) || ALIGN_POS_RIGHT_MIDDLE.equalsIgnoreCase(pos))) {
            errors.add(new XmlValidationError("align", "pos", XML_TAG_INVALID));
        }
        return errors;
    }
View Full Code Here

    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasText(text)) {
            errors.add(new XmlValidationError("label", "[text | messageKey]", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasText(regexp) && StringUtil.hasText(errorKey) || StringUtil.hasText(regexp) && !StringUtil.hasText(errorKey)) {
            errors.add(new XmlValidationError("input", "[regexp & errorKey]", XmlConstants.XML_TAG_INVALID));
        }
        return errors;
    }
View Full Code Here

public class UploadWidgetElement extends WidgetElement {
    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!StringUtil.hasText(bind)) {
            errors.add(new XmlValidationError("upload", "bind", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

    @Override
    public List<XmlValidationError> validate() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (StringUtil.hasText(provider) && !StringUtil.hasText(dict)) {
            errors.add(new XmlValidationError("select", "dict", XmlConstants.XML_TAG_EMPTY));
        } else if (!StringUtil.hasText(provider) && StringUtil.hasText(dict)) {
            errors.add(new XmlValidationError("select", "provider", XmlConstants.XML_TAG_EMPTY));
        } else if (!(StringUtil.hasText(provider) && StringUtil.hasText(dict)) &&
//                script == null &&
                getValues().isEmpty() && !StringUtil.hasText(dictionaryAttribute)) {
            errors.add(new XmlValidationError("select", "[dict & provider | values | dictionaryAttribute]", XmlConstants.XML_TAG_EMPTY));
//        } else if (script != null) {
//            errors.addAll(script.validate());
        } else if (!getValues().isEmpty()) {
            for (ItemElement ie : getValues()) {
                errors.addAll(ie.validateElement());
View Full Code Here

    }
    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (StringUtil.hasText(provider) && !StringUtil.hasText(dict)) {
            errors.add(new XmlValidationError("select", "dict", XmlConstants.XML_TAG_EMPTY));
        } else if (!StringUtil.hasText(provider) && StringUtil.hasText(dict)) {
            errors.add(new XmlValidationError("select", "provider", XmlConstants.XML_TAG_EMPTY));
        } else if (!(StringUtil.hasText(provider) && StringUtil.hasText(dict)) &&
//                script == null &&
                getValues().isEmpty() && !StringUtil.hasText(dictionaryAttribute)) {
            errors.add(new XmlValidationError("select", "[dict & provider | values | dictionaryAttribute]", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

    }

    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (!(StringUtil.hasText(value) && StringUtil.hasText(key))) {
            errors.add(new XmlValidationError("item", "[key & value]", XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

    @Override
    public List<XmlValidationError> validateElement() {
        List<XmlValidationError> errors = new ArrayList<XmlValidationError>();
        if (rows == null || rows == 0) {
            errors.add(new XmlValidationError("grid", "rows", rows != null ? XmlConstants.XML_TAG_INVALID : XmlConstants.XML_TAG_EMPTY));
        }
        return errors;
    }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.ui.basewidgets.xml.validation.XmlValidationError

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.