Author: atsebro
Date: 2008-06-04 06:31:19 -0400 (Wed, 04 Jun 2008)
New Revision: 8898
Modified:
trunk/docs/userguide/en/src/main/docbook/included/toolTip.xml
Log:
RF-3550--<rich:toolTip> component "Details of usage" section rewriting
Modified: trunk/docs/userguide/en/src/main/docbook/included/toolTip.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/toolTip.xml 2008-06-03 22:45:33 UTC
(rev 8897)
+++ trunk/docs/userguide/en/src/main/docbook/included/toolTip.xml 2008-06-04 10:31:19 UTC
(rev 8898)
@@ -41,8 +41,8 @@
</tgroup>
</table>
- <section>
- <title>Creating the Component with a Page Tag</title>
+<section>
+ <title id="tab_ccpt">Creating the Component with a Page
Tag</title>
<para>To create the simplest variant of <emphasis
role="bold"><property><rich:toolTip></property></emphasis>
component on a page, use the following syntax:</para>
@@ -55,9 +55,9 @@
</rich:panel>
...
]]></programlisting>
- </section>
+</section>
- <section>
+<section>
<title>Creating the Component Dynamically Using Java</title>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -69,14 +69,51 @@
]]></programlisting>
</section>
-<section>
-<title>Details of Usage</title>
-<para>
-<property>toolTip</property> main area is a simple rectangle area with any
information inside. The content may be defined via
-<emphasis><property>"value"</property></emphasis>
attribute as text or via any nested content. When both are defined, the value is displayed
as text and nested content
-after the text. <property>toolTip</property> stretches if the content more
than the <property>toolTip</property> sizes.
-</para>
-<para>
+ <section>
+ <title>Details of Usage</title>
+ <para>
+ To specify text information, labeled on a
<property>tooltip</property>, use
<emphasis><property>"value"</property></emphasis>
attribute.
+ Images, links, buttons and other RichFaces components also may be put and
composed inside <property>tooltip</property>.
+ Text, specified between <property>tooltip's</property> start
and end tags will be rendered in browser as simple text.
+ <property>Tooltip</property> borders stretch to enclose it
contents.
+ </para>
+ <para>
+ There are three ways to attach a <property>tooltip</property> to
a page element.
+ One of them uses nesting (this way is shown on example <link
linkend="tab_ccpt">above</link>).
+ In such cases <property>tooltip</property> is attached to the
parent component by default.
+ </para>
+ <note>
+ <title>Note:</title>
+ <para>
+ It is recommended to specify
<emphasis><property>"id"</property></emphasis>
for parent page element to ensure <property>tooltip's</property> correct
work.
+ </para>
+ </note>
+ <note>
+ <title>Note:</title>
+ <para>
+ If parent component contains more than one child, it is recommended to
define <emphasis
role="bold"><property><rich:toolTip></property></emphasis>
the last one.
+ </para>
+ </note>
+ <para>
+ Second way uses the attribute
<emphasis><property>"for"</property></emphasis>.
In this case a <property>tooltip</property> may be defined separately from a
page element it is applied to.
+
<emphasis><property>"id"</property></emphasis>
for page element is necessary (see the example below).
+ </para>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<rich:panel id=”panelid”>
+…
+</rich:panel>
+<rich:toolTip value="This is a tooltip content" for=”panelid”/>
+...
+]]></programlisting>
+ <para>Here, the attribute
<emphasis><property>"for"</property></emphasis>
of a <emphasis role="bold">
+ <property><rich:toolTip></property>
+ </emphasis> component is required. Without it an example doesn't work
because HTML elements aren't presented in component tree built by facelets.
+ </para>
+
+ <para>
There is possibility to define a facet with the name "defaultContent".
This facet provides the default content to
display while the main content is loaded to a page in an Ajax mode. Thus when
<property>toolTip</property> called in an Ajax mode, it
appears with the content defined in the facet and when loading is completed, the content
is changed to a loaded one.
@@ -121,14 +158,7 @@
</imageobject>
</mediaobject>
</figure>
- <note>
- <title>Note:</title>
- <para>
- If you define the <emphasis
role="bold"><property><rich:toolTip></property></emphasis>
attached as the child to some componetns
- and except <emphasis
role="bold"><property><rich:toolTip></property></emphasis>
there are some other components inside
- it is recommended to define <emphasis
role="bold"><property><rich:toolTip></property></emphasis>
in code as last component.
- </para>
- </note>
+
<para>
By default, <property>toolTip</property> appears smart positioned. But as you
can see from the previous example, you
can define an appearance direction via the corresponding attribute
<emphasis><property>"direction"</property></emphasis>.
And also it's possible to define vertical and horizontal
@@ -140,12 +170,6 @@
the "delay" attribute (default=0) or after calling JS API function
show(). <property>toolTip</property> deactivation occurs after mouseout event
on the parent component (excepting the situation when the mouse is hovered onto the
<property>toolTip</property> itself) or after calling JS API function hide().
</para>
-<note>
-<title>Note:</title> <para>
- It is recommended to define parent component
<emphasis><property>"id"</property></emphasis>
for correction of <property>toolTip</property> work.
-</para>
-</note>
-
<para>The attribute
<emphasis><property>"for"</property></emphasis>
is used for defining the
<emphasis><property>"id"</property></emphasis>
of an element a toolTip should be attached to. Look at the example:
</para>
@@ -165,10 +189,7 @@
...
]]></programlisting>
- <para>Here, the attribute
<emphasis><property>"for"</property></emphasis>
of a <emphasis role="bold">
- <property><rich:toolTip></property>
- </emphasis> component is required. Without it an example doesn't work
because HTML elements aren't presented in component tree built by facelets.
- </para>
+
<para>
The
<emphasis><property>"mode"</property></emphasis>
attribute is provided you to control the way of data loading to
<property>toolTip</property>. It has following values:
@@ -209,9 +230,9 @@
</para></listitem>
</itemizedlist>
</para>
-</section>
+ </section>
- <section>
+<section>
<title>JavaScript API</title>
<table>
<title>JavaScript API</title>
Show replies by date