Commit 9f6252cae256469020f0878275fc2f6a85ee055c

Authored by bernard
1 parent 50056f39

Added onviewdisplay javascript callback.

1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
  1 +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE components PUBLIC "-//AJAX4JSF//CDK Generator config/EN"
3 2 "http://labs.jboss.com/jbossrichfaces/component-config.dtd"
4   - [
5   - <!ENTITY commonViewAttributes SYSTEM "commonViewAttributes.ent">
6   - <!ENTITY listeners SYSTEM "listeners.ent">
7   - ]
  3 + [<!ENTITY commonViewAttributes SYSTEM "commonViewAttributes.ent"><!ENTITY listeners SYSTEM "listeners.ent">]
8 4 >
9 5 <components>
10 6 <component>
... ... @@ -13,8 +9,7 @@
13 9 <classname>org.richfaces.component.html.HtmlSchedule</classname>
14 10 <superclass>org.richfaces.component.UISchedule</superclass>
15 11 <description>
16   - <![CDATA[
17   - ]]>
  12 + <![CDATA[]]>
18 13 </description>
19 14 <renderer generate="true" override="true">
20 15 <name>org.richfaces.renderkit.ScheduleRenderer</name>
... ... @@ -33,10 +28,7 @@
33 28 <superclass>org.richfaces.taglib.ScheduleTagHandlerBase</superclass>
34 29 </taghandler>
35 30 <!--
36   - -->
37   - &ui_component_attributes;
38   - &commonViewAttributes;
39   - &ajax_component_attributes;
  31 + --> &ui_component_attributes; &commonViewAttributes; &ajax_component_attributes;
40 32 <property>
41 33 <name>switchType</name>
42 34 <classname>java.lang.String</classname>
... ... @@ -54,8 +46,7 @@
54 46 <name>widgetVar</name>
55 47 <classname>java.lang.String</classname>
56 48 <description>
57   - Variable name of JavaScript component.
58   - default: null
  49 + Variable name of JavaScript component. default: null
59 50 </description>
60 51 <defaultvalue>null</defaultvalue>
61 52 </property>
... ... @@ -63,9 +54,7 @@
63 54 <name>view</name>
64 55 <classname>java.lang.String</classname>
65 56 <description>
66   - Schedule has a number of different "views",
67   - or ways of displaying days and events.
68   - The following 5 views are all built in to schedule:
  57 + Schedule has a number of different "views", or ways of displaying days and events. The following 5 views are all built in to schedule:
69 58 <ul>
70 59 <li>month</li>
71 60 <li>basicWeek</li>
... ... @@ -81,10 +70,8 @@
81 70 <name>headerLeft</name>
82 71 <classname>java.lang.String</classname>
83 72 <description>
84   - Defines the buttons and title at the top of the calendar.
85   - Values separated by a comma will be displayed adjacently.
86   - Values separated by a space will be displayed with a small gap in between.
87   - Strings can contain any of the following values:
  73 + Defines the buttons and title at the top of the calendar. Values separated by a comma will be displayed adjacently. Values separated by a space
  74 + will be displayed with a small gap in between. Strings can contain any of the following values:
88 75 <ul>
89 76 <li>
90 77 <b>title</b>
... ... @@ -123,10 +110,8 @@
123 110 <name>headerCenter</name>
124 111 <classname>java.lang.String</classname>
125 112 <description>
126   - Defines the buttons and title at the top of the calendar.
127   - Values separated by a comma will be displayed adjacently.
128   - Values separated by a space will be displayed with a small gap in between.
129   - Strings can contain any of the following values:
  113 + Defines the buttons and title at the top of the calendar. Values separated by a comma will be displayed adjacently. Values separated by a space
  114 + will be displayed with a small gap in between. Strings can contain any of the following values:
130 115 <ul>
131 116 <li>
132 117 <b>title</b>
... ... @@ -165,10 +150,8 @@
165 150 <name>headerRight</name>
166 151 <classname>java.lang.String</classname>
167 152 <description>
168   - Defines the buttons and title at the top of the calendar.
169   - Values separated by a comma will be displayed adjacently.
170   - Values separated by a space will be displayed with a small gap in between.
171   - Strings can contain any of the following values:
  153 + Defines the buttons and title at the top of the calendar. Values separated by a comma will be displayed adjacently. Values separated by a space
  154 + will be displayed with a small gap in between. Strings can contain any of the following values:
172 155 <ul>
173 156 <li>
174 157 <b>title</b>
... ... @@ -207,9 +190,8 @@
207 190 <name>allDaySlot</name>
208 191 <classname>java.lang.Boolean</classname>
209 192 <description>
210   - Determines if the "all-day" slot is displayed at the top of the calendar.
211   - When hidden with false, all-day events will not be displayed in agenda views.
212   - default: true
  193 + Determines if the "all-day" slot is displayed at the top of the calendar. When hidden with false, all-day events will not be displayed in agenda
  194 + views. default: true
