Package org.apache.struts.action

Examples of org.apache.struts.action.ActionForm


        returnActionPath.append( '/' ).append( returnAction ).append( PageFlowConstants.ACTION_EXTENSION );

        //
        // Store the returned form in the request.
        //
        ActionForm retForm = pageFlowFwd.getFirstOutputForm( request );
        if ( retForm != null )
        {
            InternalUtils.setForwardedFormBean( request, retForm );
            ImplicitObjectUtil.loadOutputFormBean( request, InternalUtils.unwrapFormBean( retForm ) );
        }
View Full Code Here


        {
            ValueBinding binding = context.getApplication().createValueBinding( "#{" + submitFormBean + '}' );
            Object beanInstance = binding.getValue( context );
            Object request = context.getExternalContext().getRequest();
            assert request instanceof ServletRequest : request.getClass().getName();
            ActionForm wrappedFormBean = InternalUtils.wrapFormBean( beanInstance );
            InternalUtils.setForwardedFormBean( ( ServletRequest ) request, wrappedFormBean );
        }
       
        _delegate.processAction( event );
       
View Full Code Here

            // go back to that page, the *updated* field values are restored (i.e., we don't revert to the values of
            // the form that was passed into the page originally).
            //
            if ( form != null && _currentPageInfo != null )
            {
                ActionForm oldForm = _currentPageInfo.getForm();
                if ( oldForm == null || oldForm.getClass().equals( form.getClass() ) )
                {
                    _currentPageInfo.setForm( form );
                    _currentPageInfo.setMapping( mapping );
                }
            }
View Full Code Here

                    }
                   
                    ServletContext servletContext = InternalUtils.getServletContext( request );
                    ReloadableClassHandler rch = Handlers.get( servletContext ).getReloadableClassHandler();
                    Object formBean = rch.newInstance( _returnFormType );
                    ActionForm wrappedFormBean = InternalUtils.wrapFormBean( formBean );
                    addOutputForm( wrappedFormBean );
                    return wrappedFormBean;
                }
                catch ( Exception e )
                {
View Full Code Here

                {
                    assert _flowController != null// should be set in initialize()
                    Field field = _flowController.getClass().getDeclaredField( retFormMember );
                    returnFormClass = field.getType();
                    field.setAccessible( true );
                    ActionForm form = InternalUtils.wrapFormBean( field.get( _flowController ) );
                   
                    if ( form != null )
                    {
                        if ( _log.isDebugEnabled() )
                        {
View Full Code Here

        request.setPathElements("/myapp", "/noform.do", null, null);
        ActionMapping mapping = (ActionMapping)
            appConfig.findActionConfig("/noform");
        assertNotNull("Found /noform mapping", mapping);
        ActionForm form = RequestUtils.createActionForm
            (request, mapping, appConfig, null);
        assertNull("No ActionForm returned", form);

    }
View Full Code Here

        request.setPathElements("/myapp", "/2/noform.do", null, null);
        ActionMapping mapping = (ActionMapping)
            appConfig2.findActionConfig("/noform");
        assertNotNull("Found /noform mapping", mapping);
        ActionForm form = RequestUtils.createActionForm
            (request, mapping, appConfig2, null);
        assertNull("No ActionForm returned", form);

    }
View Full Code Here

        assertEquals("Mapping has correct name",
                     "static",
                     mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
                      appConfig.findFormBeanConfig(mapping.getName()));
        ActionForm form = RequestUtils.createActionForm
            (request, mapping, appConfig, null);
        assertNotNull("ActionForm returned", form);
        assertTrue("ActionForm of correct type",
                   form instanceof MockFormBean);
View Full Code Here

        assertEquals("Mapping has correct name",
                     "static",
                     mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
                      appConfig.findFormBeanConfig(mapping.getName()));
        ActionForm form = RequestUtils.createActionForm
            (request, mapping, appConfig2, null);
        assertNotNull("ActionForm returned", form);
        assertTrue("ActionForm of correct type",
                   form instanceof MockFormBean);
View Full Code Here

        assertEquals("Mapping has correct name",
                     "dynamic",
                     mapping.getName());
        assertNotNull("AppConfig has form bean " + mapping.getName(),
                      appConfig.findFormBeanConfig(mapping.getName()));
        ActionForm form = RequestUtils.createActionForm
            (request, mapping, appConfig, 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.