From richfaces-svn-commits at lists.jboss.org Thu Nov 1 13:03:57 2007 Content-Type: multipart/mixed; boundary="===============6421626814216204755==" 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: r3680 - in trunk/docs/userguide/en/src/main: resources/images and 1 other directory. Date: Thu, 01 Nov 2007 13:03:57 -0400 Message-ID: --===============6421626814216204755== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: vkorluzhenko Date: 2007-11-01 13:03:57 -0400 (Thu, 01 Nov 2007) New Revision: 3680 Added: trunk/docs/userguide/en/src/main/resources/images/calendar2.png trunk/docs/userguide/en/src/main/resources/images/calendar3.png Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml Log: http://jira.jboss.com/jira/browse/RF-672 - added description about facets u= sing Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.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 --- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-11-= 01 15:15:01 UTC (rev 3679) +++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-11-= 01 17:03:57 UTC (rev 3680) @@ -112,22 +112,18 @@ Ajax - Calendar requests portions of data from Data Model for a page re= ndering. If "dataModel" attribute has "null" valu= e, data requests are not sent. In this case the "ajax" mode is equal to the "client". - Client - Calendar loads an initial portion of data in a specified range a= nd use this data to render months. Additional data requests are not sent. - Note: "preloadDateRangeBegin" @@ -135,40 +131,31 @@ "preloadDateRangeEnd" attributes was designed only for the "client" mode to load some data initi= ally. - - "ondataselect" - attribute is used to define an event that is triggered - before date selection. + "ondataselect" + attribute is used to define an event that is triggered b= efore date selection. - "ondateselected" - attribute is used to define an event that is triggered - after date selection. + "ondateselected" + attribute is used to define an event that is triggered a= fter date selection. For example, to fire some event after date selection you should = use <a4j:support> - . And it should be bound to - "ondateselected" - event as - it's shown in the example below: - = + . And it should be bound to + "ondateselected" + event as it's shown in the example below: = = ...]]> - - "ondataselect" - could be used for possibility of date selection canceling.= See an example below: - = + "ondataselect" + could be used for possibility of date selection cancelin= g. See an example below: ...]]> - How to use these attributes see also on the RichFaces Users Forum. - + url=3D"http://www.jboss.com/index.html?module=3Dbb&op=3Dviewto= pic&p=3D4092275#4092275" + >RichFaces Users Forum. There are three button-related attributes: @@ -225,53 +212,90 @@ attribute is set to "bottom-left". The <rich:calendar> - component provides to use + component allows to use "header" - facet. For example, you can add following scrolling elem= ents to the facet: + , + "footer" + , + "optionalHeader" + , + "optionalFooter" + facets. The following elements are available in these fa= cets: {currentMonthControl}, {nextMonthControl}, {nextYearControl}, {previ= ousYearControl}, - {previousMonthControl}. + {previousMonthControl}, {todayControl}, {selectedDateControl}. Simple example is placed below. Example: - - {previousMonthControl} | {nextMonthControl} = - - + + + + + = + + + = + + + + = + + ...]]> - It's possible to define - "footer" - facet and replace in it (in the same way how it was desc= ribed for - "header" - facet), for example, following today bar elements: {toda= yControl}, - {selectedDateControl}, {helpControl}. + This is a result: +
+ Using <emphasis> + <property>"header"</property> + </emphasis> and <emphasis> + <property>"footer"</property> + </emphasis> facets + + + + + + +
Also you can use - "optionalHeader" - and - "optionalFooter" - facets. These facets define the top and the bottom eleme= nts of the calendar. They - are not attached to the control parts of the calendar. You can repla= ce in them any content. - The - <rich:calendar> - component provides the possibility to use "weekNumber" - and + facet with available {weekNumber}, {elementId} elements = and "weekDay" - facets. For example, using these facets you can change t= ext style for the elements - of the calendar as it's shown in the example below: + facet with {weekDayLabel}, {weekDayLabelShort}, {weekDay= Number}, {isWeekend}, + {elementId} elements. + + Simple example is placed below. Example: - - + + + + + + + + + + ...]]> + This is a result: +
+ Using <emphasis> + <property>"weekNumber"</property> + </emphasis> and <emphasis> + <property>"weekDay"</property> + </emphasis> facets = + + + + + +
+ The example of using JavaScript API is placed below: - Example: @@ -290,32 +314,26 @@ ... ]]> - Also the discussion about this problem can be found on the RichFaces Users Forum. - The <rich:calendar> component provides the possibility to use a special Data= Model to define data for element rendering. Data Model includes two major interfaces: - CalendarDataModel CalendarDataModelItem - CalendarDataModel provides the following fu= nction: CalendarDataModelItem[] getData(Date[]); - This method is called when it's necessary to represent the = next block of CalendarDataItems. It happens during navigation to the next (previou= s) month or in any other case when calendar renders. This method is called in "Ajax" mode when the calendar renders a new page. - CalendarDataModelItem provides the followin= g function: Date getDate() - returns date from the item. Default imple= mentation returns date. @@ -332,7 +350,6 @@ object. It could be used in the custom date representation on the = calendar (inside the custom facet).
- =
Added: trunk/docs/userguide/en/src/main/resources/images/calendar2.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: trunk/docs/userguide/en/src/main/resources/images/cale= ndar2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/docs/userguide/en/src/main/resources/images/calendar3.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: trunk/docs/userguide/en/src/main/resources/images/cale= ndar3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream --===============6421626814216204755==--