213 195 </description>
214 196 <defaultvalue>null</defaultvalue>
215 197 </property>
... ... @@ -217,8 +199,7 @@
217 199 <name>allDayText</name>
218 200 <classname>java.lang.String</classname>
219 201 <description>
220   - The text titling the "all-day" slot at the top of the calendar.
221   - default: 'all-day'
  202 + The text titling the "all-day" slot at the top of the calendar. default: 'all-day'
222 203 </description>
223 204 <defaultvalue>null</defaultvalue>
224 205 </property>
... ... @@ -226,9 +207,8 @@
226 207 <name>axisFormat</name>
227 208 <classname>java.lang.String</classname>
228 209 <description>
229   - Determines the time-text that will be displayed on the vertical axis of the agenda views.
230   - The default value will produce times that look like "5pm" and "5:30pm".
231   - default: 'h(:mm)tt'
  210 + Determines the time-text that will be displayed on the vertical axis of the agenda views. The default value will produce times that look like
  211 + "5pm" and "5:30pm". default: 'h(:mm)tt'
232 212 </description>
233 213 <defaultvalue>null</defaultvalue>
234 214 </property>
... ... @@ -236,9 +216,7 @@
236 216 <name>slotMinutes</name>
237 217 <classname>java.lang.Integer</classname>
238 218 <description>
239   - The frequency for displaying time slots, in minutes.
240   - The default will make a slot every half hour.
241   - default: 30
  219 + The frequency for displaying time slots, in minutes. The default will make a slot every half hour. default: 30
242 220 </description>
243 221 <defaultvalue>null</defaultvalue>
244 222 </property>
... ... @@ -246,10 +224,8 @@
246 224 <name>defaultEventMinutes</name>
247 225 <classname>java.lang.Integer</classname>
248 226 <description>
249   - Determines the length (in minutes) an event appears to be when it has an unspecified end date.
250   - By default, if an Event Object has no end, it will appear to be 2 hours.
251   - This option only affects events that appear in the agenda slots, meaning they have allDay set to true.
252   - default: 120
  227 + Determines the length (in minutes) an event appears to be when it has an unspecified end date. By default, if an Event Object has no end, it
  228 + will appear to be 2 hours. This option only affects events that appear in the agenda slots, meaning they have allDay set to true. default: 120
253 229 </description>
254 230 <defaultvalue>null</defaultvalue>
255 231 </property>
... ... @@ -257,11 +233,8 @@
257 233 <name>firstHour</name>
258 234 <classname>java.lang.Integer</classname>
259 235 <description>
260   - Determines the first hour that will be visible in the scroll pane.
261   - Values must be from 0-23, where 0=midnight, 1=1am, etc.
262   - The user will be able to scroll upwards to see events before this time.
263   - If you want to prevent users from doing this, use the minTime option instead.
264   - default: 6
  236 + Determines the first hour that will be visible in the scroll pane. Values must be from 0-23, where 0=midnight, 1=1am, etc. The user will be able
  237 + to scroll upwards to see events before this time. If you want to prevent users from doing this, use the minTime option instead. default: 6
265 238 </description>
266 239 <defaultvalue>null</defaultvalue>
267 240 </property>
... ... @@ -269,11 +242,8 @@
269 242 <name>minTime</name>
270 243 <classname>java.lang.String</classname>
271 244 <description>
272   - Determines the first hour/time that will be displayed, even when the scrollbars have been scrolled all
273   - the way up.
274   - This can be a number like 5 (which means 5am), a string like '5:30' (which means 5:30am) or a string
275   - like '5:30am'.
276   - default: 0
  245 + Determines the first hour/time that will be displayed, even when the scrollbars have been scrolled all the way up. This can be a number like 5
  246 + (which means 5am), a string like '5:30' (which means 5:30am) or a string like '5:30am'. default: 0
277 247 </description>
278 248 <defaultvalue>null</defaultvalue>
279 249 </property>
... ... @@ -281,11 +251,8 @@
281 251 <name>maxTime</name>
282 252 <classname>java.lang.String</classname>
283 253 <description>
284   - Determines the last hour/time (exclusively) that will be displayed, even when the scrollbars have been
285   - scrolled all the way down.
286   - This can be a number like 22 (which means 10pm), a string like '22:30' (which means 10:30pm) or a string
287   - like '10:30pm'.
288   - default: 24
  254 + Determines the last hour/time (exclusively) that will be displayed, even when the scrollbars have been scrolled all the way down. This can be a
  255 + number like 22 (which means 10pm), a string like '22:30' (which means 10:30pm) or a string like '10:30pm'. default: 24
