Package org.jboss.ballroom.client.widgets.forms

Examples of org.jboss.ballroom.client.widgets.forms.FormValidation


                // save
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {

                        FormValidation validation = form.validate();
                        if(!validation.hasErrors())
                        {
                            Path newGroup = form.getUpdatedEntity();
                            presenter.onCreatePath(newGroup);
                        }
                    }
View Full Code Here


                    @Override
                    public void onClick(ClickEvent event) {

                        Form<RemoteSocketBinding> actualForm = form.getForm();
                        FormValidation validation = actualForm .validate();
                        if(!validation.hasErrors()) {
                            RemoteSocketBinding entity = actualForm.getUpdatedEntity();
                            presenter.onCreateRemoteSocketBinding(entity);
                        }
                    }
                },
View Full Code Here

                    @Override
                    public void onClick(ClickEvent event) {

                        Form<LocalSocketBinding> actualForm = form.getForm();
                        FormValidation validation = actualForm .validate();
                        if(!validation.hasErrors()) {
                            LocalSocketBinding entity = actualForm.getUpdatedEntity();
                            presenter.onCreateLocalSocketBinding(entity);
                        }
                    }
                },
View Full Code Here

                    @Override
                    public void onClick(ClickEvent event) {

                        Form<Acceptor> actualForm = form.getForm();
                        FormValidation validation = actualForm .validate();
                        if(!validation.hasErrors()) {
                            Acceptor entity = actualForm.getUpdatedEntity();
                            entity.setType(type);
                            presenter.onCreateAcceptor(entity);
                        }
                    }
View Full Code Here

                    @Override
                    public void onClick(ClickEvent event) {

                        Form<Connector> actualForm = form.getForm();
                        FormValidation validation = actualForm .validate();
                        if(!validation.hasErrors()) {
                            Connector entity = actualForm.getUpdatedEntity();
                            entity.setType(type);
                            presenter.onCreateConnector(entity);
                        }
                    }
View Full Code Here

        DialogueOptions options = new DialogueOptions(
            new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    FormValidation validation = form.validate();
                    if (!validation.hasErrors()) {
                        if (properties.size() == 0) {
                            Feedback.alert(Console.CONSTANTS.subsys_configadmin_add(),
                                new SafeHtmlBuilder().appendEscaped(Console.MESSAGES.subsys_configadmin_oneValueRequired()).toSafeHtml());
                        } else {
                            ConfigAdminData data = form.getUpdatedEntity();
View Full Code Here

                            "Finish",
                            new ClickHandler() {
                                @Override
                                public void onClick(ClickEvent clickEvent) {
                                    // save
                                    FormValidation validation = form.validate();
                                    if(!validation.hasErrors())
                                    {
                                        // proceed
                                        invokeOperaton(form.getUpdatedEntity());
                                    }
                                }
View Full Code Here

        }
    }

    @Override
    public FormValidation validate() {
        FormValidation formValidation = new FormValidation();
        for (FormAdapter<T> form : forms.values()) {
            FormValidation tabValidation = form.validate();
            for (String error : tabValidation.getErrors()) {
                formValidation.addError(error);
            }
        }
        return formValidation;
    }
View Full Code Here

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            RoleAssignment assignment = form.getUpdatedEntity();
                            // The form cannot handle enums...
                            assignment.setRoles(rolesItem.getValue());
                            presenter.addRoleAssignment(assignment);
                        }
View Full Code Here

        VerticalPanel panel = new VerticalPanel();
        panel.setStyleName("fill-layout");
        form = new Form<PoolConfig>(PoolConfig.class) {
            @Override
            public FormValidation validate() {
                FormValidation superValidation = super.validate();
                PoolConfig updatedEntity = this.getUpdatedEntity();

                // only works on real values
                if(ExpressionAdapter.getExpressions(updatedEntity).isEmpty())
                {
                    int minPoolSize = updatedEntity.getMinPoolSize();
                    int maxPoolSize = updatedEntity.getMaxPoolSize();
                    if(minPoolSize > maxPoolSize){
                        superValidation.addError("maxPoolSize");
                        maxCon.setErroneous(true);
                        maxCon.setErrMessage("Max Pool Size must be greater than Min Pool Size");
                    }
                }
                return superValidation;
View Full Code Here

TOP

Related Classes of org.jboss.ballroom.client.widgets.forms.FormValidation

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.