root/trunk/calendar3/webclient/war/docs/header.jsp

Revision 104 (checked in by johnsa, 7 years ago)

changed two actions in struts-config:

setView is now setViewPeriod
selectView is now setSelection
updated jsp and xsl to accomodate the changes
made first pass at getting calendar list into shape in public client

Line 
1 <!DOCTYPE ucalendar
2 [
3   <!ENTITY nbsp "&#160;">
4 ]>
5 <%@ page contentType="text/xml;charset=UTF-8" language="java" %>
6 <%@ taglib uri='struts-bean' prefix='bean' %>
7 <%@ taglib uri='struts-logic' prefix='logic' %>
8 <%@ taglib uri='struts-genurl' prefix='genurl' %>
9 <%
10 try {
11 %>
12
13 <ucalendar>
14   <now><%-- The actual date right "now" - this may not be the same as currentdate --%>
15     <date><bean:write name="calForm" property="today.dateDigits"/></date><%--
16       Value: YYYYMMDD --%>
17     <longdate><bean:write name="calForm" property="today.longDateString"/></longdate><%--
18       Value (example): February 8, 2004 - long representation of the date --%>
19     <shortdate><bean:write name="calForm" property="today.dateString"/></shortdate><%--
20       Value (example): 2/8/04 - short representation of the date --%>
21     <time><bean:write name="calForm" property="today.timeString"/></time><%--
22       Value (example): 10:15 PM --%>
23   </now>
24   <bean:define id="ctView" name="calForm" property="curTimeView"/>
25   <currentdate><%-- The current user-selected date --%>
26     <date><bean:write name="ctView" property="curDay.dateDigits"/></date><%--
27       Value: yyyymmdd - date value --%>
28     <longdate><bean:write name="ctView"
29                           property="curDay.fullDateString"/></longdate><%--
30       Value (example): Wednesday, February 11, 2004 --%>
31     <shortdate><bean:write name="ctView" property="curDay.dateString"/></shortdate><%--
32       Value (example): 2/8/04 - short representation of the date --%>
33     <monthname><bean:write name="ctView" property="curDay.monthName"/></monthname><%--
34       Value (example): January - full month name --%>
35   </currentdate>
36   <firstday><%-- The first date appearing in the currently selected time period --%>
37     <date><bean:write name="ctView" property="firstDay.dateDigits"/></date><%--
38       Value: yyyymmdd - date value --%>
39     <longdate><bean:write name="ctView"
40                           property="firstDay.fullDateString"/></longdate><%--
41       Value (example): Wednesday, February 11, 2004 --%>
42     <shortdate><bean:write name="ctView" property="firstDay.dateString"/></shortdate><%--
43       Value (example): 2/8/04 - short representation of the date --%>
44     <monthname><bean:write name="ctView" property="firstDay.monthName"/></monthname><%--
45       Value (example): January - full month name --%>
46   </firstday>
47   <lastday><%-- The last date appearing in the currently selected time period --%>
48     <date><bean:write name="ctView" property="lastDay.dateDigits"/></date><%--
49       Value: yyyymmdd - date value --%>
50     <longdate><bean:write name="ctView"
51                           property="lastDay.fullDateString"/></longdate><%--
52       Value (example): Wednesday, February 11, 2004 --%>
53     <shortdate><bean:write name="ctView" property="lastDay.dateString"/></shortdate><%--
54       Value (example): 2/8/04 - short representation of the date --%>
55     <monthname><bean:write name="ctView" property="lastDay.monthName"/></monthname><%--
56       Value (example): January - full month name --%>
57   </lastday>
58   <previousdate><bean:write name="ctView" property="prevDate"/></previousdate><%--
59     Value: YYYYMMDD - The previous "firstdate" in the selected time period  --%>
60   <nextdate><bean:write name="ctView" property="nextDate"/></nextdate><%--
61     Value: YYYYMMDD - The next "firstdate" in the selected time period --%>
62   <periodname><bean:write name="ctView" property="periodName"/></periodname><%--
63     Values: Day, Week, Month, Year - The current time period name.   --%>
64   <multiday><bean:write name="ctView" property="multiDay"/></multiday><%--
65     Values: true, false - Flag if we are viewing multiple days --%>
66   <hour24><bean:write name="calForm" property="hour24" /></hour24><%--
67     Values: true, false - Flag if we are using 24 hour time --%>
68
69   <logic:present name="calForm" property="currentView" >
70     <name><bean:write name="calForm" property="currentView.name"/></name><%--
71       Value: string - Name of selected view for display --%>
72     <viewid><bean:write name="calForm" property="currentView.id"/></viewid><%--
73       Value: string - String ID of selected view for display --%>
74   </logic:present>
75   <logic:notPresent name="calForm" property="currentView" >
76     <name>All</name>
77     <viewid>-1</viewid>
78   </logic:notPresent>
79   <search><bean:write name="calForm" property="search"/></search><%--
80     Value: string - Current search string for display --%>
81
82   <publicview><bean:write name="calForm" property="publicView" /></publicview><%--
83     Values: true, false - Flag if we are in the guest (public) view  --%>
84   <guest><bean:write name="calForm" property="guest" /></guest><%--
85     Value: true, false - Flag if we are a guest --%>
86   <logic:equal name="calForm" property="guest" value="false">
87     <userid><bean:write name="calForm" property="currentUser" /></userid><%--
88       Value: string - Userid of non-guest user --%>
89   </logic:equal>
90
91   <logic:iterate id="msg" name="calForm" property="msg.msgList">
92     <message>
93       <id><bean:write name="msg" property="msgId" /></id>
94       <logic:iterate id="param" name="msg" property="params" >
95         <param><bean:write name="param" /></param>
96       </logic:iterate>
97     </message>
98   </logic:iterate>
99
100   <logic:iterate id="errBean" name="calForm" property="err.msgList">
101     <error>
102       <id><bean:write name="errBean" property="msgId" /></id>
103       <logic:iterate id="param" name="errBean" property="params" >
104         <param><bean:write name="param" /></param>
105       </logic:iterate>
106     </error>
107   </logic:iterate>
108
109   <approot><bean:write name="calForm" property="presentationState.appRoot"/></approot><%--
110         Value: URI - the location of web resources used by the code to find the
111         XSLT files.  This element is defined prior to build in
112         ../../../../clones/democal.properties
113         as pubevents.app.root and personal.app.root. Note that references to
114         html web resources such as images are set in the xsl stylesheets. --%>
115   <urlprefix><bean:write name="calForm" property="urlPrefix"/></urlprefix><%--
116         Value: URI - this is prefix of the calendar application.
117         e.g. http://localhost:8080/cal
118         Use this value to prefix calls to the application actions in your XSLT.
119         e.g. <a href="{$urlPrefix}/eventView.do?eventId=8">View Event</a> --%>
120   <urlpattern><genurl:rewrite action="DUMMYACTION.DO" /></urlpattern>
121
122   <personaluri><bean:message key="org.bedework.personal.calendar.uri"/></personaluri>
123   <publicuri><bean:message key="org.bedework.public.calendar.uri"/></publicuri>
124   <adminuri><bean:message key="org.bedework.public.admin.uri"/></adminuri>
125   <bean:define id="personalUri"><bean:message key="org.bedework.personal.calendar.uri"/></bean:define>
126   <urlPrefixes>
127     <%-- render urls --%>
128     <initialise><genurl:rewrite forward="initialise"/></initialise>
129     <eventMore><genurl:rewrite forward="eventMore"/></eventMore>
130     <initUpload><genurl:rewrite forward="initUpload"/></initUpload>
131
132     <%-- action urls --%>
133     <setup><genurl:rewrite action="setup.do"/></setup>
134     <selectViewPeriod><genurl:rewrite action="selectViewPeriod.do"/></selectViewPeriod>
135     <setView><genurl:rewrite action="setView.do"/></setView>
136     <eventView><genurl:rewrite action="eventView.do"/></eventView>
137     <initEvent><genurl:rewrite action="initEvent.do"/></initEvent>
138     <fetchPublicCalendars><genurl:rewrite action="fetchPublicCalendars"/></fetchPublicCalendars>
139     <fetchCalendars><genurl:rewrite action="fetchCalendars"/></fetchCalendars>
140     <addEvent><genurl:rewrite action="addEvent.do"/></addEvent>
141     <addEventUsingPage><genurl:rewrite action="addEventUsingPage.do"/></addEventUsingPage>
142     <editEvent><genurl:rewrite action="editEvent.do"/></editEvent>
143     <delEvent><genurl:rewrite action="delEvent.do"/></delEvent>
144     <mailEvent><genurl:rewrite action="mailEvent.do"/></mailEvent>
145     <showPage><genurl:rewrite action="showPage.do"/></showPage>
146     <manageLocations><genurl:rewrite action="manageLocations.do"/></manageLocations>
147     <addLocation><genurl:rewrite action="addLocation.do"/></addLocation>
148     <editLocation><genurl:rewrite action="editLoc.do"/></editLocation>
149     <delLocation><genurl:rewrite action="delLocation.do"/></delLocation>
150     <subscribe><genurl:rewrite action="subscribe.do"/></subscribe>
151     <export><genurl:rewrite action="export.do"/></export>
152
153     <initEventAlarm><genurl:rewrite action="initEventAlarm.do"/></initEventAlarm>
154     <setAlarm><genurl:rewrite action="setAlarm.do"/></setAlarm>
155     <addEventRef><genurl:rewrite action="addEventRef.do"/></addEventRef>
156     <upload><genurl:rewrite action="upload.do"/></upload>
157   </urlPrefixes><%--
158         actionUrlPrefixes are used to generate appropriately encoded urls for
159         calls into the application; these are required for use within portals --%>
160   <confirmationid><bean:write name="calForm" property="confirmationId"/></confirmationid><%--
161         Value: String - a 16 character random string used to allow users to confirm
162         additions to thier private calendar --%>
163   <logic:iterate id="appvar" name="calForm" property="appVars">
164     <appvar><%--
165         Application variables can be set arbitrarily by the stylesheet designer.
166         Use an "appvar" by adding setappvar=key(value) to the query string of
167         a URL.  This feature is useful for setting up state during a user's session.
168         e.g. <a href="{$urlPrefix}/eventView.do?eventId=8&setappvar=currentTab(event)">View Event</a>
169         To change the value of an appvar, call the same key with a different value.
170         e.g. <a href="{$urlPrefix}/setup.do?setappvar=currentTab(home)">Return Home</a>
171         If appvars exist, they will be output in the following form:  --%>
172       <key><bean:write name="appvar" property="key" /></key>
173       <value><bean:write name="appvar" property="value" /></value>
174
175       <logic:equal name="appvar" property="key" value="summaryMode"><%--
176         This is a special use of the appvar feature.  Normally, we don't return
177         all details about events except when we display a single event (to keep the
178         XML lighter).  To return all event details in an events listing, append a
179         query string with setappvar=summaryMode(details).  Turn the detailed view
180         off with setappvar=summaryMode(summary).--%>
181         <logic:equal name="appvar" property="value" value="details">
182           <bean:define id="detailView" value="true" toScope="request"/><%--
183             Send this bean to the request scope so we can test for it on the page
184             that builds the calendar tree (main.jsp) --%>
185         </logic:equal>
186       </logic:equal>
187     </appvar>
188   </logic:iterate>
189 <%
190 } catch (Throwable t) {
191   t.printStackTrace();
192 }
193 %>
194
Note: See TracBrowser for help on using the browser.