289 256 </description>
290 257 <defaultvalue>null</defaultvalue>
291 258 </property>
... ... @@ -293,10 +260,7 @@
293 260 <name>firstDay</name>
294 261 <classname>java.lang.Integer</classname>
295 262 <description>
296   - The day that each week begins.
297   - The value must be a number that represents the day of the week.
298   - Sunday=0, Monday=1, Tuesday=2, etc.
299   - default: 0
  263 + The day that each week begins. The value must be a number that represents the day of the week. Sunday=0, Monday=1, Tuesday=2, etc. default: 0
300 264 </description>
301 265 <defaultvalue>null</defaultvalue>
302 266 </property>
... ... @@ -304,8 +268,7 @@
304 268 <name>isRTL</name>
305 269 <classname>java.lang.Boolean</classname>
306 270 <description>
307   - Displays the calendar in right-to-left mode.
308   - default: false
  271 + Displays the calendar in right-to-left mode. default: false
309 272 </description>
310 273 <defaultvalue>null</defaultvalue>
311 274 </property>
... ... @@ -313,8 +276,7 @@
313 276 <name>showWeekends</name>
314 277 <classname>java.lang.Boolean</classname>
315 278 <description>
316   - Whether to include Saturday/Sunday columns in any of the calendar views.
317   - default: true
  279 + Whether to include Saturday/Sunday columns in any of the calendar views. default: true
318 280 </description>
319 281 <defaultvalue>null</defaultvalue>
320 282 </property>
... ... @@ -322,8 +284,8 @@
322 284 <name>height</name>
323 285 <classname>java.lang.Integer</classname>
324 286 <description>
325   - Will make the entire calendar (including header) a pixel height.
326   - By default, this option is unset and the calendar's height is calculated by aspectRatio.
  287 + Will make the entire calendar (including header) a pixel height. By default, this option is unset and the calendar's height is calculated by
  288 + aspectRatio.
327 289 </description>
328 290 <defaultvalue>null</defaultvalue>
329 291 </property>
... ... @@ -331,8 +293,7 @@
331 293 <name>contentHeight</name>
332 294 <classname>java.lang.Integer</classname>
333 295 <description>
334   - Will make the calendar's content area a pixel height.
335   - By default, this option is unset and the calendar's height is calculated by aspectRatio.
  296 + Will make the calendar's content area a pixel height. By default, this option is unset and the calendar's height is calculated by aspectRatio.
336 297 </description>
337 298 <defaultvalue>null</defaultvalue>
338 299 </property>
... ... @@ -340,10 +301,8 @@
340 301 <name>aspectRatio</name>
341 302 <classname>java.lang.Double</classname>
342 303 <description>
343   - Determines the width-to-height aspect ratio of the calendar.
344   - A calendar is a block-level element that fills its entire avaiable width. The calendar’s height,
345   - however, is determined by this ratio of width-to-height. (Hint: larger numbers make smaller heights).
346   - default: 1.35
  304 + Determines the width-to-height aspect ratio of the calendar. A calendar is a block-level element that fills its entire avaiable width. The
  305 + calendar’s height, however, is determined by this ratio of width-to-height. (Hint: larger numbers make smaller heights). default: 1.35
347 306 </description>
348 307 <defaultvalue>null</defaultvalue>
349 308 </property>
... ... @@ -351,8 +310,7 @@
351 310 <name>allDayByDefault</name>
352 311 <classname>java.lang.Boolean</classname>
353 312 <description>
354   - Determines the default value for each Event Object's allDay property, when it is unspecified.
355   - default: true
  313 + Determines the default value for each Event Object's allDay property, when it is unspecified. default: true
356 314 </description>
357 315 <defaultvalue>null</defaultvalue>
358 316 </property>
... ... @@ -361,12 +319,9 @@
361 319 <name>editable</name>
362 320 <classname>java.lang.Boolean</classname>
363 321 <description>
364   - Determines whether the events on the calendar can be modified.
365   - This determines if the events can be dragged and resized.
366   - Enables/disables both at the same time.
367   - If you don't want both, use editable in conjunction with disableDragging and disableResizing.
368   - This option can be overridden on a per-event basis with the Event Object editable property.
369   - default: false
  322 + Determines whether the events on the calendar can be modified. This determines if the events can be dragged and resized. Enables/disables both
  323 + at the same time. If you don't want both, use editable in conjunction with disableDragging and disableResizing. This option can be overridden on
  324 + a per-event basis with the Event Object editable property. default: false
370 325 </description>
371 326 <defaultvalue>null</defaultvalue>
372 327 </property>
... ... @@ -374,9 +329,8 @@
374 329 <name>selectable</name>
375 330 <classname>java.lang.Boolean</classname>
376 331 <description>
377   - Allows a user to highlight multiple days or timeslots by clicking and dragging.
378   - To let the user make selections by clicking and dragging, this option must be set to true.
379   - default: false
  332 + Allows a user to highlight multiple days or timeslots by clicking and dragging. To let the user make selections by clicking and dragging, this
  333 + option must be set to true. default: false
