View Javadoc

1   package net.stff.ical.gui.struts.actions;
2   
3   import java.io.IOException;
4   
5   import javax.servlet.ServletException;
6   import javax.servlet.http.HttpServletResponse;
7   
8   import net.stff.ical.View;
9   import net.stff.ical.beans.CalendarData;
10  import net.stff.util.SessionObject;
11  
12  import org.apache.struts.action.Action;
13  import org.apache.struts.action.ActionForm;
14  import org.apache.struts.action.ActionForward;
15  import org.apache.struts.action.ActionMapping;
16  
17  /***
18   *  A struts action class that displays a Calendar
19   *
20   * @author     Bernd Eickhoff
21   * @created    9. Juni 2003
22   * @company    <a href="www.stoffwechsel.net">stoffwechsel</a>
23   */
24  public final class WeekViewAction extends Action{
25  	
26      public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, HttpServletResponse response)
27  		throws IOException, ServletException{
28  
29  		SessionObject so = SessionObject.get(request);
30  		CalendarData data = (CalendarData)so.getObject("icalData", request);
31  		View.weekView(data, request.getRemoteUser());
32  		data.setUser(request.getRemoteUser());
33  
34  		return mapping.findForward("success");
35  	}
36  }