Package com.opensymphony.xwork2.config.providers

Examples of com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider


   
    public void removeActionBean(Class<?> objClass, String propertyName)
    {
        if (objClass==null)
            return;
        ActionContext context = ActionContext.getContext();
        String key = getActionBeanName(context, objClass, propertyName);
        if (key!=null)
            context.getSession().remove(key);
    }
View Full Code Here


    public void clearActionErrors()
    {
        actionError = null;
        fieldErrors = null;
        // Remove from Session
        ActionContext context = ActionContext.getContext();
        if (context!=null)
            context.getSession().remove(LAST_ACTION_ERROR_ATTRIBUTE);
    }
View Full Code Here

    /*
     * @see org.apache.empire.struts2.action.ActionErrorProvider#getLastActionError(boolean)
     */
    public ErrorInfo getLastActionError(boolean clear)
    {
        ActionContext context = ActionContext.getContext();
        ErrorInfo error = (ErrorInfo)context.getSession().get(LAST_ACTION_ERROR_ATTRIBUTE);
        if (clear)
            context.getSession().remove(LAST_ACTION_ERROR_ATTRIBUTE);
        return error;
    }
View Full Code Here

        if (error instanceof ActionError)
            actionError = ((ActionError)error);
        else
            actionError = new ActionError(error);
        // put Error on session
        ActionContext context = ActionContext.getContext();
        context.getSession().put(LAST_ACTION_ERROR_ATTRIBUTE, actionError);
    }
View Full Code Here

   
    // ------- Action Bean storage -------

    private ActionProxy getActionProxy(ActionContext context)
    {
        ActionInvocation invocation = context.getActionInvocation();
        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

   
    // ------- Action Bean storage -------

    private ActionProxy getActionProxy(ActionContext context)
    {
        ActionInvocation invocation = context.getActionInvocation();
        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here

        if (invocation==null)
        {
            log.error("Action Invocation cannot be obtained. Calling from action constructor?");
            return null;
        }
        ActionProxy proxy = invocation.getProxy();
        if (proxy==null)
        {
            log.error("ActionProxy cannot be obtained. Calling from action constructor?");
            return null;
        }
View Full Code Here

        return proxy;
    }
   
    protected String getActionBeanName(ActionContext context, Class objClass, String ownerProperty)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        if (ownerProperty==null)
            return proxy.getActionName()+ "." + objClass.getName();
        // Default
        return proxy.getActionName()+ "." + ownerProperty + "." + objClass.getName();
    }
View Full Code Here

   
    // ------- ActionObject accessors -------

    protected String getActionObjectName(ActionContext context, String name)
    {
        ActionProxy proxy = getActionProxy(context);
        if (proxy==null)
            return null;
        return proxy.getActionName() + "." + name;
    }
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider

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.