Author: atsebro
Date: 2009-07-29 10:03:02 -0400 (Wed, 29 Jul 2009)
New Revision: 15044
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.desc.xml
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
RF-7532: rich:calendar component description review
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.desc.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.desc.xml 2009-07-29
10:43:25 UTC (rev 15043)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.desc.xml 2009-07-29
14:03:02 UTC (rev 15044)
@@ -9,7 +9,7 @@
<section>
<title>Description</title>
<para>
- The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
component is used for creating inputs for dates enriched with interactive calendar that
allows navigate through monthes and years.
+ The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
component is used to create inputs for date and time and enter them inline or using pup-up
calendar that allows to navigate through monthes and years.
</para>
<figure>
<title><emphasis role="bold">
<property><rich:calendar></property></emphasis>
component</title>
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-07-29
10:43:25 UTC (rev 15043)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-07-29
14:03:02 UTC (rev 15044)
@@ -57,15 +57,15 @@
<para>To create the simplest variant on a page use the
following syntax:</para>
- <programlisting role="XML"><![CDATA[...
-<rich:calendar popup="false"/>
-...]]></programlisting>
+ <programlisting
role="XML"><![CDATA[<rich:calendar />]]></programlisting>
</section>
<section>
<title>Creating the Component Dynamically Using
Java</title>
-
-
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
<programlisting role="JAVA"><![CDATA[import
org.richfaces.component.html.HtmlCalendar;
...
HtmlCalendar myCalendar = new HtmlCalendar();
@@ -74,30 +74,94 @@
</section>
<section>
- <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.
- For popup rendering a "lazy" loading is
implemented: after the request is completed a client side script method builds the popup.
- Such improvement speeds up page loading time.
-
- </para>
- <figure>
- <title>Using the <emphasis>
-
<property>"popup"</property>
- </emphasis> attribute: calendar calls after
you click on the
- button.</title>
+ <title>Details of Usage</title>
+
+ <para>
+ The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
component can work properly in two ways of data loading
+ defined by the
<emphasis><property>"mode"</property></emphasis>
attribute.
+ The attribute has two possible values:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>client</code> — the default mode.
+ In this mode calendar loads an initial portion of data
within a definite date range.
+ The range is specified with the help of
<emphasis><property>"preloadDateRangeBegin"</property></emphasis>
and
<emphasis><property>"preloadDateRangeEnd"</property></emphasis>
attributes
+ that are designed for this mode only!
+ Additional data requests are not sent.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <code>ajax</code> — in this mode the
<emphasis
role="bold"><property><rich:calendar></property></emphasis>
requests portions of data for element rendering from special Data Model.
+ The default calendar Data Model could be redefined with
the help of <emphasis><property>dataModel</property></emphasis>
attribute that points to the object that implements <code><ulink
url="http://www.jboss.org/file-access/default/members/jbossrichfaces...
interface.
+ If
<emphasis><property>"dataModel"</property></emphasis>
attribute has
<emphasis><property>"null"</property></emphasis>
value, data requests are not sent.
+ In this case the
"<code>ajax</code>" mode is equal to the
"<code>client</code>".
+ </para>
+ </listitem>
+ </itemizedlist>
- <mediaobject>
- <imageobject>
- <imagedata
fileref="images/calendar_init.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Usage <emphasis>
+ <para>
+ The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
could be represented on a page in two ways (a) the calendar itself without input field and
button and
+ (b) date input with button and popping-up calendar.
+ This is defined with
<emphasis><property>"popup"
</property></emphasis> attribute, which is
<emphasis><property>"true"</property></emphasis>
by default.
+ For popup rendering a "lazy" loading is
implemented: a client side script method builds the popup after request is completed.
+ Such improvement speeds up page loading time.
+ </para>
+
+ <figure>
+ <title>The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
with
<emphasis><property>popup="false"</property></emphasis>
(a) and default representation (b)</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/calendar7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ By default the <emphasis
role="bold"><property><rich:calendar></property></emphasis>
is rendered as input filed with a button and calendar hidden in a pop-up.
+ The button is represented with calendar pictogramm.
+ This pictogramm could be easily changed with the help of
<emphasis><property>"buttonIcon"</property></emphasis>
+ and
<emphasis><property>"buttonIconDisabled"</property></emphasis>
attributes, which specify the icon for button enabled and disabled states respectively.
+ To change the button appearance from icon to usual button define
the value for the
<emphasis><property>"buttonLabel"</property></emphasis>
attribute.
+ In this case
<emphasis><property>"buttonIcon"</property></emphasis>
and
<emphasis><property>"buttonIconDisabled"</property></emphasis>
attributes are ignored.
+ </para>
+
+ <figure>
+ <title>The <emphasis
role="bold"><property><rich:calendar></property></emphasis>
with <emphasis><property>buttonLabel="Open
calendar"</property></emphasis> attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/calendar8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>
+ There are two attributes that specify the place where the popup
calendar is rendered relative to the input field and icon:
+
<emphasis><property>"jointPoint"</property></emphasis>
and
<emphasis><property>"direction"</property></emphasis>
attributes.
+ By default the pop-up calendar appears under input and aligned
with it left border (see Fig. 6.211, b).
+ Speaking in terms of RichFaces it means that <emphasis
role="bold"><property><rich:calendar></property></emphasis>
<emphasis><property>jointPoint="bottom-left"</property></emphasis>
+ and
<emphasis><property>direction="bottom-right".</property></emphasis>
+ There are four possible joint-points and four possible directions
for each joint-point.
+ Besides that, the values of
<emphasis><property>"jointPoint"</property></emphasis>
and
<emphasis><property>"direction"</property></emphasis>
could be set to
+
<emphasis><property>"auto"</property></emphasis>
that activates smart pop-up positioning.
+ </para>
+
+ <figure>
+ <title>Four possible positions of joint-points (red) and four
possible directions (black) shown for bottom-left joint-point.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/calendar9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>Usage <emphasis>
<property>"currentDate"</property>
</emphasis> attribute isn't available in the popup
mode.</para>
<para>With help of the <emphasis>
@@ -165,48 +229,7 @@
- <para>The <emphasis role="bold">
-
<property><rich:calendar></property>
- </emphasis> component can render pages of days in two
modes. A mode
- could be defined with the <emphasis>
-
<property>"mode"</property>
- </emphasis> attribute with two possible parameters:
- "<code>ajax</code>"
and
-
"<code>client</code>". Default value is
-
<code>"client"</code>.</para>
- <itemizedlist>
- <listitem>
- <para>
- <code>Ajax</code>
- </para>
- </listitem>
- </itemizedlist>
- <para>Calendar requests portions of data from Data Model for a
page rendering.
- If <emphasis>
-
<property>"dataModel"</property>
- </emphasis> attribute has "null"
value, data
- requests are not sent. In this case the
- "<code>ajax</code>" mode is
equal to the
-
"<code>client</code>". </para>
- <itemizedlist>
- <listitem>
- <para>
- <code>Client</code>
- </para>
- </listitem>
- </itemizedlist>
- <para>Calendar loads an initial portion of data in a specified
range and use
- this data to render months. Additional data requests are
not sent.</para>
- <note>
- <title>Note:</title>
- <para><emphasis>
-
<property>"preloadDateRangeBegin"</property>
- </emphasis> and <emphasis>
-
<property>"preloadDateRangeEnd"</property>
- </emphasis> attributes were designed only
for the
-
"<code>client</code>" mode to
- load some data initially.</para>
- </note>
+
<para><emphasis>
<property>"ondateselect"</property>
</emphasis> attribute is used to define an event that
is triggered
@@ -267,94 +290,14 @@
<property>"process"</property>
</emphasis> attribute usage you can find <link
linkend="process"
in the corresponding section </link>. </para>
-
<para>There are three button-related attributes:</para>
- <itemizedlist>
- <listitem>
- <para><emphasis>
-
<property>"buttonLabel"</property>
- </emphasis> defines a label for
the button. If the
- attribute is set <emphasis>
-
<property>"buttonIcon"</property>
- </emphasis> and <emphasis>
-
<property>"buttonIconDisabled"</property>
- </emphasis> are ignored
</para>
- </listitem>
- <listitem>
- <para><emphasis>
-
<property>"buttonIcon"</property>
- </emphasis> defines an icon for
the button</para>
- </listitem>
- <listitem>
- <para><emphasis>
-
<property>"buttonIconDisabled"</property>
- </emphasis> defines an icon for
the disabled state
- of the button</para>
- </listitem>
- </itemizedlist>
- <para>The <emphasis>
-
<property>"direction"</property>
- </emphasis> and <emphasis>
-
<property>"jointPoint"</property>
- </emphasis> attributes are used for defining aspects
of calendar
- appearance.</para>
- <para>The possible values for the <emphasis>
-
<property>"direction"</property>
- </emphasis> are: </para>
- <itemizedlist>
- <listitem>
- <para>"top-left" - a
calendar drops to the
- top and left</para>
- </listitem>
- <listitem>
- <para>"top-right" - a
calendar drops to
- the top and right</para>
- </listitem>
- <listitem>
- <para>"bottom-left" - a
calendar drops to
- the bottom and left</para>
- </listitem>
- <listitem>
- <para>"bottom-right" - a
calendar drops to
- the bottom and right</para>
- </listitem>
- <listitem>
- <para>"auto" - smart
positioning
- activation</para>
- </listitem>
- </itemizedlist>
- <para> By default, the <emphasis>
-
<property>"direction"</property>
- </emphasis> attribute is set to
"bottom-right".</para>
- <para>The possible values for the <emphasis>
-
<property>"jointPoint"</property>
- </emphasis> are: </para>
- <itemizedlist>
- <listitem>
- <para>"top-left" - a
calendar docked to
- the top-left point of the button
element</para>
- </listitem>
- <listitem>
- <para>"top-right" - a
calendar docked to
- the top-right point of the button
element</para>
- </listitem>
- <listitem>
- <para>"bottom-left" - a
calendar docked to
- the bottom-left point of the button
element</para>
- </listitem>
- <listitem>
- <para>"bottom-right" - a
calendar docked
- to the bottom-right point of the
button
- element</para>
- </listitem>
- <listitem>
- <para>"auto" - smart
positioning
- activation</para>
- </listitem>
- </itemizedlist>
- <para> By default, the <emphasis>
-
<property>"jointPoint"</property>
- </emphasis> attribute is set to
"bottom-left".</para>
- <para> The <emphasis>
+
+
+
+
+
+
+
+ <para> The <emphasis>
<property>"label"</property>
</emphasis> attribute is a generic attribute. The
<emphasis>
<property>"label"</property>
@@ -554,7 +497,10 @@
<para>Also the discussion about this problem can be found on
the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&...
RichFaces Users Forum</ulink>.</para>
-
<para>The <emphasis role="bold">
+
+
+
+ <!-- <para>The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component provides the possibility to use
a special Data
Model to define data for element rendering. Data Model
includes two
@@ -572,7 +518,9 @@
</para>
</listitem>
</itemizedlist>
- <para><code>CalendarDataModel</code> provides the
following function:</para>
+
+
+ <para><code>CalendarDataModel</code> provides the
following function:</para>
<itemizedlist>
<listitem>
<para><code>CalendarDataModelItem[]
@@ -615,8 +563,11 @@
could be used in the custom date
representation on
the calendar (inside the custom
facet).</para>
</listitem>
- </itemizedlist>
+ </itemizedlist>
+-->
+
+
<para> The <emphasis role="bold">
<property><rich:calendar></property>
</emphasis> component provides the possibility to
use