| java.lang.Object dinamica.AbstractModule dinamica.GenericTransaction dinamica.calendar.DefaultCalendar
DefaultCalendar | public class DefaultCalendar extends GenericTransaction (Code) | | Custom Calendar Transaction for Dinamica's built-in
calendar services. All calendar transactions must
store a recordset as a request attribute with ID "calendar"
that should contain 3 columns:
- day - integer
- onclick - varchar, value of the onclick attribute
- html - content of the calendar cell for this day
- class - class name defining style for this cell (see calendar template)
This transaction expects 2 optional request parameters:
- id - ID of the element (textbox) attached to the calendar
- date - selected date if format dd-mm-yyyy
This calendar transaction in particular was designed to be used
by popup JavaScript calendars attached to textboxes, but can also
be used for clickable agendas, etc.
Creation date: 2006-06-04
author: mcordova (dinamica@martincordova.com) |
Method Summary | |
Recordset | createCalendarRecordset() Creates the recordset that contains the basic data
to print a Calendar. | protected String | getCellHTML(Calendar c, int currentDay) Returns the HTML content for a given calendar cell,
only for cells that contain a day- not called for empty cells. | protected String | getCellOnClickValue(String elementID, Calendar c, int currentDay, Date minDate, Date maxDate, String date) Returns the value of the ONCLICK attribute for a given calendar cell,
only for cells that contain a day- not called for empty cells. | protected String | getCellStyle(Calendar c, int currentDay, Date minDate, Date maxDate) Returns the value of the CLASS attribute for a given calendar cell,
only for cells that contain a day- not called for empty cells.
Parameters: c - Calendar set for the day to be printed Parameters: currentDay - Selected day Parameters: minDate - Minimal date that can be selected (may be null) A String that contains the name of the class attribute for the table cell,should match those styles defined in the Calendar main template. | public int | service(Recordset inputs) |
createCalendarRecordset | Recordset createCalendarRecordset() throws Throwable(Code) | | Creates the recordset that contains the basic data
to print a Calendar.
Recordset with this structure: day (int), onclick (varchar), html (varchar), class (varchar) throws: Throwable - |
getCellHTML | protected String getCellHTML(Calendar c, int currentDay) throws Throwable(Code) | | Returns the HTML content for a given calendar cell,
only for cells that contain a day- not called for empty cells.
Parameters: c - Calendar set for the day to be printed Parameters: currentDay - Current day A String that contains the HTML to be printed into the cell throws: Throwable - |
getCellOnClickValue | protected String getCellOnClickValue(String elementID, Calendar c, int currentDay, Date minDate, Date maxDate, String date) throws Throwable(Code) | | Returns the value of the ONCLICK attribute for a given calendar cell,
only for cells that contain a day- not called for empty cells.
Parameters: elementID - ID of the element (textbox) attached to the Calendar Parameters: c - Calendar set for the day to be printed Parameters: currentDay - Selected day Parameters: minDate - Minimal date that can be selected (may be null) Parameters: date - Calendar date preformated as dd-mm-yyyy A String that contains the value of the onclick attribute for the table cell (calls some javascript function) throws: Throwable - |
getCellStyle | protected String getCellStyle(Calendar c, int currentDay, Date minDate, Date maxDate) throws Throwable(Code) | | Returns the value of the CLASS attribute for a given calendar cell,
only for cells that contain a day- not called for empty cells.
Parameters: c - Calendar set for the day to be printed Parameters: currentDay - Selected day Parameters: minDate - Minimal date that can be selected (may be null) A String that contains the name of the class attribute for the table cell,should match those styles defined in the Calendar main template. throws: Throwable - |
|
|