KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > portlet > result > PortletDispatcherResult


1 /*
2  * Copyright (c) 2005 Opensymphony. All Rights Reserved.
3  */

4 package com.opensymphony.webwork.portlet.result;
5
6 import com.opensymphony.webwork.portlet.WebWorkPortletStatics;
7 import com.opensymphony.webwork.portlet.context.PortletActionContext;
8 import com.opensymphony.xwork.ActionInvocation;
9 import com.opensymphony.xwork.Result;
10
11 import javax.portlet.PortletSession;
12
13
14 /**
15  * @author <a HREF="mailto:hu_pengfei@yahoo.com.cn">Henry Hu </a>
16  * @since 2005-7-18
17  */

18 public class PortletDispatcherResult implements Result, WebWorkPortletStatics {
19     private String JavaDoc _location;
20
21     public void setLocation(String JavaDoc location) {
22         _location = location;
23     }
24
25     public void execute(ActionInvocation invocation) throws Exception JavaDoc {
26         PortletSession portletSession = (PortletSession) PortletActionContext.getPortletSession();
27         portletSession.setAttribute(RENDER_TEMPLATE, _location);
28     }
29 }
Popular Tags