Package com.opensymphony.xwork2.util

Examples of com.opensymphony.xwork2.util.PropertiesReader


   
    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

    /*
     * @see org.apache.empire.struts2.action.ActionErrorProvider#getLastActionMessage(boolean)
     */
    public String getLastActionMessage(boolean clear)
    {
        ActionContext context = ActionContext.getContext();
        Object msg = context.getSession().get(LAST_ACTION_MESSAGE_ATTRIBUTE);
        if (clear)
            context.getSession().remove(LAST_ACTION_MESSAGE_ATTRIBUTE);
        return StringUtils.toString(msg);
    }
View Full Code Here

   
    protected void setActionMessage(String message)
    {   // put Message on session
        if (message.startsWith("!"))
            message = getText(message.substring(1));
        ActionContext context = ActionContext.getContext();
        context.getSession().put(LAST_ACTION_MESSAGE_ATTRIBUTE, message);
    }
View Full Code Here

   
    // ------- Request Param accessors -------
   
    public final Map<String,Object> getRequestParameters()
    {
        ActionContext context = ActionContext.getContext();
        return (context!=null) ? context.getParameters() : null;
    }
View Full Code Here

    public String intercept(ActionInvocation invocation) throws Exception {
       
        log.debug("Entering UIActionPrepareInterceptor");
       
        final Object action = invocation.getAction();
        final ActionContext context = invocation.getInvocationContext();
       
        // is this one of our own UIAction classes?
        if (action instanceof UIActionPreparable) {
           
            log.debug("action is UIActionPreparable, calling myPrepare() method");
View Full Code Here

    public String intercept(ActionInvocation invocation) throws Exception {
       
        log.debug("Entering UIActionInterceptor");
       
        final Object action = invocation.getAction();
        final ActionContext context = invocation.getInvocationContext();
       
        HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST);
       
        // is this one of our own UIAction classes?
        if (action instanceof UIAction) {
           
            log.debug("action is a UIAction, setting relevant attributes");
View Full Code Here

        Configuration config = configurationManager.getConfiguration();
        Container container = config.getContainer();

        ValueStack stack = container.getInstance(ValueStackFactory.class).createValueStack();
        stack.getContext().put(ActionContext.CONTAINER, container);
        ActionContext.setContext(new ActionContext(stack.getContext()));

        ActionContext.getContext().setSession(new HashMap<String, Object>());

        // change the port on the mailSender so it doesn't conflict with an
        // existing SMTP server on localhost
View Full Code Here

TOP

Related Classes of com.opensymphony.xwork2.util.PropertiesReader

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.