Package com.opensymphony.webwork.views.velocity

Examples of com.opensymphony.webwork.views.velocity.WebWorkVelocityContext


     * </ul>
     *
     * @return a new WebWorkVelocityContext
     */
    public Context createContext(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) {
        WebWorkVelocityContext context = new WebWorkVelocityContext(chainedContexts, stack);
       
        context.put(REQUEST, request);
        context.put(RESPONSE, response);
        context.put(STACK, stack);
        context.put(OGNL, ognlTool);
        context.put(WEBWORK, new VelocityWebWorkUtil(context, stack, (HttpServletRequest) request, (HttpServletResponse) response));

        /*
         * Add actiontURl/actionXURL in the OGNL context for VM result to retrieve.
         */
        String actionURL = com.opensymphony.webwork.portlet.context.PortletContext.getContext().getActionURL();
        String actionXURL = actionURL+"?wwXAction=";
        context.put(ACTION_URL, actionURL);
        context.put(ACTION_XURL, actionXURL);
       
        ActionInvocation invocation = (ActionInvocation) stack.getContext().get(ActionContext.ACTION_INVOCATION);
       
        if (invocation != null) {
            context.put(ACTION, invocation.getAction());
        }

        return context;
    }
View Full Code Here

TOP

Related Classes of com.opensymphony.webwork.views.velocity.WebWorkVelocityContext

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.