Examples of ActionForm


Examples of org.apache.struts.action.ActionForm

            log.warn("No FormBeanConfig found under '" + name + "'");

            return (null);
        }

        ActionForm instance =
            lookupActionForm(request, attribute, mapping.getScope());

        // Can we recycle the existing form bean instance (if there is one)?
        if ((instance != null) && config.canReuse(instance)) {
            return (instance);
View Full Code Here

Examples of org.apache.struts.action.ActionForm

        if (log.isDebugEnabled()) {
            log.debug(" Looking for ActionForm bean instance in scope '"
                + scope + "' under attribute key '" + attribute + "'");
        }

        ActionForm instance = null;
        HttpSession session = null;

        if ("request".equals(scope)) {
            instance = (ActionForm) request.getAttribute(attribute);
        } else {
View Full Code Here

Examples of org.apache.struts.action.ActionForm

        ActionServlet servlet) {
        if (config == null) {
            return (null);
        }

        ActionForm instance = null;

        // Create and return a new form bean instance
        try {
            instance = config.createActionForm(servlet);
View Full Code Here

Examples of org.apache.struts.action.ActionForm

            obj = getDynaActionFormClass().newInstance();
        } else {
            obj = formBeanClass().newInstance();
        }

        ActionForm form = null;

        if (obj instanceof ActionForm) {
            form = (ActionForm) obj;
        } else {
            form = new BeanValidatorForm(obj);
        }

        form.setServlet(servlet);

        if (form instanceof DynaBean
            && ((DynaBean) form).getDynaClass() instanceof MutableDynaClass) {
            DynaBean dynaBean = (DynaBean) form;
            MutableDynaClass dynaClass =
View Full Code Here

Examples of org.apache.struts.action.ActionForm

        if (attribute == null) {
            return (null);
        }

        // Look up the existing form bean, if any
        ActionForm instance;

        if ("request".equals(mapping.getScope())) {
            instance = (ActionForm) this.request.getAttribute(attribute);
        } else {
            instance = (ActionForm) this.session.getAttribute(attribute);
View Full Code Here

Examples of org.apache.struts.action.ActionForm

            return (false);
        }

        Map scope = actionCtx.getScope(actionConfig.getScope());

        ActionForm instance;

        instance = (ActionForm) scope.get(actionConfig.getAttribute());

        // Can we recycle the existing instance (if any)?
        if (!formBeanConfig.canReuse(instance)) {
            instance = formBeanConfig.createActionForm(actionCtx);
        }

        // TODO: Remove ServletActionContext when ActionForm no longer
        //  directly depends on ActionServlet
        if (actionCtx instanceof ServletActionContext) {
            // The servlet property of ActionForm is transient, so
            // ActionForms which are restored from a serialized state
            // need to have their servlet restored.
            ServletActionContext sac = (ServletActionContext) actionCtx;

            instance.setServlet(sac.getActionServlet());
        }

        actionCtx.setActionForm(instance);

        scope.put(actionConfig.getAttribute(), instance);
View Full Code Here

Examples of org.apache.struts.action.ActionForm

        if (action == null) {
            return (false);
        }

        ActionConfig actionConfig = actionCtx.getActionConfig();
        ActionForm actionForm = actionCtx.getActionForm();

        // Execute the Action for this request, caching returned ActionForward
        ForwardConfig forwardConfig =
            execute(actionCtx, action, actionConfig, actionForm);
View Full Code Here

Examples of org.apache.struts.action.ActionForm

     * @throws Exception On an unexpected error
     */
    public boolean execute(ActionContext actionCtx)
        throws Exception {
        // Is there a form bean for this request?
        ActionForm actionForm = actionCtx.getActionForm();

        if (actionForm == null) {
            return (false);
        }

View Full Code Here

Examples of org.apache.struts.action.ActionForm

     * @return TRUE if processing should halt
     * @throws Exception on any error
     */
    public boolean execute(ActionContext actionContext)
        throws Exception {
        ActionForm form = findOrCreateForm(actionContext);

        if (isEmpty(getToKey())) {
            throw new IllegalStateException("Property 'toKey' must be defined.");
        }

View Full Code Here

Examples of org.apache.struts.action.ActionForm

        } catch (ClassCastException e) {
            throw new IllegalStateException("ActionContext [" + ctx + "]"
                + " must be subclass of ActionContextBase");
        }

        ActionForm form =
            context.findOrCreateActionForm(effectiveFormName, effectiveScope);

        if (form == null) {
            throw new IllegalArgumentException("No form found under scope ["
                + effectiveScope + "] and formName [" + effectiveFormName + "]");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.