Package org.jboss.as.console.client.shared.general.validation

Examples of org.jboss.as.console.client.shared.general.validation.ValidationResult


        toolstrip.providesDeleteOp(false);
        toolstrip.setPreValidation(new FormToolStrip.PreValidation() {
            @Override
            public boolean isValid() {
                ValidationResult validation = presenter.validateInterfaceConstraints(
                        form.getUpdatedEntity(),
                        form.getChangedValues()
                );


                errorMessages.setHTML("");

                if(!validation.isValid())
                {
                    SafeHtmlBuilder html = new SafeHtmlBuilder();
                    int i=0;
                    for(String detail : validation.getMessages())
                    {
                        if(i==0) html.appendHtmlConstant("<b>");
                        html.appendEscaped(detail).appendHtmlConstant("<br/>");
                        if(i==0) html.appendHtmlConstant("</b>");

                        i++;
                    }

                    //Feedback.alert("Invalid Interface Constraints", html.toSafeHtml());
                    errorMessages.setHTML(html.toSafeHtml());
                }
                return validation.isValid();


            }
        });
        form.bind(table);
View Full Code Here


        toolstrip.providesDeleteOp(false);
        toolstrip.setPreValidation(new FormToolStrip.PreValidation() {
            @Override
            public boolean isValid() {
                ValidationResult validation = presenter.validateInterfaceConstraints(
                        form.getUpdatedEntity(),
                        form.getChangedValues()
                );


                errorMessages.setHTML("");

                if(!validation.isValid())
                {
                    SafeHtmlBuilder html = new SafeHtmlBuilder();
                    int i=0;
                    for(String detail : validation.getMessages())
                    {
                        if(i==0) html.appendHtmlConstant("<b>");
                        html.appendEscaped(detail).appendHtmlConstant("<br/>");
                        if(i==0) html.appendHtmlConstant("</b>");

                        i++;
                    }

                    //Feedback.alert("Invalid Interface Constraints", html.toSafeHtml());
                    errorMessages.setHTML(html.toSafeHtml());
                }
                return validation.isValid();


            }
        });
        form.bind(table);
View Full Code Here

        };

        CompositeDecision decisionTree = new CompositeDecision();
        decisionTree.setLog(log);

        ValidationResult validation = decisionTree.validate(entity, changeset);

        // dump log
        StringBuilder sb = new StringBuilder();
        for(String s : decisions)
            sb.append(s).append(" \n");
View Full Code Here

        toolstrip.providesDeleteOp(false);
        toolstrip.setPreValidation(new FormToolStrip.PreValidation() {
            @Override
            public boolean isValid() {
                ValidationResult validation = presenter.validateInterfaceConstraints(
                        form.getUpdatedEntity(),
                        form.getChangedValues()
                );


                errorMessages.setHTML("");

                if(!validation.isValid())
                {
                    SafeHtmlBuilder html = new SafeHtmlBuilder();
                    int i=0;
                    for(String detail : validation.getMessages())
                    {
                        if(i==0) html.appendHtmlConstant("<b>");
                        html.appendEscaped(detail).appendHtmlConstant("<br/>");
                        if(i==0) html.appendHtmlConstant("</b>");

                        i++;
                    }

                    //Feedback.alert("Invalid Interface Constraints", html.toSafeHtml());
                    errorMessages.setHTML(html.toSafeHtml());
                }
                return validation.isValid();


            }
        });
        form.bind(table);
View Full Code Here

        };

        CompositeDecision decisionTree = new CompositeDecision();
        decisionTree.setLog(log);

        ValidationResult validation = decisionTree.validate(entity, changeset);

        // dump log
        StringBuilder sb = new StringBuilder();
        for(String s : decisions)
            sb.append(s).append(" \n");
View Full Code Here

                            changedValues.put("inetAddress", entity.getInetAddress());
                            changedValues.put("addressWildcard", entity.getAddressWildcard());

                            errorMessages.setHTML("");

                            ValidationResult result = presenter.validateInterfaceConstraints(entity, changedValues);

                            if(result.isValid())
                            {
                                presenter.createNewInterface(entity);
                            }
                            else
                            {
                                SafeHtmlBuilder html = new SafeHtmlBuilder();
                                int i=0;
                                for(String detail : result.getMessages())
                                {
                                    if(i==0) html.appendHtmlConstant("<b>");
                                    html.appendEscaped(detail).appendHtmlConstant("<br/>");
                                    if(i==0) html.appendHtmlConstant("</b>");
View Full Code Here

        };

        CompositeDecision decisionTree = new CompositeDecision();
        decisionTree.setLog(log);

        ValidationResult validation = decisionTree.validate(entity, changeset);

        // dump log
        StringBuilder sb = new StringBuilder();
        for(String s : decisions)
            sb.append(s).append(" \n");
View Full Code Here

        toolstrip.providesDeleteOp(false);
        toolstrip.setPreValidation(new FormToolStrip.PreValidation() {
            @Override
            public boolean isValid() {
                ValidationResult validation = presenter.validateInterfaceConstraints(
                        form.getUpdatedEntity(),
                        form.getChangedValues()
                );


                errorMessages.setHTML("");

                if(!validation.isValid())
                {
                    SafeHtmlBuilder html = new SafeHtmlBuilder();
                    int i=0;
                    for(String detail : validation.getMessages())
                    {
                        if(i==0) html.appendHtmlConstant("<b>");
                        html.appendEscaped(detail).appendHtmlConstant("<br/>");
                        if(i==0) html.appendHtmlConstant("</b>");

                        i++;
                    }

                    //Feedback.alert("Invalid Interface Constraints", html.toSafeHtml());
                    errorMessages.setHTML(html.toSafeHtml());
                }
                return validation.isValid();


            }
        });
        form.bind(table);
View Full Code Here

        };

        CompositeDecision decisionTree = new CompositeDecision();
        decisionTree.setLog(log);

        ValidationResult validation = decisionTree.validate(entity, changeset);

        // dump log
        StringBuilder sb = new StringBuilder();
        for(String s : decisions)
            sb.append(s).append(" \n");
View Full Code Here

        };

        CompositeDecision decisionTree = new CompositeDecision();
        decisionTree.setLog(log);

        ValidationResult validation = decisionTree.validate(entity, changeset);

        // dump log
        StringBuilder sb = new StringBuilder();
        for(String s : decisions)
            sb.append(s).append(" \n");
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.shared.general.validation.ValidationResult

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.