Author: msorokin
Date: 2008-04-15 09:43:00 -0400 (Tue, 15 Apr 2008)
New Revision: 7836
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
Log:
http://jira.jboss.com/jira/browse/RF-1226
InplaceInput article corrected.
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.desc.xml 2008-04-15
11:11:39 UTC (rev 7835)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.desc.xml 2008-04-15
13:43:00 UTC (rev 7836)
@@ -36,13 +36,13 @@
<para>Optional "inline" or
"block" element rendering on a page</para>
</listitem>
<listitem>
- <para>Edit mode activation when the component got focus with the
"Tab"</para>
+ <para>Edit mode activation when the component gets focus with the
"Tab"</para>
</listitem>
<listitem>
<para>Sizes synchronizations between modes</para>
</listitem>
<listitem>
- <para>Hight controls customization</para>
+ <para>Controls customization</para>
</listitem>
</itemizedlist>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-04-15 11:11:39
UTC (rev 7835)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2008-04-15 13:43:00
UTC (rev 7836)
@@ -66,7 +66,7 @@
<title>Details of Usage</title>
<para>
- As it was mentioned earlier the
+ The
<emphasis
role="bold"><property><rich:inplaceInput></property></emphasis>
component was designed to facilitate displaying and inputting(editing) some
data.
</para>
@@ -105,16 +105,17 @@
<programlisting role="XML"><![CDATA[...
<rich:inplaceInput value="#{bean.value}" defaultLabel="click to
edit"/>
...]]> </programlisting>
- <para>
+
+<!-- <para>
The managed bean code:
- </para>
- <programlisting role="JAVA"><![CDATA[...
+ </para>-->
+<!-- <programlisting role="JAVA"><![CDATA[...
private String value = null;
-...]]> </programlisting>
+...]]> </programlisting>-->
<para>
- In the example above the
<emphasis><property>"value"</property></emphasis>
attribute is "null";
- therefore "click to edit" value is displayed since it is
placed into the
-
<emphasis><property>"defaultLabel"</property></emphasis>
attribute.
+ In the example above the
<emphasis><property>"value"</property></emphasis>
attribute is not initialized
+ therefore "click to edit" text, that
+
<emphasis><property>"defaultLabel"</property></emphasis>,
contains is displayed.
</para>
<para>
This is the result:
@@ -155,15 +156,15 @@
</itemizedlist>
<para>
- The
<emphasis><property>"editEvent"</property></emphasis>
attribute provides an option to assign an JavaScript action
- that initiates the change of the state from <property>view</property>
to <property>edit</property>.
+ The
<emphasis><property>"editEvent"</property></emphasis>
attribute provides an option to assign a JavaScript action
+ to initiate the change of the state from
<property>view</property>/<property>changed</property> to
<property>edit</property>.
The default value is "onclick".
</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
-<rich:inplaceInput value="#{bean.value}"
editEvent="onmouseover"/>
+<rich:inplaceInput value="#{bean.value}"
editEvent="ondblclick"/>
...]]> </programlisting>
<!--note>
@@ -215,15 +216,32 @@
<para>
The
<emphasis><property>"selectOnEdit"</property></emphasis>
(with possible values "true", "false") gives you an
- option to make the text in the input field selected right after the change from
<property>view</property> state to <property>edit</property>
occurs.
+ option to make the text (displayed by
<emphasis><property>"value"</property></emphasis>
attribute) in the input field selected right after the change from
<property>view</property>/<property>changed</property> state to
<property>edit</property> occurs.
+
</para>
+ <para>This is the result:</para>
+
+ <figure>
+ <title>Usage of the
<emphasis><property>"selectOnEdit"</property></emphasis>
attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/inplaceInputSelect.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
<para>
If the <emphasis
role="bold"><property><rich:inplaceInput></property></emphasis>
loses focus input data is saved automatically
- and the component displays new value.
+ and the component displays new value. Additionally, the data is saved when
"Enter" is pressed.
Nevertheless, you can use the
<emphasis><property>"showControls"</property></emphasis>
- attribute, which makes "Save" and "Cancel"
buttons appear next to the input field.
- </para>
+ attribute, which makes "Save" and "Cancel"
buttons appear next to the input field.
+ If the controls are used, data is not saved automatically when the form loses
focus: user has to confirm that he/she wants to save/discard the data explicitly.
+ In both cases(with controls or without them) the input data can be discarded by
pressing "Esc" key.
+
+ </para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>