Package org.jboss.dashboard.ui.formatters

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


    public boolean validate() {
        boolean valid = true;
        if (name != null && title != null) {
            if (name.get(LocaleManager.lookup().getDefaultLang()) == null) {
                addFieldError(new FactoryURL(getComponentName(), "name"), null, name);
                getMessagesComponentHandler().addError("ui.alert.workspaceErrors.name");
                valid = false;
            }
            if (title.get(LocaleManager.lookup().getDefaultLang()) == null) {
                addFieldError(new FactoryURL(getComponentName(), "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.get(LocaleManager.lookup().getDefaultLang()) == null) {
            addFieldError(new FactoryURL(getComponentName(), "name"), null, name);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.name");
            valid = false;
        }
        if (title == null || title.get(LocaleManager.lookup().getDefaultLang()) == null) {
            addFieldError(new FactoryURL(getComponentName(), "title"), null, title);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.title");
            valid = false;
        }
        if (!isValidURL(url)) {
            addFieldError(new FactoryURL(getComponentName(), "url"), null, url);
            getMessagesComponentHandler().addError("ui.alert.workspaceErrors.url");
            valid = false;
        }
        return valid;
    }
View Full Code Here

    }

    protected boolean validate() {
        try {
            if (!titleMap.containsKey(LocaleManager.lookup().getDefaultLang())) {
                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();
        } catch (Exception e) {
View Full Code Here

        //Normal parameters
        for (Iterator it = paramsMap.keySet().iterator(); it.hasNext();) {
            String paramName = (String) it.next();
            try {
                FactoryURL fUrl = FactoryURL.getURL(paramName);
                boolean newBeanProcessed = beansModified.add(fUrl.getComponentName());
                String[] paramValues = (String[]) paramsMap.get(paramName);
                setBeanValue(fUrl, paramValues, newBeanProcessed);
            } catch (ParseException e) {
                if (log.isDebugEnabled()) log.debug("Parameter " + paramName + " is not for setting a bean property.");
            } catch (LookupException e) {
                log.error("Error: ", e);
            }
        }

        //File parameters
        for (Iterator it = filesMap.keySet().iterator(); it.hasNext();) {
            String paramName = (String) it.next();
            try {
                FactoryURL fUrl = FactoryURL.getURL(paramName);
                boolean newBeanProcessed = beansModified.add(fUrl.getComponentName());
                File file = (File) filesMap.get(paramName);
                setBeanValue(fUrl, file, newBeanProcessed);
            } catch (ParseException e) {
                if (log.isDebugEnabled()) log.debug("Parameter " + paramName + " is not for setting a bean property.");
            } catch (LookupException e) {
View Full Code Here

    }

    protected boolean validate() {

        if (title == null || "".equals(title)) {
            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();
    }
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 void validate() {
        if (title == null || "".equals(title)) {
            addFieldError(new FactoryURL(getBeanName(), "title"), null, title);
        }
    }
View Full Code Here

    }

    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

    }

    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

    /**
     * @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 e) {
            handleError(e);
        }
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.