Calendar JSP taglib scrolling features
 Basics     Display     Titles     Fonts     Scrolling     Selection     Day Lists     Advanced Topics     
 
Default scrolling is available for each view and format template. Scrolling is defined with a single tag or forward and backward scrolling may be controlled independently through separate tags.

Scrolling Availability
Scrolling is defined and enabled through attributes of the <cal:click> tag. The automated scrolling functionality is enabled based on the name attribute. As the name attribute implies, scrolling is by year, month, week, weekday, or day. When one of the predefined name attributes is provided, the type attribute defaults to 'scroll' and the action attribute is the value of the name attribute. Do not alter the action attribute for scrolling. Set the type attribute to 'scrollPage' (figure 1) to scroll based on the total number of view items displayed. Default name attribute values available for scrolling include:
    •  scrollYear (Figure 1)
    •  scrollMonth (Figure 2)
    •  scrollWeek (Figure 3)
    •  scrollWeekday (Figure 4)
    •  scrollDay (Figure 5)
    •  yearBackward
    •  monthBackward
    •  weekBackward
    •  weekdayBackward
    •  dayBackward
    •  yearForward
    •  monthForward
    •  weekForward
    •  weekdayForward
    •  dayForward

Scrolling Display
The <cal:click> tag controls both the function of automated scrolling and the scroll indicator displayed. By default the start date for scrolling is assigned to the 'startDate' parameter field. When the startDate parameter field is present it is utilized to display the first calendar view item. Each example (right) utilizes a different startDate parameter field for determining the start date value. The startDate parameter name is altered using the toField attribute (figure 2-5) of the <cal:click> tag. In addition, the startDate attribute of the <cal:display> tag must be assigned the value of the parameter named in the toField. The startDate attribute implicitly supports scrolling when the attribute is unassigned.

The scroll indicator default character may be altered or replaced with a graphic image. Replace the default scroll indicator with a different character using the value attribute of the <cal:click> tag (figure 4). Replace the default scroll indicator with a graphic image using the image attribute of the <cal:click> tag (figure 5).

Scrolling Examples
Figure 1:
<cal:calendar initialDate='5/31/2004'>
     <cal:display rowCount='2'/>
     <cal:click name="scrollMonth" type="scrollPage"/>
     <cal:click name="scrollYear"/>
</cal:calendar>

Figure 2:
<cal:calendar view='month' initialDate='5/31/2004'>
     <cal:click name="scrollMonth" toField="startMonth"/>
</cal:calendar>

Figure 3:
<cal:calendar view='week' initialDate='5/31/2004'>
     <cal:click name="scrollWeek" toField="startWeek"/>
</cal:calendar>

Figure 4:
<cal:calendar view='weekday' initialDate='5/31/2004'>
     <cal:click name="weekdayBackward" toField="startWeekday" value='-'/>
     <cal:click name="weekdayForward" toField="startWeekday" value='+'/>
</cal:calendar>

Figure 5:
<cal:calendar view='day' template='block' initialDate='5/31/2004'>
     <cal:click name="dayForward" toField="startDay" image="images/nextMonth15.gif"/>
     <cal:click name="dayBackward" toField="startDay" image="images/prevMonth15.gif"/>
</cal:calendar>

 
Figure 1:
<<< May, 2004 >>>
Su Mo Tu We Th Fr Sa
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
<<< Jun, 2004 >>>
Su Mo Tu We Th Fr Sa
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
Figure 2:
< May, 2004 >
Su Mo Tu We Th Fr Sa
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
5
Figure 3:
< May, 2004 >
Su Mo Tu We Th Fr Sa
23
30
31
1
2
3
4
5
Figure 4:
-  Mon, 2004  +
1 2 3 4 5
 May 
3
10
17
24
31
Figure 5:
Mo
31
 
· Memorial Day