Author: msorokin
Date: 2008-03-21 11:24:47 -0400 (Fri, 21 Mar 2008)
New Revision: 7060
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
Log:
http://jira.jboss.com/jira/browse/RF-1226
Details of usaged - complete
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-03-21 15:24:15
UTC (rev 7059)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-03-21 15:24:47
UTC (rev 7060)
@@ -212,15 +212,107 @@
</para>
<programlisting role="XML"><![CDATA[...
-<rich:inplaceInput value="#{bean.incValue}" minValue="50"
maxValue="400"/>
-...]]> </programlisting>
+<rich:inplaceInput value="#{bean.value}" defaultLabel='click to
edit'
+ showControls="true"
+ controlsHorizontalPosition="left"
+ controlsVerticalPosition="top"
+ saveControlIcon="/richfaces-demo/richfaces/cancel.gif"
+ cancelControlIcon="/richfaces-demo/richfaces/save.gif"/>
+ ...]]> </programlisting>
+ <figure>
+ <title>Redefining of "save" and
"cancel" buttons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/inplaceInputShowControlsCustom.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ The
+
<emphasis><property>"editEvent"</property></emphasis>
+ attribute provides an option to assign an JS action that triggers state changing
from
+ <property>"View"</property>
+ to
+ <property>"Edit"</property>.
+ The default value is "click".
+
+ </para>
+ <note>
+ <para>
+
+ Do not use "on" prefix applying event action. E.g. use
"click" instead of "onClick", use
"mouseover" instead of "onMouseOver".
+
+ </para>
+ </note>
+
+ <para>
+
+ The
+
+
<emphasis><property>"selectOnEdit"</property></emphasis>
+ (with possible values <property>"true</property>,
<property>"false"</property>) gives you an
+ option to make the text in the input area selected right after the change from
+ <property>"View"</property> state to
<property>"Edit"</property>.
+
+ </para>
+<para>
+ The
+ <emphasis><property>"
oneditactivation"</property></emphasis> ,
+
<emphasis><property>"oneditactivated"</property></emphasis>
,
+
<emphasis><property>"onviewactivation"</property></emphasis>
+ and
+ <emphasis><property>"
onviewactivated"</property></emphasis>
+ provide a possibility to assign JavaScript code on
+ <property>"Edit"</property> state activation, on
+ <property>"Edit"</property> state activated,on
+ <property>"View"</property> state activation and on
+ <property>"View"</property> state activated respectively.
+</para>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceInput value="#{bean.value}" defaultLabel='click to
edit'
+ onviewactivated="if (confirm('Are you sure you want to change
value?')){return false;}" />
+...]]> </programlisting>
+ <para>
+ The given code illustrates how onviewactivation attribute works,
+ namely when the state is being changed from
+ <property>"Edit"</property> to
+ <property>"View"</property>,
+ a confirmation window with a message
+ "Are you sure you want to change value?" comes up.
+ </para>
+
-
-
+ <table>
+ <title>Keyboard usage</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Keys and combinations </entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>ENTER</entry>
+ <entry>Saves the input data, and changes the state from
"Edit" to "Changed"</entry>
+ </row>
+ <row>
+ <entry>ESC</entry>
+ <entry>changes the state from "Edit" to
"View" or "Changed", value is not
affected</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+
</section>
<!-- End. Details of Usage-->