[richfaces-svn-commits] JBoss Rich Faces SVN: r2515 - trunk/docs/userguide/en/src/main/docbook/included.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Mon Aug 27 14:32:31 EDT 2007
Author: vkorluzhenko
Date: 2007-08-27 14:32:31 -0400 (Mon, 27 Aug 2007)
New Revision: 2515
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-391- forums revision, improved description
http://jira.jboss.com/jira/browse/RF-396 - added relevant resources links
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-27 18:31:15 UTC (rev 2514)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2007-08-27 18:32:31 UTC (rev 2515)
@@ -83,11 +83,13 @@
<title>Details of Usage</title>
<para>The <emphasis>
<property>"popup"</property>
- </emphasis> attribute defines calendar representation mode on a page. If it's "true"
- the calendar is represented on a page as an input field and a button. Clicking on the button
- calls the calendar popup as it's shown on the picture below. </para>
+ </emphasis> attribute defines calendar representation mode on a page. If it's
+ "true" the calendar is represented on a page as an input field and a button.
+ Clicking on the button calls the calendar popup as it's shown on the picture below. </para>
<figure>
- <title>Using the <emphasis><property>"popup"</property></emphasis> attribute</title>
+ <title>Using the <emphasis>
+ <property>"popup"</property>
+ </emphasis> attribute</title>
<mediaobject>
<imageobject>
@@ -134,7 +136,7 @@
</itemizedlist>
<para> By default, the <emphasis>
<property>"direction"</property>
- </emphasis> attribute is set to "bottom-right".</para>
+ </emphasis> attribute is set to "bottom-right".</para>
<para>The possible values for the <emphasis>
<property>"jointPoint"</property>
</emphasis> are: </para>
@@ -147,7 +149,7 @@
</itemizedlist>
<para> By default, the <emphasis>
<property>"jointPoint"</property>
- </emphasis> attribute is set to "bottom-left".</para>
+ </emphasis> attribute is set to "bottom-left".</para>
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component provides to use <emphasis>
@@ -195,6 +197,31 @@
</f:facet>
...</programlisting>
+ <para>The example of using JavaScript API is placed below:</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <a4j:form id="form">
+ <h:panelGroup id="test" columns="2" style="width: 300px">
+ <h:selectBooleanCheckbox value="#{bean.check}">
+ <a4j:support event="onchange" reRender="test" />
+ <f:selectItem itemValue="true" itemLabel="Show" />
+ <f:selectItem itemValue="false" itemLabel="Hide" />
+ </h:selectBooleanCheckbox>
+ <rich:calendar popup="true"
+ rendered="#{!bean.check}" value="#{bean.date}" id="c"/>
+ <a onclick="$('form:c').component.doExpand()" href="#">Show</a>
+ </h:panelGroup>
+ </a4j:form>
+...
+]]></programlisting>
+
+ <para>Also the discussion about this problem can be fobnd on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#4078301"
+ >RichFaces Users Forum</ulink>.</para>
+
<para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component provides the possibility to use a special data model to define data for
@@ -212,15 +239,18 @@
<para>This method is called when it's necessary to represent the next block of
CalendarDataItems. It happens during navigation to the next (previous) month or in any other
- case when calendar renders. This method is called in <emphasis><property>"Ajax"</property></emphasis> mode when the
- calendar renders a new page. </para>
+ case when calendar renders. This method is called in <emphasis>
+ <property>"Ajax"</property>
+ </emphasis> mode when the calendar renders a new page. </para>
<para><emphasis role="bold">CalendarDataModelItem</emphasis> provides the following function:</para>
<itemizedlist>
<listitem>Date getDate() - returns date from the item. Default implementation returns date.</listitem>
- <listitem>Boolean isEnabled() - returns <emphasis><property>"true"</property></emphasis> if date is
- <emphasis><property>"selectable"</property></emphasis> on the calendar. Default implementation returns
- "true".</listitem>
+ <listitem>Boolean isEnabled() - returns <emphasis>
+ <property>"true"</property>
+ </emphasis> if date is <emphasis>
+ <property>"selectable"</property>
+ </emphasis> on the calendar. Default implementation returns "true".</listitem>
<listitem>String getStyleClass() - returns string appended to the style class for the date
span. For example it could be "relevant holyday". It means that the class
could be defined like the "rich-cal-day-relevant-holyday" one. Default
@@ -247,113 +277,114 @@
</thead>
<tbody>
-
+
<row>
<entry>selectDate(date)</entry>
-
- <entry>Select the date specified. If the date isn't in current month - performs request to select</entry>
+
+ <entry>Select the date specified. If the date isn't in current month - performs
+ request to select</entry>
</row>
-
+
<row>
<entry>isDateEnabled(date)</entry>
-
+
<entry>Check if given date is selectable</entry>
</row>
-
+
<row>
<entry>enableDate(date)</entry>
-
+
<entry>Enables date cell control on the calendar</entry>
</row>
-
+
<row>
<entry>disableDate(date)</entry>
-
+
<entry>Disables date cell control on the calendar</entry>
</row>
-
+
<row>
<entry>enableDates(date[])</entry>
-
+
<entry>Enables dates cell controls set on the calendar</entry>
</row>
-
+
<row>
<entry>disableDates(date[])</entry>
-
+
<entry>Disables dates cell controls set on the calendar</entry>
</row>
-
+
<row>
<entry>nextMonth()</entry>
-
+
<entry>Navigate to next month</entry>
</row>
-
+
<row>
<entry>nextYear()</entry>
-
+
<entry>Navigate to next year</entry>
</row>
-
+
<row>
<entry>prevMonth()</entry>
-
+
<entry>Navigate to previous month </entry>
</row>
-
+
<row>
<entry>prevYear()</entry>
-
+
<entry>Navigate to previous year</entry>
</row>
-
+
<row>
<entry>today()</entry>
-
+
<entry>Select today date</entry>
</row>
-
+
<row>
<entry>getSelectedDate()</entry>
-
+
<entry>Return currently selected date</entry>
</row>
-
+
<row>
<entry>Object getData()</entry>
-
+
<entry>Return additional data for the date</entry>
</row>
-
+
<row>
<entry>enable()</entry>
-
+
<entry>enables calendar</entry>
</row>
-
+
<row>
<entry>disable()</entry>
-
+
<entry>disables calendar</entry>
</row>
-
+
<row>
<entry>getCurrentMonth()</entry>
-
+
<entry>Returns number of the month currently being viewed</entry>
</row>
-
+
<row>
<entry>getCurrentYear()</entry>
-
+
<entry>Returns number of the year currently being viewed</entry>
</row>
-
+
<row>
<entry>doCollapse()</entry>
- <entry>Collapse calendar element</entry>
+ <entry>Collapse calendar element</entry>
</row>
<row>
@@ -378,4 +409,14 @@
</section-->
+ <section>
+ <title>Relevant resources links</title>
+ <para><ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf?c=calendar"
+ >Here</ulink> you can see the example of <emphasis role="bold"
+ ><rich:calendar></emphasis> usage and sources for the given example. </para>
+ <para>How to use JavaScript API see on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078301#4078301"
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
+
</section>
More information about the richfaces-svn-commits
mailing list