Author: cluts
Date: 2008-07-02 07:42:52 -0400 (Wed, 02 Jul 2008)
New Revision: 9365
Modified:
trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml
Log:
RF-3208 - added description for "attachTo" attribute; updated information for
"attached" attribute; updated code example for these two attributes.
Modified: trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2008-07-02 11:18:50
UTC (rev 9364)
+++ trunk/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2008-07-02 11:42:52
UTC (rev 9365)
@@ -85,23 +85,29 @@
<property><rich:dropDownMenu></property>
</emphasis>. </para>
- <para>If a value of the <emphasis>
- <property>"attached"</property>
- </emphasis> attribute is defined as "true",
- the component is attached to the parent component. An example is placed
below.</para>
+ <para>If
<emphasis><property>"attached"</property></emphasis>
value is "true" (default value),
+ component is attached to the parent component or to the component, which
+ <emphasis><property>"id"</property></emphasis>
is specified in the
+ <emphasis><property>"attachTo"</property></emphasis>
attribute.
+ An example is placed below.</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
+ <rich:contextMenu event="oncontextmenu" attachTo="pic1"
submitMode="none">
+ <rich:menuItem value="Zoom In" onclick="enlarge();"
id="zin"/>
+ <rich:menuItem value="Zoom Out" onclick="decrease();"
id="zout"/>
+ </rich:contextMenu>
<h:panelGrid columns="1" columnClasses="cent">
<h:panelGroup id="picture">
<h:graphicImage
value="/richfaces/jQuery/images/pic1.png" id="pic"/>
- <rich:contextMenu event="oncontextmenu"
attached="true" submitMode="none">
- <rich:menuItem value="Zoom In"
onclick="enlarge();" id="zin"></rich:menuItem>
- <rich:menuItem value="Zoom Out"
onclick="decrease();" id="zout"></rich:menuItem>
- </rich:contextMenu>
</h:panelGroup>
</h:panelGrid>
+ <h:panelGrid columns="1" columnClasses="cent">
+ <h:panelGroup id="picture1">
+ <h:graphicImage
value="/richfaces/jQuery/images/pic2.png" id="pic1"/>
+ </h:panelGroup>
+ </h:panelGrid>
...]]></programlisting>
<para>The <code>"enlarge()"</code> and
<code>"decrease()"</code> functions
definition is placed
@@ -126,13 +132,14 @@
<property><h:panelGroup></property>
</emphasis> component. The <emphasis role="bold">
<property><rich:contextMenu></property>
- </emphasis> component is defined as nested to <emphasis
role="bold">
+ </emphasis> component is not nested to <emphasis
role="bold">
<property><h:panelGroup></property>
- </emphasis> one and has a value of the<emphasis>
- <property>"attached"</property>
- </emphasis> attribute defined as "true". Thus,
- the context menu is attached to the parent component. The context menu has
two items to
- zoom in (zoom out) a picture by
<emphasis><property>"onclick"</property></emphasis>
event.
+ </emphasis> and has a value of the<emphasis>
+ <property>"attachTo"</property>
+ </emphasis> attribute defined as
<code>"pic1"</code>. Thus,
+ the context menu is attached to the component, which
+ <emphasis><property>"id"</property></emphasis>
is <code>"pic1"</code>.
+ The context menu has two items to zoom in (zoom out) a picture by
<emphasis><property>"onclick"</property></emphasis>
event.
For earch item corresponding JavaScript function is defined to provide
necessary action
as a result of the clicking on it. For the menu is defined an
<emphasis>
<property>"oncontextmenu"</property>
Show replies by date