Package org.apache.struts.action

Examples of org.apache.struts.action.ActionForm


                req.setAttribute(Globals.MODULE_KEY, moduleConfig);
                req.setAttribute(Globals.MESSAGES_KEY, new WrapperMessageResources((TextProvider)invocation.getAction()));
               
                mapping.setAttribute(modelDriven.getScopeKey());
               
                ActionForm form = (ActionForm) model;
                form.setServlet(new ActionServlet(){
                    public ServletContext getServletContext() {
                        return ServletActionContext.getServletContext();
                    }
                });
                ActionErrors errors = form.validate(mapping, req);
                strutsFactory.convertErrors(errors, action);               
            }
        }
        return invocation.invoke();
    }
View Full Code Here


        assertNull(context.getSessionScope().get(formName));

        assertSame(context.get(POST_EXECUTION_CONTEXT_KEY),
            context.getRequestScope().get(formName));

        ActionForm theForm =
            (ActionForm) context.get(POST_EXECUTION_CONTEXT_KEY);

        assertTrue(theForm instanceof MockFormBean);
    }
View Full Code Here

        assertNull(context.getSessionScope().get(formName));

        assertSame(context.get(POST_EXECUTION_CONTEXT_KEY),
            context.getRequestScope().get(formName));

        ActionForm theForm =
            (ActionForm) context.get(POST_EXECUTION_CONTEXT_KEY);

        assertTrue(theForm instanceof MockFormBean);
    }
View Full Code Here

        assertNotNull(context.getSessionScope().get(formName));

        assertSame(context.get(POST_EXECUTION_CONTEXT_KEY),
            context.getSessionScope().get(formName));

        ActionForm theForm =
            (ActionForm) context.get(POST_EXECUTION_CONTEXT_KEY);

        assertTrue(theForm instanceof DynaActionForm);

        DynaActionForm dForm = (DynaActionForm) theForm;
View Full Code Here

        assertNull(context.getSessionScope().get(formName));

        assertSame(context.getActionForm(),
            context.getRequestScope().get(formName));

        ActionForm theForm = (ActionForm) context.getActionForm();

        assertTrue(theForm instanceof MockFormBean);
    }
View Full Code Here

        ActionMapping mapping =
            (ActionMapping) moduleConfig.findActionConfig("/noform");

        assertNotNull("Found /noform mapping", mapping);

        ActionForm form =
            RequestUtils.createActionForm(request, mapping, moduleConfig, null);

        assertNull("No ActionForm returned", form);
    }
View Full Code Here

        ActionMapping mapping =
            (ActionMapping) moduleConfig2.findActionConfig("/noform");

        assertNotNull("Found /noform mapping", mapping);

        ActionForm form =
            RequestUtils.createActionForm(request, mapping, moduleConfig2, null);

        assertNull("No ActionForm returned", form);
    }
View Full Code Here

        assertNotNull("Mapping has non-null name", mapping.getName());
        assertEquals("Mapping has correct name", "static", mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
            moduleConfig.findFormBeanConfig(mapping.getName()));

        ActionForm form =
            RequestUtils.createActionForm(request, mapping, moduleConfig, null);

        assertNotNull("ActionForm returned", form);
        assertTrue("ActionForm of correct type", form instanceof MockFormBean);
    }
View Full Code Here

        assertNotNull("Mapping has non-null name", mapping.getName());
        assertEquals("Mapping has correct name", "static", mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
            moduleConfig.findFormBeanConfig(mapping.getName()));

        ActionForm form =
            RequestUtils.createActionForm(request, mapping, moduleConfig2, null);

        assertNotNull("ActionForm returned", form);
        assertTrue("ActionForm of correct type", form instanceof MockFormBean);
    }
View Full Code Here

        assertNotNull("Mapping has non-null name", mapping.getName());
        assertEquals("Mapping has correct name", "dynamic", mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
            moduleConfig.findFormBeanConfig(mapping.getName()));

        ActionForm form =
            RequestUtils.createActionForm(request, mapping, moduleConfig, null);

        assertNotNull("ActionForm returned", form);
        assertTrue("ActionForm of correct type", form instanceof DynaActionForm);
    }
View Full Code Here

TOP

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

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.