Package org.jboss.dashboard.factory

Examples of org.jboss.dashboard.factory.Component


     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspException {
        String beanName = getBean();
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(beanName);
        if (component == null) {
            log.error("Cannot write to component " + beanName + " as it doesn't exist.");
        } else {
            try {
                component.setProperty(getProperty(), new String[]{getPropValue()});
            } catch (Exception e) {
                log.error("Error: ", e);
            }
        }
        return EVAL_PAGE;
View Full Code Here


        }
    }

    protected void setBeanValue(FactoryURL fUrl, File file, boolean firstTime) throws LookupException {
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(fUrl.getComponentName());
        if (component == null) {
            log.error("Cannot write to component " + fUrl.getComponentName() + " as it doesn't exist.");
        } else {
            if (firstTime) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).clearFieldErrors();
                }
            }
            try {
                component.setProperty(fUrl.getPropertyName(), file);
            }
            catch (Exception e) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).addFieldError(fUrl, e, file);
                } else {
                    log.warn("Error setting value to " + fUrl + " is ignored.");
                }
View Full Code Here

        }
    }

    protected void setBeanValue(FactoryURL fUrl, String[] paramValues, boolean firstTime) throws LookupException {
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(fUrl.getComponentName());
        if (component == null) {
            log.error("Cannot write to component " + fUrl.getComponentName() + " as it doesn't exist.");
        } else {
            if (firstTime) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).clearFieldErrors();
                }
            }
            try {
                component.setProperty(fUrl.getPropertyName(), paramValues);
            }
            catch (Exception e) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).addFieldError(fUrl, e, paramValues);
                } else {
                    log.warn("Error setting value to " + fUrl + " is ignored.");
                }
View Full Code Here

     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspException {
        String beanName = getBean();
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(beanName);
        if (component == null) {
            log.error("Cannot write to component " + beanName + " as it doesn't exist.");
        } else {
            try {
                component.setProperty(getProperty(), new String[]{getPropValue()});
            } catch (Exception e) {
                handleError(e);
            }
        }
        return EVAL_PAGE;
View Full Code Here

        }
    }

    protected void setBeanValue(FactoryURL fUrl, File file, boolean firstTime) throws LookupException {
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(fUrl.getComponentName());
        if (component == null) {
            log.error("Cannot write to component " + fUrl.getComponentName() + " as it doesn't exist.");
        } else {
            if (firstTime) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).clearFieldErrors();
                }
            }
            try {
                component.setProperty(fUrl.getPropertyName(), file);
            }
            catch (Exception e) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).addFieldError(fUrl, e, file);
                } else {
                    log.warn("Error setting value to " + fUrl + " is ignored.");
                }
View Full Code Here

        }
    }

    protected void setBeanValue(FactoryURL fUrl, String[] paramValues, boolean firstTime) throws LookupException {
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(fUrl.getComponentName());
        if (component == null) {
            log.error("Cannot write to component " + fUrl.getComponentName() + " as it doesn't exist.");
        } else {
            if (firstTime) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).clearFieldErrors();
                }
            }
            try {
                component.setProperty(fUrl.getPropertyName(), paramValues);
            }
            catch (Exception e) {
                Object o = component.getObject();
                if (o instanceof HandlerFactoryElement) {
                    ((HandlerFactoryElement) o).addFieldError(fUrl, e, paramValues);
                } else {
                    log.warn("Error setting value to " + fUrl + " is ignored.");
                }
View Full Code Here

     * @see javax.servlet.jsp.tagext.TagSupport
     */
    public int doEndTag() throws JspException {
        String beanName = getBean();
        ComponentsTree componentsTree = Application.lookup().getGlobalFactory().getTree();
        Component component = componentsTree.getComponent(beanName);
        if (component == null) {
            log.error("Cannot write to component " + beanName + " as it doesn't exist.");
        } else {
            try {
                component.setProperty(getProperty(), new String[]{getPropValue()});
            } catch (Exception e) {
                log.error("Error: ", e);
            }
        }
        return EVAL_PAGE;
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.factory.Component

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.