01: // Copyright %G% Sun Microsystems, Inc. All Rights Reserved.
02: // "%W% %E% Sun Microsystems"
03:
04: package com.sun.portal.wireless.taglibs.cal.socs;
05:
06: import javax.servlet.jsp.*;
07: import javax.servlet.jsp.tagext.*;
08: import com.sun.comclient.calendar.*;
09: import com.sun.comclient.calendar.socs.*;
10:
11: import com.sun.portal.wireless.taglibs.base.BeanTag;
12:
13: /**
14: * ReminderTag - tag that represents an ReminderBean
15: * This is an abstract Bean which can not be created just with an id
16: * it needs either a event or todo (SchedulingComponent)
17: *
18: * @see com.sun.comclient.calendar.Reminder
19: */
20:
21: public class ReminderTag extends BeanTag {
22:
23: /**
24: * the default constructor
25: */
26: public ReminderTag() {
27: super ();
28: }
29:
30: /**
31: * it can not Create a new Reminder bean object
32: * TBD This is an abstract Bean which can not be created just with an id
33: * it needs either a event or todo (SchedulingComponent)
34: * @return null
35: */
36: public Object newBean() throws Exception {
37: return new ReminderBean(new SOCSAlarm());
38: }
39:
40: /**
41: * @return the Reminder this tag represents
42: */
43: public Object findBean() throws Exception {
44: if (name != null) {
45: Object obj = pageContext.getAttribute(getName());
46: if (obj instanceof ReminderBean) {
47: return obj;
48: }
49: }
50: return super.findBean();
51: }
52:
53: }
|