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.beans.CalendarData;
9 import net.stff.util.SessionObject;
10
11 import org.apache.struts.action.Action;
12 import org.apache.struts.action.ActionForm;
13 import org.apache.struts.action.ActionForward;
14 import org.apache.struts.action.ActionMapping;
15
16 /***
17 * A struts action class that displays a Calendar
18 *
19 * @author Bernd Eickhoff
20 * @created 9. Juni 2003
21 * @company <a href="www.stoffwechsel.net">stoffwechsel</a>
22 */
23 public final class PrevMonthAction extends Action{
24 public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, HttpServletResponse response)
25 throws IOException, ServletException{
26 SessionObject so = SessionObject.get(request);
27 CalendarData data = (CalendarData)so.getObject("icalData", request);
28 data.setUser(request.getRemoteUser());
29
30 data.prevMonth();
31
32 return mapping.findForward("success");
33 }
34 }