380 334 </description>
381 335 <defaultvalue>null</defaultvalue>
382 336 </property>
... ... @@ -384,12 +338,9 @@
384 338 <name>selectHelper</name>
385 339 <classname>java.lang.Boolean</classname>
386 340 <description>
387   - Whether to draw a "placeholder" event while the user is dragging.
388   - A value of true will draw a "placeholder" event while the user
389   - is dragging (similar to what Google Calendar does for its week
390   - and day views). A value of false (the default) will draw
391   - the standard highlighting over each cell.
392   - default: false
  341 + Whether to draw a "placeholder" event while the user is dragging. A value of true will draw a "placeholder" event while the user is dragging
  342 + (similar to what Google Calendar does for its week and day views). A value of false (the default) will draw the standard highlighting over each
  343 + cell. default: false
393 344 </description>
394 345 <defaultvalue>null</defaultvalue>
395 346 </property>
... ... @@ -397,10 +348,8 @@
397 348 <name>unselectAuto</name>
398 349 <classname>java.lang.Boolean</classname>
399 350 <description>
400   - Whether clicking elsewhere on the page will cause the current
401   - selection to be cleared.
402   - This option can only take effect when selectable is set to true.
403   - default: true
  351 + Whether clicking elsewhere on the page will cause the current selection to be cleared. This option can only take effect when selectable is set
  352 + to true. default: true
404 353 </description>
405 354 <defaultvalue>null</defaultvalue>
406 355 </property>
... ... @@ -408,15 +357,10 @@
408 357 <name>unselectCancel</name>
409 358 <classname>java.lang.String</classname>
410 359 <description>
411   - A way to specify elements that will ignore the unselectAuto option.
412   - Clicking on elements that match this jQuery selector will prevent
413   - the current selection from being cleared (due to the unselectAuto option).
414   - This option is useful if you have a "Create an event" form that
415   - shows up in response to the user making a selection. When the user
416   - clicks on this form, you probably don't want to the current selection
417   - to go away. Thus, you should add a class to your form such as "my-form",
418   - and set the unselectAuto option to ".my-form".
419   - default: ''
  360 + A way to specify elements that will ignore the unselectAuto option. Clicking on elements that match this jQuery selector will prevent the
  361 + current selection from being cleared (due to the unselectAuto option). This option is useful if you have a "Create an event" form that shows up
  362 + in response to the user making a selection. When the user clicks on this form, you probably don't want to the current selection to go away.
  363 + Thus, you should add a class to your form such as "my-form", and set the unselectAuto option to ".my-form". default: ''
420 364 </description>
421 365 <defaultvalue>null</defaultvalue>
422 366 </property>
... ... @@ -424,8 +368,7 @@
424 368 <name>disableDragging</name>
425 369 <classname>java.lang.Boolean</classname>
426 370 <description>
427   - Disables all event dragging, even when events are editable.
428   - default: false
  371 + Disables all event dragging, even when events are editable. default: false
429 372 </description>
430 373 <defaultvalue>null</defaultvalue>
431 374 </property>
... ... @@ -433,8 +376,7 @@
433 376 <name>disableResizing</name>
434 377 <classname>java.lang.Boolean</classname>
435 378 <description>
436   - Disables all event resizing, even when events are editable.
437   - default: false
  379 + Disables all event resizing, even when events are editable. default: false
438 380 </description>
439 381 <defaultvalue>null</defaultvalue>
440 382 </property>
... ... @@ -442,8 +384,7 @@
442 384 <name>dragRevertDuration</name>
443 385 <classname>java.lang.Integer</classname>
444 386 <description>
445   - Time in millisecond it takes for an event to revert to its original position after an unsuccessful drag.
446   - default: 500
  387 + Time in millisecond it takes for an event to revert to its original position after an unsuccessful drag. default: 500
447 388 </description>
448 389 <defaultvalue>null</defaultvalue>
449 390 </property>
... ... @@ -452,8 +393,7 @@
452 393 <name>date</name>
453 394 <classname>java.util.Date</classname>
454 395 <description>
455   - The initial date when schedule loads.
456   - default:
  396 + The initial date when schedule loads. default:
457 397 <i>current date</i>
458 398 </description>
459 399 <defaultvalue>null</defaultvalue>
... ... @@ -463,8 +403,7 @@
463 403 <name>onbeforeitemselect</name>
464 404 <classname>java.lang.String</classname>
465 405 <description>
466   - JavaScript code for handling event.
467   - Following data will be available in context:
  406 + JavaScript code for handling event. Following data will be available in context:
468 407 <ul>
469 408 <li>item - selected item</li>
470 409 <li>event - javascript event</li>
... ... @@ -477,9 +416,7 @@
477 416 <name>onitemselect</name>
478 417 <classname>java.lang.String</classname>
479 418 <description>
480   - JavaScript code called when ajax request triggered when item
481   - is selected has finished.
482   - Following data will be available in context:
  419 + JavaScript code called when ajax request triggered when item is selected has finished. Following data will be available in context:
