Package org.apache.struts.action

Examples of org.apache.struts.action.ActionForm


        if ( fc != null )
        {
            try
            {
                ActionMapping mapping = InternalUtils.getCurrentActionMapping( request );
                ActionForm form = InternalUtils.getCurrentActionForm( request );
                ActionForward fwd = fc.handleException( th, mapping, form, request, response );
                processForwardConfig( request, response, fwd );
                return true;
            }
            catch ( UnhandledException unhandledException )
View Full Code Here


            //
            if ( fwd instanceof PageFlowActionForward )
            {
                ActionMapping mapping = ( ActionMapping ) request.getAttribute( Globals.MAPPING_KEY );
                assert mapping != null;
                ActionForm form = InternalUtils.getFormBean( mapping, request );
                Forward pfFwd = new Forward( ( ActionForward ) fwd, servletContext );
                ActionForwardHandler handler = _handlers.getActionForwardHandler();
                fwd = handler.doForward( context, pfFwd, mapping, InternalUtils.getActionName( mapping ), null, form );
            }
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

        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

        if (config == null) {
            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)?
        try {
            if (instance != null && canReuseActionForm(instance, config)) {
                return (instance);
View Full Code Here

                    + scope
                    + "' under attribute key '"
                    + attribute
                    + "'");
        }
        ActionForm instance = null;
        HttpSession session = null;
        if ("request".equals(scope)) {
            instance = (ActionForm) request.getAttribute(attribute);
        } else {
            session = request.getSession();
View Full Code Here

        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

    }
  }
 
  public boolean isSiteProfileDefault() throws Exception {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    ActionForm form = (ActionForm) request.getAttribute("org.apache.struts.taglib.html.BEAN");
    if (form == null) {
      return true;
    }
    if (form instanceof AdminMaintActionForm) {
      AdminMaintActionForm actionForm = (AdminMaintActionForm) form;
View Full Code Here

    return true;
  }
 
  public boolean isSiteCurrencyDefault() throws Exception {
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    ActionForm form = (ActionForm) request.getAttribute("org.apache.struts.taglib.html.BEAN");
    if (form == null) {
      return true;
    }
    if (form instanceof AdminMaintActionForm) {
      AdminMaintActionForm actionForm = (AdminMaintActionForm) form;
View Full Code Here

                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

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.