Author: atsebro
Date: 2009-08-07 12:08:15 -0400 (Fri, 07 Aug 2009)
New Revision: 15134
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml
Log:
RF-7588: rich:contextMenu component description review
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-08-07
15:58:26 UTC (rev 15133)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/contextMenu.xml 2009-08-07
16:08:15 UTC (rev 15134)
@@ -42,9 +42,7 @@
<section>
<title>Creating the Component with a Page Tag</title>
<para>To create the simplest variant on a page use the following
syntax:</para>
- <programlisting role="XML"><![CDATA[...
-<rich:contextMenu event="oncontextmenu" attached="true">
-...]]></programlisting>
+ <programlisting role="XML"><![CDATA[<rich:contextMenu
/>]]></programlisting>
</section>
<section>
@@ -68,33 +66,20 @@
</emphasis> event by default to call a context menu by clicking on the
right mouse
button.</para>
- <para><property>
- <link
linkend="menuGroup"><rich:menuGroup></link>
- </property>, <property>
- <link
linkend="menuItem"><rich:menuItem></link>
- </property> and <property>
- <link
linkend="menuSeparator"><rich:menuSeparator></link>
- </property> components are used as nested elements for <emphasis
role="bold">
- <property><rich:contextMenu></property>
- </emphasis>in the same way as for <emphasis
role="bold">
- <property><rich:dropDownMenu></property>
- </emphasis>. </para>
- <para>
- By default, the <emphasis
role="bold"><property><rich:contextMenu></property></emphasis>
completely disables
- right mouse click on a page in the context menu area only.
- But if you want to disable browser's context menu completely you
should set the
-
<emphasis><property>"disableDefaultMenu"</property></emphasis>
attribute value to "true".
- </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.
- </para>
<para>
- <emphasis role="bold">Example:</emphasis>
+ <property><link
linkend="menuGroup"><rich:menuGroup></link></property>,
<property><link
linkend="menuItem"><rich:menuItem></link></property>
and <property><link
linkend="menuSeparator"><rich:menuSeparator></link></property>
components
+ can be used as nested elements for <emphasis
role="bold"><property><rich:contextMenu></property></emphasis>in
the same way as for <emphasis
role="bold"><property><rich:dropDownMenu></property></emphasis>.
</para>
- <programlisting role="XML"><![CDATA[...
-<rich:contextMenu event="oncontextmenu" attachTo="pic1"
submitMode="none">
+ <para>
+ By default, the <emphasis
role="bold"><property><rich:contextMenu></property></emphasis>
disables right mouse click on a page in the context menu area only.
+ But if you want to disable browser's context menu completely you
should set the
<emphasis><property>"disableDefaultMenu"</property></emphasis>
attribute value to "true".
+ </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:
+ </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>
@@ -107,13 +92,11 @@
<h:panelGroup id="picture1">
<h:graphicImage value="/richfaces/jQuery/images/pic2.png"
id="pic1"/>
</h:panelGroup>
-</h:panelGrid>
-...]]></programlisting>
+</h:panelGrid>]]></programlisting>
<para>The <code>"enlarge()"</code> and
<code>"decrease()"</code> functions
definition is placed
below.</para>
- <programlisting role="JAVA"><![CDATA[...
-<script type="text/javascript">
+ <programlisting role="JAVA"><![CDATA[<script
type="text/javascript">
function enlarge(){
document.getElementById('pic').width=document.getElementById('pic').width*1.1;
document.getElementById('pic').height=document.getElementById('pic').height*1.1;
@@ -122,8 +105,7 @@
document.getElementById('pic').width=document.getElementById('pic').width*0.9;
document.getElementById('pic').height=document.getElementById('pic').height*0.9;
}
-</script>
-...]]></programlisting>
+</script>]]></programlisting>
<para>In the example a picture zooming possibility with <emphasis
role="bold">
<property><rich:contextMenu></property>
@@ -262,23 +244,19 @@
<itemizedlist>
<listitem>
- <para><code>Server</code> (default)</para>
+ <para><code>Server</code> — default value, uses
regular form submition request;</para>
</listitem>
</itemizedlist>
- <para>Regular form submition request is used</para>
-
<itemizedlist>
<listitem>
- <para><code>Ajax</code></para>
+ <para><code>Ajax</code> — Ajax submission is used for
switching;</para>
</listitem>
</itemizedlist>
- <para>Ajax submission is used for switching</para>
-
<itemizedlist>
<listitem>
- <para><code>None</code></para>
+ <para><code>None</code> — neither
<code>Server</code> nor <code>Ajax</code> is used.</para>
</listitem>
</itemizedlist>
@@ -575,9 +553,6 @@
</emphasis> components on a page using CSS, it's enough to create
classes with the
same names (possible classes could be found in the tables <link
linkend="cMC"> above</link>) and define necessary properties in them.
</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="CSS"><![CDATA[...
.rich-menu-item{
font-style:italic;
@@ -601,9 +576,6 @@
<property><rich:contextMenu></property></emphasis>
component. In this case you should create own style classes and use them in corresponding
<emphasis role="bold"
<property><rich:contextMenu></property></emphasis>
<emphasis><property>styleClass</property></emphasis> attributes.
An example is placed below:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
<programlisting role="CSS"><![CDATA[...
.myClass{
font-weight:bold;
@@ -611,10 +583,7 @@
...]]></programlisting>
<para>The
<emphasis><property>"rowClasses"</property></emphasis>
attribute for <emphasis role="bold"
<property><h:panelGrid>
</property></emphasis> is defined as it's shown in the example
below:</para>
-
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+
<programlisting role="XML"><![CDATA[<h:panelGrid ...
rowClasses="myClass"/>
]]></programlisting>
@@ -638,7 +607,7 @@
<section>
<title>Relevant Resources Links</title>
<para>
- Visit the <ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu...
page</ulink> at RichFaces LiveDemo fro examples of component usage and their
sources.
+ Visit the <ulink
url="http://livedemo.exadel.com/richfaces-demo/richfaces/contextMenu...
page</ulink> at RichFaces LiveDemo for examples of component usage and their
sources.
</para>
</section>