483 420 <ul>
484 421 <li>item - selected item</li>
485 422 <li>event - javascript event</li>
... ... @@ -494,8 +431,7 @@
494 431 <name>onitemdragstart</name>
495 432 <classname>java.lang.String</classname>
496 433 <description>
497   - JavaScript code for handling event.
498   - Following data will be available in context:
  434 + JavaScript code for handling event. Following data will be available in context:
499 435 <ul>
500 436 <li>item - selected item</li>
501 437 <li>event - javascript event</li>
... ... @@ -509,8 +445,7 @@
509 445 <name>onitemdragstop</name>
510 446 <classname>java.lang.String</classname>
511 447 <description>
512   - JavaScript code for handling event.
513   - Following data will be available in context:
  448 + JavaScript code for handling event. Following data will be available in context:
514 449 <ul>
515 450 <li>item - selected item</li>
516 451 <li>event - javascript event</li>
... ... @@ -524,8 +459,7 @@
524 459 <name>onitemresizestart</name>
525 460 <classname>java.lang.String</classname>
526 461 <description>
527   - JavaScript code for handling event.
528   - Following data will be available in context:
  462 + JavaScript code for handling event. Following data will be available in context:
529 463 <ul>
530 464 <li>item - selected item</li>
531 465 <li>event - javascript event</li>
... ... @@ -539,8 +473,7 @@
539 473 <name>onitemresizestop</name>
540 474 <classname>java.lang.String</classname>
541 475 <description>
542   - JavaScript code for handling event.
543   - Following data will be available in context:
  476 + JavaScript code for handling event. Following data will be available in context:
544 477 <ul>
545 478 <li>item - selected item</li>
546 479 <li>event - javascript event</li>
... ... @@ -554,19 +487,16 @@
554 487 <name>onbeforeitemdrop</name>
555 488 <classname>java.lang.String</classname>
556 489 <description>
557   - JavaScript code for handling event.
558   - Following data will be available in context:
  490 + JavaScript code for handling event. Following data will be available in context:
559 491 <ul>
560 492 <li>item - selected item</li>
561   - <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards
562   - (a negative number)
  493 + <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards (a negative number)
563 494 </li>
564   - <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or
565   - backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed in.
  495 + <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful
  496 + for the agenda views. In other views, 0 is passed in.
566 497 </li>
567   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
568   - the agenda views. It will be false if dropped on a slot in the agenda views (meaning it has been
569   - assigned a time).
  498 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views. It will be false if
  499 + dropped on a slot in the agenda views (meaning it has been assigned a time).
570 500 </li>
571 501 <li>event - javascript event</li>
572 502 <li>ui - jQuery UI object</li>
... ... @@ -579,20 +509,16 @@
579 509 <name>onitemdrop</name>
580 510 <classname>java.lang.String</classname>
581 511 <description>
582   - JavaScript code called when ajax request triggered when item
583   - is dropped has finished.
584   - Following data will be available in context:
  512 + JavaScript code called when ajax request triggered when item is dropped has finished. Following data will be available in context:
585 513 <ul>
586 514 <li>item - selected item</li>
587   - <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards
588   - (a negative number)
  515 + <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards (a negative number)
589 516 </li>
590   - <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or
591   - backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed in.
  517 + <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful
  518 + for the agenda views. In other views, 0 is passed in.
592 519 </li>
593   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
594   - the agenda views. It will be false if dropped on a slot in the agenda views (meaning it has been
595   - assigned a time).
  520 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views. It will be false if
  521 + dropped on a slot in the agenda views (meaning it has been assigned a time).
596 522 </li>
597 523 <li>vetoed - is true if server side listener has raised veto and modification has been reverted</li>
598 524 <li>event - javascript event</li>
... ... @@ -608,17 +534,15 @@
608 534 <name>onbeforeitemresize</name>
609 535 <classname>java.lang.String</classname>
610 536 <description>
611   - JavaScript code for handling event.
612   - Following data will be available in context:
  537 + JavaScript code for handling event. Following data will be available in context:
613 538 <ul>
614 539 <li>item - selected item</li>
615   - <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards
616   - (a negative number)holds the number of minutes the event was moved forward (a positive number)
617   - or backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed
618   - in.
  540 + <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards (a negative number)holds the number of
  541 + minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful for the agenda views. In other
  542 + views, 0 is passed in.
619 543 </li>
620   - <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or
621   - backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed in.
  544 + <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful
  545 + for the agenda views. In other views, 0 is passed in.
