Package org.apache.struts.action

Examples of org.apache.struts.action.ActionFormBeans


        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here


        // Retrieve the requested object to be exposed
        Object object = null;
        String selector = null;
        if (formBean != null) {
            selector = formBean;
            ActionFormBeans collection = (ActionFormBeans)
                pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findFormBean(formBean);
        } else if (forward != null) {
            selector = forward;
            ActionForwards collection = (ActionForwards)
                pageContext.getAttribute(Action.FORWARDS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here

        // Retrieve the requested object to be exposed
        Object object = null;
        String selector = null;
        if (formBean != null) {
            selector = formBean;
            ActionFormBeans collection = (ActionFormBeans)
                pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findFormBean(formBean);
        } else if (forward != null) {
            selector = forward;
            ActionForwards collection = (ActionForwards)
                pageContext.getAttribute(Action.FORWARDS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

        // Look up the application scope collections that we need
        ActionMappings mappings = (ActionMappings)
            pageContext.getAttribute(Action.MAPPINGS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        ActionFormBeans formBeans = (ActionFormBeans)
            pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                     PageContext.APPLICATION_SCOPE);
        if ((mappings == null) || (formBeans == null)) {
            JspException e = new JspException
                (messages.getMessage("formTag.collections"));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the action mapping we will be submitting to
        String mappingName = getActionMappingName();
        ActionMapping mapping = mappings.findMapping(mappingName);
        if (mapping == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.mapping", mappingName));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
            throw e;
        }

        // Look up the form bean definition
        ActionFormBean formBean =
            formBeans.findFormBean(mapping.getName());
        if (formBean == null) {
            JspException e = new JspException
                (messages.getMessage("formTag.formBean", mapping.getName()));
            pageContext.setAttribute(Action.EXCEPTION_KEY, e,
                                     PageContext.REQUEST_SCOPE);
View Full Code Here

        // Retrieve the requested object to be exposed
        Object object = null;
        String selector = null;
        if (formBean != null) {
            selector = formBean;
            ActionFormBeans collection = (ActionFormBeans)
                pageContext.getAttribute(Action.FORM_BEANS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findFormBean(formBean);
        } else if (forward != null) {
            selector = forward;
            ActionForwards collection = (ActionForwards)
                pageContext.getAttribute(Action.FORWARDS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findForward(forward);
        } else if (mapping != null) {
            selector = mapping;
            ActionMappings collection = (ActionMappings)
                pageContext.getAttribute(Action.MAPPINGS_KEY,
                                         PageContext.APPLICATION_SCOPE);
            if (collection != null)
                object = collection.findMapping(mapping);
        }
        if (object == null) {
            JspException e = new JspException
                (messages.getMessage("struts.missing", selector));
            RequestUtils.saveException(pageContext, e);
View Full Code Here

     *
     * @param name Logical name of the requested form bean definition
     */
    public ActionFormBean getFormBean(String name) {

        ActionFormBeans formBeans = getActionFormBeans();

        if (formBeans == null)
            return null;
        return formBeans.findFormBean(name);

    }
View Full Code Here

     *
     * @param name Logical name of the requested form bean definition
     */
    public ActionFormBean getFormBean(String name) {

        ActionFormBeans formBeans = getActionFormBeans();

        if (formBeans==null)
            return null;
        return formBeans.findFormBean(name);

    }
View Full Code Here

     *
     * @param name Logical name of the requested form bean definition
     */
    public ActionFormBean getFormBean(String name) {

        ActionFormBeans formBeans = getActionFormBeans();

        if (formBeans==null)
            return null;
        return formBeans.findFormBean(name);

    }
View Full Code Here

TOP

Related Classes of org.apache.struts.action.ActionFormBeans

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.