Author: vsukhov
Date: 2008-04-15 12:26:00 -0400 (Tue, 15 Apr 2008)
New Revision: 7844
Modified:
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
Log:
http://jira.jboss.com/jira/browse/RF-3040 added description about the
"oncurrentdateselected" "oncurrentdateselect" events
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-04-15 16:10:57 UTC
(rev 7843)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2008-04-15 16:26:00 UTC
(rev 7844)
@@ -153,7 +153,27 @@
</emphasis> could be used for possibility of date selection canceling. See an
example below:</para>
<programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}"
ondateselect="if (!confirm('Are you sure to change date?')){return
false;}"/>
-...]]></programlisting>
+ ...]]></programlisting>
+ <para>
+
+ <emphasis>
+ <property>"oncurrentdataselected"</property>
+ </emphasis> event is fired when the "next/previous month" or
"next/previous year" button is pressed,
+ and the value is <property>applied</property>.
+ </para>
+ <para>
+ <emphasis>
+ <property>"oncurrentdataselect"</property>
+ </emphasis> event is fired when the "next/previous month" or
"next/previous year" button is pressed,
+ but the value is <property>not applied</property> yet (you can change
the logic of upplying the value). Also this event could be used for possibility of
"next/previous month" or "next/previous year" selection canceling. See
an example below:
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:calendar id="date" value="#{bean.dateTest}"
oncurrentdateselect="if (!confirm('Are you sure to change
month(year)?')){return false;}"
+oncurrentdateselected="alert('month(year)
select:'+event.rich.date.toString());"/>
+ ...]]></programlisting>
<para>How to use these attributes see also on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&...
RichFaces Users Forum</ulink>.</para>