Package org.apache.beehive.netui.pageflow.config

Examples of org.apache.beehive.netui.pageflow.config.PageFlowActionMapping


            // beforeAction callback
            //
            beforeAction();
            gotPastBeforeAction = true;
           
            PageFlowActionMapping pfActionMapping =
                    mapping instanceof PageFlowActionMapping ? ( PageFlowActionMapping ) mapping : null;
            Object unwrappedForm = InternalUtils.unwrapFormBean( form );
           
            //
            // mapping.isOverloaded() means it's the base mapping for a set of overloaded mappings.
            // Find the one appropriate to the passed-in form.
            //
            if ( unwrappedForm != null && pfActionMapping != null )
            {
                if ( pfActionMapping.isOverloaded() )
                {
                    String mappingPath = pfActionMapping.getPath();

                    //
                    // Try the form class and all superclasses to get an overloaded action path.
                    //
                    for ( Class i = unwrappedForm.getClass(); i != null; i = i.getSuperclass() )
                    {
                        String formQualifiedActionPath = getFormQualifiedActionPath( i, mappingPath );
                        ActionConfig cf = pfActionMapping.getModuleConfig().findActionConfig( formQualifiedActionPath );
                           
                        if ( cf != null )
                        {
                            assert cf instanceof PageFlowActionMapping : cf.getClass().getName();
                               
                            if ( _log.isDebugEnabled() )
                            {
                                _log.debug( "Found form-specific mapping " + cf.getPath() +
                                           " -- choosing this one over current mapping " + mappingPath );
                            }
                               
                            pfActionMapping = ( PageFlowActionMapping ) cf;
                            mapping = pfActionMapping;
                            break;
                        }
                    }
                }               
            }
           
            String actionName = InternalUtils.getActionName( mapping );
           
            //
            // Check whether isLoginRequired=true for this action.
            //
            LoginHandler loginHandler = Handlers.get( getServletContext() ).getLoginHandler();
           
            if ( pfActionMapping != null && pfActionMapping.isLoginRequired()
                 && loginHandler.getUserPrincipal( getHandlerContext() ) == null )
            {
                NotLoggedInException ex = createNotLoggedInException( actionName, request );
                return handleException( ex, mapping, form, request, response );
            }
           
            //
            // Now delegate to the appropriate action method, or if it's a simple action, handle it that way.
            //
            ActionForward retVal;
            if ( pfActionMapping != null && pfActionMapping.isSimpleAction() )
            {
                retVal = handleSimpleAction( pfActionMapping, form, request, servletContext );
            }
            else
            {
View Full Code Here


        {
            boolean readonly = false;
           
            if ( mapping instanceof PageFlowActionMapping )
            {
                PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
                readonly = pfam.isReadonly();
            }

            if ( ! readonly )
            {
                ensureFailover( getRequest() );
View Full Code Here

     */
    public ActionForm getFormBean( ActionMapping mapping )
    {
        if ( mapping instanceof PageFlowActionMapping )
        {
            PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
            String formMember = pfam.getFormMember();
           
            try
            {
                if ( formMember != null )
                {
View Full Code Here

    private Field getPageFlowScopedFormMember( ActionMapping mapping, HttpServletRequest request )
    {
        if ( mapping instanceof PageFlowActionMapping )
        {
            PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
            String formMember = pfam.getFormMember();

            try
            {
                if ( formMember != null )
                {
View Full Code Here

        {
            ActionConfig actionConfig = actionConfigs[i];

            if ( actionConfig instanceof PageFlowActionMapping )
            {
                PageFlowActionMapping mapping = ( PageFlowActionMapping ) actionConfig;
                String unqualifiedActionPath = ( ( PageFlowActionMapping ) actionConfig ).getUnqualifiedActionPath();

                if ( unqualifiedActionPath != null )
                {
                    List/*< ActionMapping >*/ overloaded = ( List ) _overloadedActions.get( unqualifiedActionPath );
View Full Code Here

   
    private Field getPageFlowScopedFormMember( ActionMapping mapping, HttpServletRequest request )
    {
        if ( mapping instanceof PageFlowActionMapping )
        {
            PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
            String formMember = pfam.getFormMember();
           
            try
            {
                if ( formMember != null )
                {
View Full Code Here

        {
            ActionConfig actionConfig = actionConfigs[i];
           
            if ( actionConfig instanceof PageFlowActionMapping )
            {
                PageFlowActionMapping mapping = ( PageFlowActionMapping ) actionConfig;
                String unqualifiedActionPath = ( ( PageFlowActionMapping ) actionConfig ).getUnqualifiedActionPath();
               
                if ( unqualifiedActionPath != null )
                {
                    List/*< ActionMapping >*/ overloaded = ( List ) _overloadedActions.get( unqualifiedActionPath );
View Full Code Here

        // See if this action uses a form that defines its own message resources.  If so, use those, or combine them
        // with the message resources from the current module.
        //
        if ( mapping instanceof PageFlowActionMapping )
        {
            PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
            String bundle = pfam.getFormBeanMessageResourcesKey();
           
            if ( bundle != null )
            {
                MessageResources formBeanResources = ( MessageResources ) request.getAttribute( bundle );
                ExpressionAwareMessageResources.update( formBeanResources, bean );
View Full Code Here

            // beforeAction callback
            //
            beforeAction();
            gotPastBeforeAction = true;
           
            PageFlowActionMapping pfActionMapping =
                    mapping instanceof PageFlowActionMapping ? ( PageFlowActionMapping ) mapping : null;
            Object unwrappedForm = InternalUtils.unwrapFormBean( form );
           
            //
            // mapping.isOverloaded() means it's the base mapping for a set of overloaded mappings.
            // Find the one appropriate to the passed-in form.
            //
            if ( unwrappedForm != null && pfActionMapping != null )
            {
                if ( pfActionMapping.isOverloaded() )
                {
                    String mappingPath = pfActionMapping.getPath();

                    //
                    // Try the form class and all superclasses to get an overloaded action path.
                    //
                    for ( Class i = unwrappedForm.getClass(); i != null; i = i.getSuperclass() )
                    {
                        String formQualifiedActionPath = getFormQualifiedActionPath( i, mappingPath );
                        ActionConfig cf = pfActionMapping.getModuleConfig().findActionConfig( formQualifiedActionPath );
                           
                        if ( cf != null )
                        {
                            assert cf instanceof PageFlowActionMapping : cf.getClass().getName();
                               
                            if ( _log.isDebugEnabled() )
                            {
                                _log.debug( "Found form-specific mapping " + cf.getPath() +
                                           " -- choosing this one over current mapping " + mappingPath );
                            }
                               
                            pfActionMapping = ( PageFlowActionMapping ) cf;
                            mapping = pfActionMapping;
                            break;
                        }
                    }
                }               
            }
           
            String actionName = InternalUtils.getActionName( mapping );
           
            //
            // Check whether isLoginRequired=true for this action.
            //
            LoginHandler loginHandler = Handlers.get( getServletContext() ).getLoginHandler();
           
            if ( pfActionMapping != null && pfActionMapping.isLoginRequired()
                 && loginHandler.getUserPrincipal( getHandlerContext() ) == null )
            {
                NotLoggedInException ex = createNotLoggedInException( actionName, request );
                return handleException( ex, mapping, form, request, response );
            }
           
            //
            // Now delegate to the appropriate action method, or if it's a simple action, handle it that way.
            //
            ActionForward retVal;
            if ( pfActionMapping != null && pfActionMapping.isSimpleAction() )
            {
                retVal = handleSimpleAction( pfActionMapping, form, request, servletContext );
            }
            else
            {
View Full Code Here

        {
            boolean readonly = false;
           
            if ( mapping instanceof PageFlowActionMapping )
            {
                PageFlowActionMapping pfam = ( PageFlowActionMapping ) mapping;
                readonly = pfam.isReadonly();
            }

            if ( ! readonly )
            {
                ensureFailover( getRequest() );
View Full Code Here

TOP

Related Classes of org.apache.beehive.netui.pageflow.config.PageFlowActionMapping

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.