622 546 </li>
623 547 <li>event - javascript event</li>
624 548 <li>ui - jQuery UI object</li>
... ... @@ -631,16 +555,13 @@
631 555 <name>onitemresize</name>
632 556 <classname>java.lang.String</classname>
633 557 <description>
634   - JavaScript code called when ajax request triggered when item
635   - is resized has finished.
636   - Following data will be available in context:
  558 + JavaScript code called when ajax request triggered when item is resized has finished. Following data will be available in context:
637 559 <ul>
638 560 <li>item - selected item</li>
639   - <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards
640   - (a negative number)
  561 + <li>dayDelta - holds the number of days the event was moved forward (a positive number) or backwards (a negative number)
641 562 </li>
642   - <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or
643   - backwards (a negative number). Only useful for the agenda views. In other views, 0 is passed in.
  563 + <li>minuteDelta - holds the number of minutes the event was moved forward (a positive number) or backwards (a negative number). Only useful
  564 + for the agenda views. In other views, 0 is passed in.
644 565 </li>
645 566 <li>vetoed - is true if server side listener has raised veto and modification has been reverted</li>
646 567 <li>event - javascript event</li>
... ... @@ -656,8 +577,7 @@
656 577 <name>onitemmouseover</name>
657 578 <classname>java.lang.String</classname>
658 579 <description>
659   - JavaScript code for handling event.
660   - Following data will be available in context:
  580 + JavaScript code for handling event. Following data will be available in context:
661 581 <ul>
662 582 <li>item - selected item</li>
663 583 <li>event - javascript event</li>
... ... @@ -670,8 +590,7 @@
670 590 <name>onitemmouseout</name>
671 591 <classname>java.lang.String</classname>
672 592 <description>
673   - JavaScript code for handling event.
674   - Following data will be available in context:
  593 + JavaScript code for handling event. Following data will be available in context:
675 594 <ul>
676 595 <li>item - selected item</li>
677 596 <li>event - javascript event</li>
... ... @@ -686,8 +605,7 @@
686 605 <description>
687 606 JavaScript code for handling event.
688 607 <b>Any return instruction will be ignored</b>
689   - so this code cannot block anything.
690   - Following data will be available in context:
  608 + so this code cannot block anything. Following data will be available in context:
691 609 <ul>
692 610 <li>view - object representing current view</li>
693 611 </ul>
... ... @@ -698,9 +616,7 @@
698 616 <name>onviewchange</name>
699 617 <classname>java.lang.String</classname>
700 618 <description>
701   - JavaScript code called when ajax request triggered when view
702   - changes has finished.
703   - Following data will be available in context:
  619 + JavaScript code called when ajax request triggered when view changes has finished. Following data will be available in context:
704 620 <ul>
705 621 <li>view - object representing current view</li>
706 622 <li>request - ajax request</li>
... ... @@ -713,12 +629,10 @@
713 629 <name>onbeforedateselect</name>
714 630 <classname>java.lang.String</classname>
715 631 <description>
716   - JavaScript code for handling event.
717   - Following data will be available in context:
  632 + JavaScript code for handling event. Following data will be available in context:
718 633 <ul>
719 634 <li>date - selected date</li>
720   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
721   - the agenda views.
  635 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views.
722 636 </li>
723 637 <li>event - javascript event</li>
724 638 <li>view - object representing current view</li>
... ... @@ -730,13 +644,10 @@
730 644 <name>ondateselect</name>
731 645 <classname>java.lang.String</classname>
732 646 <description>
733   - JavaScript code called when ajax request triggered when date
734   - is selected has finished.
735   - Following data will be available in context:
  647 + JavaScript code called when ajax request triggered when date is selected has finished. Following data will be available in context:
736 648 <ul>
737 649 <li>date - selected date</li>
738   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
739   - the agenda views.
  650 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views.
740 651 </li>
741 652 <li>event - javascript event</li>
742 653 <li>view - object representing current view</li>
... ... @@ -750,13 +661,11 @@
750 661 <name>onbeforedaterangeselect</name>
751 662 <classname>java.lang.String</classname>
752 663 <description>
753   - JavaScript code for handling event.
754   - Following data will be available in context:
  664 + JavaScript code for handling event. Following data will be available in context:
755 665 <ul>
756 666 <li>startDate - selection start date</li>
757 667 <li>endDate - selection end date</li>
758   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
759   - the agenda views.
  668 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views.
760 669 </li>
761 670 <li>view - object representing current view</li>
762 671 </ul>
... ... @@ -767,14 +676,11 @@
767 676 <name>ondaterangeselect</name>
768 677 <classname>java.lang.String</classname>
769 678 <description>
770   - JavaScript code called when ajax request triggered when date
771   - range is selected has finished.
772   - Following data will be available in context:
  679 + JavaScript code called when ajax request triggered when date range is selected has finished. Following data will be available in context:
