View Javadoc
1 package com.gotjava.web.taglibs.calendar;
2
3 import com.gotjava.model.calendar.CalendarEvent;
4 import com.gotjava.system.calendar.CalendarManager;
5
6 import javax.servlet.jsp.tagext.TagSupport;
7 import javax.servlet.jsp.JspTagException;
8 import javax.servlet.jsp.JspWriter;
9 import java.io.IOException;
10
11 /***
12 * <p>Description: </p>
13 * <p>Created: Mar 15, 2003</p>
14 * @author farra
15 */
16 public class EventTag extends TagSupport {
17
18 private String m_event = null;
19 private String m_id = null;
20
21
22 public int doEndTag() throws JspTagException
23 {
24
25 long id = Long.parseLong(m_event);
26
27 try
28 {
29 CalendarEvent event = CalendarManager.getInstance().getEventForId(id);
30 pageContext.setAttribute(m_id,event);
31
32 }
33 catch (Exception e)
34 {
35 throw new JspTagException("Event not found");
36 }
37
38 return EVAL_PAGE;
39 }
40
41
42 public void setEventId(String id){
43 m_event = id;
44 }
45
46 public String getEventId(){
47 return m_event;
48 }
49
50 public void setId(String id){
51 m_id = id;
52 }
53
54 public String getId(){
55 return m_id;
56 }
57
58 }
This page was automatically generated by Maven