Author: msorokin
Date: 2008-04-16 05:00:58 -0400 (Wed, 16 Apr 2008)
New Revision: 7861
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml
Log:
http://jira.jboss.com/jira/browse/RF-1226
InplaceSelect article corrected.
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml 2008-04-16
07:44:34 UTC (rev 7860)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceSelect.xml 2008-04-16
09:00:58 UTC (rev 7861)
@@ -95,16 +95,18 @@
<f:selectItems value="#{bean.selectItems}" />
</rich:inplaceSelect>
...]]> </programlisting>
- <para>
+ <!-- <para>
The managed bean code:
</para>
<programlisting role="JAVA"><![CDATA[...
private String value = "";
-...]]> </programlisting>
+...]]> </programlisting>-->
+
+
<para>
- In the example above the
<emphasis><property>"value"</property></emphasis>
attribute is empty string
- 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:
@@ -187,22 +189,22 @@
<itemizedlist>
<listitem>
<para>
-
<emphasis><property>"oneditactivation"</property></emphasis>
which is fired on <property>edit</property> state activation
+
<emphasis><property>"oneditactivation"</property></emphasis>
fired on <property>edit</property> state activation
</para>
</listitem>
<listitem>
<para>
-
<emphasis><property>"oneditactivated"</property></emphasis>
which is fired when <property>edit</property> state is activated
+
<emphasis><property>"oneditactivated"</property></emphasis>
fired when <property>edit</property> state is activated
</para>
</listitem>
<listitem>
<para>
-
<emphasis><property>"onviewactivation"</property></emphasis>
which is fired on <property>view</property> state activation
+
<emphasis><property>"onviewactivation"</property></emphasis>
fired on <property>view</property> state activation
</para>
</listitem>
<listitem>
<para>
-
<emphasis><property>"onviewactivated"</property></emphasis>
which is fired after the component is changed to representation state
+
<emphasis><property>"onviewactivated"</property></emphasis>
fired after the component is changed to representation state
</para>
</listitem>
</itemizedlist>
@@ -220,7 +222,8 @@
namely when the state is being changed from <property>view</property>
to <property>edit</property>,
a confirmation window with a message "Are you sure you want to change
value?" comes up.
</para>
- <para>
+
+<!-- <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.
</para>
@@ -228,8 +231,23 @@
<rich:inplaceSelect value="#{bean.inputValue}"
selectOnEdit="true">
<f:selectItems value="#{bean.selectItems}"/>
</rich:inplaceSelect>
-...]]></programlisting>
+...]]></programlisting> -->
+
+
+
<para>
+ Another useful attribute boolean is
<emphasis><property>"openOnEdit"</property></emphasis>,
when set to "true" it opens
+ drop-down list with items after <property>edit</property> state is
activated.
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:inplaceSelect value="#{bean.inputValue}" showControls="true"
openOnEdit="true">
+ <f:selectItems value="#{bean.selectItems}"/>
+</rich:inplaceSelect>
+...]]></programlisting>
+
+
+ <para>
This is the result:
</para>
<figure>
@@ -240,14 +258,13 @@
</imageobject>
</mediaobject>
</figure>
- <para>
- Another useful attribute is
<emphasis><property>"openOnEdit"</property></emphasis>.
- With "true" value it defines that the drop-down list with items
opens automatically after <property>edit</property> state is activated.
- </para>
+
<para>
Nowever, if you want to confirm the data saving explicitly you can use the
<emphasis><property>"showControls"</property></emphasis>
attribute,
which makes "Save" and "Cancel" buttons
(displayed as icons) appear next to the input field.
+ <property>Edit</property> state can be deactivated by pressing
"Esc" key.
+ An option in the drop-drown list can be also selected by pressing
"Enter".
</para>
<para>
<emphasis role="bold">Example:</emphasis>