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

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


        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            ScopedRole scopedRole = form.getUpdatedEntity();
                            // The form cannot handle enums...
                            scopedRole.setBaseRole(baseRoleItem.getValue());
                            scopedRole.setType(typeItem.getValue());
                            presenter.addScopedRole(scopedRole);
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

                            "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

        DialogueOptions options = new DialogueOptions(
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if (!validation.hasErrors()) {
                            Principal principal = form.getUpdatedEntity();
                            principal.setType(principalType);
                            presenter.onAdd(role, roleAssignment, principal);
                        }
                    }
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

        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

                            (SingleSelectionModel<JDBCDriver>) table.getSelectionModel();
                    driver = selection.getSelectedObject();
                }
                else
                {
                    FormValidation formValidation = form.validate();
                    if(!formValidation.hasErrors())
                    {
                        driver = form.getUpdatedEntity();
                    }
                }
View Full Code Here

                // save

                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if(!validation.hasErrors())
                        {
                            ConnectionDefinition connectionDef = form.getUpdatedEntity();
                            connectionDef.setApplication(true); // JBPAPP-9977: reasonable default
                            parent.onCompleteStep1(connectionDef);
                        }
View Full Code Here

        layout.add(form.asWidget());

        ClickHandler submitHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                FormValidation validation = form.validate();
                if(!validation.hasErrors())
                {
                    wizard.onConfigureBaseAttributes(form.getUpdatedEntity());
                }
            }
        };
View Full Code Here

        layout.add(form.asWidget());

        ClickHandler submitHandler = new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                FormValidation validation = form.validate();
                if(!validation.hasErrors())
                {
                    wizard.onFinish(form.getUpdatedEntity());
                }
            }
        };
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.