773 680 <ul>
774 681 <li>startDate - selection start date</li>
775 682 <li>endDate - selection end date</li>
776   - <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in
777   - the agenda views.
  683 + <li>allDay - is true if the event has been dropped on a day in month view, or the "all-day" slot in the agenda views.
778 684 </li>
779 685 <li>view - object representing current view</li>
780 686 <li>request - ajax request</li>
... ... @@ -790,8 +696,7 @@
790 696 <description>
791 697 JavaScript code for handling event.
792 698 <b>Any return instruction will be ignored</b>
793   - so this code cannot block anything.
794   - Following data will be available in context:
  699 + so this code cannot block anything. Following data will be available in context:
795 700 <ul>
796 701 <li>startDate - start date</li>
797 702 <li>endDate - end date</li>
... ... @@ -803,9 +708,8 @@
803 708 <name>ondaterangechange</name>
804 709 <classname>java.lang.String</classname>
805 710 <description>
806   - JavaScript code called when ajax request triggered when displayed
807   - date range is changed has finished.
808   - Following data will be available in context:
  711 + JavaScript code called when ajax request triggered when displayed date range is changed has finished. Following data will be available in
  712 + context:
809 713 <ul>
810 714 <li>startDate - selection start date</li>
811 715 <li>endDate - selection end date</li>
... ... @@ -816,12 +720,22 @@
816 720 <defaultvalue>null</defaultvalue>
817 721 </property>
818 722 <property>
819   - <name>styleClass</name>
  723 + <name>onviewdisplay</name>
820 724 <classname>java.lang.String</classname>
821 725 <description>
  726 + JavaScript code called when the schedule loads and every time a different date-range is displayed. Following data will be available in context:
  727 + <ul>
  728 + <li>view - object representing current view</li>
  729 + </ul>
822 730 </description>
823 731 <defaultvalue>null</defaultvalue>
824 732 </property>
  733 + <property>
  734 + <name>styleClass</name>
  735 + <classname>java.lang.String</classname>
  736 + <description></description>
  737 + <defaultvalue>null</defaultvalue>
  738 + </property>
825 739
826 740 <property elonly="true" attachedstate="true">
827 741 <name>itemMoveListener</name>
... ... @@ -860,6 +774,5 @@
860 774 </property>
861 775
862 776
863   - </component>
864   - &listeners;
  777 + </component> &listeners;
