Package org.jboss.dashboard.ui.formatters

Examples of org.jboss.dashboard.ui.formatters.FactoryURL


    }

    protected boolean validate() {
        try {
            if (titleMap == null || titleMap.isEmpty()) {
                addFieldError(new FactoryURL(getBeanName(), "title"), null, title);
                getMessagesComponentHandler().addError("ui.alert.sectionErrors.title");
            }

            if (!isValidURL(url)) {
                addFieldError(new FactoryURL(getBeanName(), "url"), null, url);
                getMessagesComponentHandler().addError("ui.alert.sectionErrors.url");
            }

            return getFieldErrors().isEmpty();
        } catch (Exception e) {
View Full Code Here


    }

    public boolean validate() {
        boolean valid = true;
        if (name == null || name.isEmpty()) {
            addFieldError(new FactoryURL(getBeanName(), "name"), null, name);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.name");
            valid = false;
        }
        if (title == null || title.isEmpty()) {
            addFieldError(new FactoryURL(getBeanName(), "title"), null, title);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.title");
            valid = false;
        }
        return valid;
    }
View Full Code Here

    }

    protected boolean validate() {
        boolean valid = true;
        if (name == null || name.isEmpty()) {
            addFieldError(new FactoryURL(getBeanName(), "name"), null, name);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.name");
            valid = false;
        }
        if (title == null || title.isEmpty()) {
            addFieldError(new FactoryURL(getBeanName(), "title"), null, title);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.title");
            valid = false;
        }
        if (!isValidURL(url)) {
            addFieldError(new FactoryURL(getBeanName(), "url"), null, url);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.url");
            valid = false;
        }
        return valid;
    }
View Full Code Here

        if (!getFieldErrors().isEmpty()) {
            return;
        }
        DataSourceEntry dSource = getDataSourceManager().getDataSourceEntryByName(getName());
        if (dSource != null && !isEDIT_MODE()) {
            addFieldError(new FactoryURL(getComponentName(), "name"), null, getName());
            return;
        }

        // Edit the DataSource
        if (isEDIT_MODE()) {
View Full Code Here

    private void validate(String type) {
        clearFieldErrors();
        String javaId = StringUtils.toJavaIdentifier(getName());
        if (getName() == null || "".equals(getName()) || !javaId.equals(getName()))
            addFieldError(new FactoryURL(getComponentName(), "name"), null, getName());

        if (type == null || "".equals(type)) {
            addFieldError(new FactoryURL(getComponentName(), "jdbc"), null, getType());
            addFieldError(new FactoryURL(getComponentName(), "jndi"), null, getType());
        } else {
            if (type.equals(CUSTOM_TYPE)) {

                if (getDriverClass() == null || "".equals(getDriverClass()))
                    addFieldError(new FactoryURL(getComponentName(), "driverClass"), null, getUrl());

                if (getUrl() == null || "".equals(getUrl()))
                    addFieldError(new FactoryURL(getComponentName(), "url"), null, getUrl());

                if (getUserName() == null || "".equals(getUserName()))
                    addFieldError(new FactoryURL(getComponentName(), "userName"), null, getUserName());

                // if (getPassword() == null || "".equals(getPassword()))
                //    addFieldError(new FactoryURL(getComponentName(), "password"), null, getPassword());

            } else if (type.equals(JNDI_TYPE)) {

                if (getJndiPath() == null || "".equals(getJndiPath()))
                    addFieldError(new FactoryURL(getComponentName(), "jndiPath"), null, getJndiPath());

            }
        }
        if (getTestQuery() == null || "".equals(getTestQuery()))
            addFieldError(new FactoryURL(getComponentName(), "testQuery"), null, getTestQuery());

    }
View Full Code Here

            addFieldError(new FactoryURL(getComponentName(), "testQuery"), null, getTestQuery());

    }

    private void setJndiStatusError() {
        addFieldError(new FactoryURL(getComponentName(), "jndi"), null, getType());
        setType(JNDI_TYPE);
     }
View Full Code Here

        addFieldError(new FactoryURL(getComponentName(), "jndi"), null, getType());
        setType(JNDI_TYPE);
     }

    private void setJdbcStatusError() {
        addFieldError(new FactoryURL(getComponentName(), "jdbc"), null, getType());
        setType(CUSTOM_TYPE);
    }
View Full Code Here

    }

    protected void validate() {

        if (title == null || "".equals(title)) {
            addFieldError(new FactoryURL(getComponentName(), "title"), null, title);
        }
        /*if(!isValidURL(url)){
            addFieldError(new FactoryURL(getComponentName(), "url"), null, url);
        } */

 
View Full Code Here

    }

    protected boolean validate() {

        if (title == null || "".equals(title)) {
            addFieldError(new FactoryURL(getComponentName(), "title"), null, title);
            getMessagesComponentHandler().addError("ui.alert.sectionErrors.title");
        }
        if (!isValidURL(url)) {
            addFieldError(new FactoryURL(getComponentName(), "url"), null, url);
            getMessagesComponentHandler().addError("ui.alert.sectionErrors.url");
        }

        return getFieldErrors().isEmpty();
    }
View Full Code Here

    /**
     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspTagException {
        String linkStr = new FactoryURL(getBean(), getProperty()).toString();
        try {
            pageContext.getOut().print(linkStr);
        } catch (java.io.IOException ex) {
            log.error("Error: ", ex);
        }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.formatters.FactoryURL

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.