From richfaces-svn-commits at lists.jboss.org Fri Jan 28 02:03:44 2011 Content-Type: multipart/mixed; boundary="===============5490284085501972202==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r21297 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directories. Date: Fri, 28 Jan 2011 02:03:43 -0500 Message-ID: <201101280703.p0S73hER011159@svn01.web.mwc.hst.phx2.redhat.com> --===============5490284085501972202== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: SeanRogers Date: 2011-01-28 02:03:43 -0500 (Fri, 28 Jan 2011) New Revision: 21297 Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exa= m-Component_Reference-richcalendar-Client-side_customization.xml_sample modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/fig= u-Component_Reference-richcalendar-Facet_elements.png Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Compo= nent_Reference-Rich_inputs.xml Log: Updated rich:calendar Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/cha= p-Component_Reference-Rich_inputs.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Rich_inputs.xml 2011-01-28 01:01:08 UTC (rev 21296) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Comp= onent_Reference-Rich_inputs.xml 2011-01-28 07:03:43 UTC (rev 21297) @@ -230,7 +230,6 @@ = - = +
+ Client-side customization + + Instead of using a data model, the <rich:calendar> component can be customized on the client-side. demonstrate= s how client-side customization can be used to style different days in a ca= lendar. + + + Client-side customization + + +
+ =
Behavior and appearance The <rich:calendar> component is presented as= a pop-up by default, appearing as a text field with a button to expand the= full pop-up calendar. To render the calendar in-line on the page instead, = set popup=3D"false. This displays the full calendar without th= e text field or display button. + To add keyboard support for manual input, set enableManualInput= =3D"true". To disable the calendar from any user input, set di= sabled=3D"true". + + To change the appearance of the display button from the standard calen= dar icon, use the buttonIcon and buttonIconDisa= bled attributes to replace the icon with a specified file. Altern= atively, use the buttonLabel attribute to display text o= n the button without an icon. If buttonLabel is specifie= d then both the buttonIcon and buttonIconDisabl= ed attributes are ignored. To hide the text field box, set = showInput=3D"false". @@ -296,14 +308,21 @@ To make the entire calendar read-only, set readonly=3D"true". This allows months and years to be browsed through with the arrow cont= rols, but dates and times cannot be selected. - The locale for the calendar can be defined at the component level. All= calendar labels will be localized according to this locale. + The styling and appearance of the calendar can be fully customized usi= ng facets. The header and footer face= ts define the calendar's header and footer. The optionalHeader and optionalFooter facets define the calendar's o= ptional header and optional footer. The weekNumber facet= controls the appearance of the week numbers, and the weekDay facet controls the appearance of the individual day cells on the cale= ndar. shows some of the elements available for customization through the var= ious facets. - - +
+ Facet elements + + + + + + + A <rich:calendar> control with lab= eled facet elements. + + + +
=
@@ -318,6 +337,16 @@
+ +
+ Localization and formatting + + Date and time strings can be formatted in a set pattern. Use standard = locale formatting strings specified by ISO 8601 (for= example, d/M/yy HH:mm a) with the datePattern<= /varname> attribute to format date and time strings. + + + To set the locale of the calendar, use the locale a= ttribute. The calendar will render month and day names in the relevant lang= uage. For example, to set the calendar to the US locale, specify loca= le=3D"en/US". + +
= + +
+ JavaScript API + + The <rich:calendar> component can be cont= rolled through the JavaScript API. The JavaScript API provides the followin= g functions: + + + + selectDate(date) + + + Select the specified date. If the date is not in the curr= ently displayed month, a request is performed to display the correct month. + + + + + isDateEnabled(date) + + + Check if the specified date is able to be selected. + + + + + enableDate(date) + + + Enable the specified date cell control on the calendar. + + + + + disableDate(date) + + + Disable the specified date cell control on the calendar. + + + + + enableDates(date[]) + + + Enable the specified dates' cell controls on the calendar. + + + + + disableDates(date[]) + + + Disable the specified dates' cell controls on the calenda= r. + + + + + nextMonth() + + + Display the next month. + + + + + nextYear() + + + Display the next year. + + + + + prevMonth() + + + Display the previous month. + + + + + prevYear() + + + Display the previous year. + + + + + getCurrentMonth() + + + Return the number of the month currently being displayed. + + + + + getCurrentYear() + + + Return the number of the year currently being displayed. + + + + + today() + + + Select today's date. + + + + + getSelectedDate() + + + Return the currently selected date. + + + + + Object getData() + + + Return additional data for the date. + + + + + resetSelectedDate() + + + Clear the selected day value. + + + + + doCollapse() + + + Collapse the pop-up calendar element. + + + + + doExpand() + + + Expand the pop-up calendar element. + + + + + doSwitch() + + + Invert the state of the pop-up calendar element. + + + + +
=
Reference data Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras= /exam-Component_Reference-richcalendar-Client-side_customization.xml_sample =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richcalendar-Client-side_customization.xml_sample = (rev 0) +++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/ex= am-Component_Reference-richcalendar-Client-side_customization.xml_sample 20= 11-01-28 07:03:43 UTC (rev 21297) @@ -0,0 +1,30 @@ + + + Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images= /figu-Component_Reference-richcalendar-Facet_elements.png =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: modules/docs/trunk/Component_Reference/src/main/docboo= k/en-US/images/figu-Component_Reference-richcalendar-Facet_elements.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream --===============5490284085501972202==--