865 778 </components>
... ...
... ... @@ -41,51 +41,88 @@ import java.util.Map;
41 41 public abstract class UISchedule extends UIComponentBase implements ScheduleCommonViewAttributes, ScheduleListenerEventsProducer, AjaxComponent {
42 42
43 43 public static final String COMPONENT_TYPE = "org.richfaces.Schedule";
  44 +
44 45 public static final String COMPONENT_FAMILY = "org.richfaces.Schedule";
  46 +
45 47 /**
46 48 * Values of view attribute.
47 49 */
48 50 public static final String VIEW_MONTH = "month";
  51 +
49 52 public static final String VIEW_BASIC_WEEK = "basicWeek";
  53 +
50 54 public static final String VIEW_AGENDA_WEEK = "agendaWeek";
  55 +
51 56 public static final String VIEW_BASIC_DAY = "basicDay";
  57 +
52 58 public static final String VIEW_AGENDA_DAY = "agendaDay";
  59 +
53 60 public static final String DEFAULT_VIEW = VIEW_MONTH;
  61 +
54 62 /**
55 63 * Values of switchType attribute
56 64 */
57 65 public static final String SWITCH_TYPE_AJAX = "ajax";
  66 +
58 67 public static final String SWITCH_TYPE_SERVER = "server";
  68 +
59 69 public static final String SWITCH_TYPE_CLIENT = "client";
  70 +
60 71 public static final String DEFAULT_SWITCH_TYPE = SWITCH_TYPE_AJAX;
  72 +
61 73 /**
62 74 * Values of weekMode attribute.
63 75 */
64 76 public static final String WEEK_MODE_FIXED = "fixed";
  77 +
65 78 public static final String WEEK_MODE_LIQUID = "liquid";
  79 +
66 80 public static final String WEEK_MODE_VARIABLE = "variable";
  81 +
67 82 public static final String DEFAULT_WEEK_MODE = WEEK_MODE_FIXED;
  83 +
68 84 public static final boolean DEFAULT_SHOW_WEEKENDS = true;
  85 +
69 86 public static final boolean DEFAULT_RTL = false;
  87 +
70 88 public static final int DEFAULT_FIRST_DAY = Calendar.SUNDAY;
  89 +
71 90 public static final double DEFAULT_ASPECT_RATIO = 1.35;
  91 +
72 92 public static final boolean DEFAULT_ALL_DAY_SLOT = true;
  93 +
73 94 public static final String DEFAULT_AXIS_FORMAT = "h(:mm)tt";
  95 +
74 96 public static final int DEFAULT_SLOT_MINUTES = 30;
  97 +
75 98 public static final int DEFAULT_EVENT_MINUTES = 120;
  99 +
76 100 public static final int DEFAULT_FIRST_HOUR = 6;
  101 +
77 102 public static final String DEFAULT_MIN_TIME = "0";
  103 +
78 104 public static final String DEFAULT_MAX_TIME = "24";
  105 +
79 106 public static final boolean DEFAULT_EDITABLE = false;
  107 +
80 108 public static final boolean DEFAULT_SELECTABLE = false;
  109 +
81 110 public static final boolean DEFAULT_SELECT_HELPER = false;
  111 +
82 112 public static final boolean DEFAULT_UNSELECT_AUTO = true;
  113 +
83 114 public static final String DEFAULT_UNSELECT_CANCEL = "";
  115 +
84 116 public static final boolean DEFAULT_DISABLE_DRAGGING = false;
  117 +
85 118 public static final boolean DEFAULT_DISABLE_RESIZING = false;
  119 +
86 120 public static final int DEFAULT_DRAG_REVERT_DURATION = 500;
  121 +
87 122 public static final double DEFAULT_DRAG_OPACITY = .3;
  123 +
88 124 public static final boolean DEFAULT_ALL_DAY_DEFAULT = true;
  125 +
89 126 private DataModel model;
90 127
91 128 public abstract Object getValue();
... ... @@ -292,6 +329,10 @@ public abstract class UISchedule extends UIComponentBase implements ScheduleComm
292 329
293 330 public abstract void setOndaterangechange(String ondaterangechange);
294 331
  332 + public abstract String getOnviewdisplay();
  333 +
  334 + public abstract void setOnviewdisplay(String onviewdisplay);
  335 +
295 336 public abstract MethodBinding getItemMoveListener();
296 337
297 338 public abstract void setItemMoveListener(MethodBinding listener);
... ...
... ... @@ -37,21 +37,37 @@ import java.util.Map;
37 37 public abstract class ScheduleRendererBase extends AjaxComponentRendererBase {
38 38
39 39 public static final String ITEM_MOVE_EVENT = "itemMove";
  40 +
40 41 public static final String ITEM_RESIZE_EVENT = "itemResize";
  42 +
41 43 public static final String ITEM_SELECT_EVENT = "itemSelect";
  44 +
42 45 public static final String DATE_RANGE_CHANGE_EVENT = "dateRangeChange";
  46 +
43 47 public static final String VIEW_CHANGE_EVENT = "viewChange";
  48 +
44 49 public static final String DATE_SELECT_EVENT = "dateSelect";
  50 +
45 51 public static final String DATE_RANGE_SELECT_EVENT = "dateRangeSelect";
  52 +
46 53 private static final String CALLBACK = "callback";
  54 +
47 55 private static final String END_DATE_PARAM = "endDate";
  56 +
48 57 private static final String START_DATE_PARAM = "startDate";
  58 +
49 59 private static final String ITEM_ID_PARAM = "itemId";
  60 +
50 61 private static final String DAY_DELTA_PARAM = "dayDelta";
  62 +
51 63 private static final String MINUTE_DELTA_PARAM = "minuteDelta";
  64 +
52 65 private static final String ALL_DAY_PARAM = "allDay";
  66 +
53 67 private static final String EVENT_TYPE_PARAM = "eventType";
  68 +
54 69 private static final String VIEW_PARAM = "view";
  70 +
55 71 private static final Map<String, Object> DEFAULTS;
56 72
57 73 /**
... ... @@ -306,6 +322,7 @@ public abstract class ScheduleRendererBase extends AjaxComponentRendererBase {
306 322 addOptionIfSetAndNotDefault("onbeforedaterangeselect", schedule.getOnbeforedaterangeselect(), options);
307 323 addOptionIfSetAndNotDefault("ondaterangeselect", schedule.getOndaterangeselect(), options);
308 324 addOptionIfSetAndNotDefault("ondaterangechange", schedule.getOndaterangechange(), options);
  325 + addOptionIfSetAndNotDefault("onviewdisplay", schedule.getOnviewdisplay(), options);
309 326 if (schedule.getDate() != null) {
310 327 Calendar calendar = Calendar.getInstance();
311 328 calendar.setTime(schedule.getDate());
... ...
... ... @@ -374,6 +374,11 @@ RichFaces.Schedule = function(id, locale, options, dateRangeChangeEventName, ite
374 374 * ignored.
375 375 */
376 376 var viewChanged = function(view) {
  377 + if (options.onviewdisplay != null) {
  378 + RichFaces.Schedule.eval("(function(){" + options.onviewdisplay + "})()", {
  379 + 'view':view
  380 + });
  381 + }
377 382 if (selectedView != view && selectedView != undefined) {
378 383 if (submitEventFunction != null) {
379 384 submitEventFunction({},
... ...
Please register or login to post a comment