[richfaces-svn-commits] JBoss Rich Faces SVN: r4567 - branches/3.1.x/docs/userguide/en/src/main/docbook/included.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Thu Dec 6 13:34:11 EST 2007
Author: vkorluzhenko
Date: 2007-12-06 13:34:11 -0500 (Thu, 06 Dec 2007)
New Revision: 4567
Added:
branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.desc.xml
branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.xml
Log:
http://jira.jboss.com/jira/browse/RF-1537 - added description for component
Added: branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.desc.xml
===================================================================
--- branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.desc.xml (rev 0)
+++ branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.desc.xml 2007-12-06 18:34:11 UTC (rev 4567)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>componentControl</keyword>
+ </keywordset>
+ </sectioninfo>
+ <section>
+ <title>Description</title>
+ <para>The <emphasis role="bold">
+ <property><rich:componentControl></property>
+ </emphasis> component allows to manage other components or operation on other components
+ via API.</para>
+
+ </section>
+ <!--section>
+ <title>Key Features</title>
+ <itemizedlist>
+ <listitem>Highly customizable look and feel</listitem>
+ <listitem>Popup representation</listitem>
+ <listitem>Disablement support</listitem>
+ <listitem>Smart and user-defined positioning</listitem>
+ <listitem>Cells customization</listitem>
+ <listitem>Macro substitution based on tool bars customization</listitem>
+ </itemizedlist>
+ </section-->
+</section>
Added: branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.xml
===================================================================
--- branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.xml (rev 0)
+++ branches/3.1.x/docs/userguide/en/src/main/docbook/included/componentControl.xml 2007-12-06 18:34:11 UTC (rev 4567)
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section>
+ <sectioninfo>
+ <keywordset>
+ <keyword>componentControl</keyword>
+ </keywordset>
+ </sectioninfo>
+
+ <table>
+ <title>Component identification parameters</title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Name</entry>
+
+ <entry>Value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>component-type</entry>
+
+ <entry>org.richfaces.ComponentControl</entry>
+ </row>
+
+ <row>
+ <entry>component-class</entry>
+
+ <entry>org.richfaces.component.html.HtmlComponentControl</entry>
+ </row>
+
+ <row>
+ <entry>component-family</entry>
+
+ <entry>org.richfaces.ComponentControl</entry>
+ </row>
+
+ <row>
+ <entry>renderer-type</entry>
+
+ <entry>org.richfaces.ComponentControlRenderer</entry>
+ </row>
+
+ <row>
+ <entry>tag-class</entry>
+
+ <entry>org.richfaces.taglib.ComponentControlTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Creating the Component with a Page Tag</title>
+
+ <para>To create the simplest variant on a page use the following syntax:</para>
+
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:componentControl attachTo="doExpandCalendarID" for="ccCalendarID" event="onclick" operation="doExpand" />
+...]]></programlisting>
+ </section>
+
+ <section>
+ <title>Creating the Component Dynamically Using Java</title>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlComponentControl;
+...
+HtmlComponentControl myCalendar = new HtmlComponentControl();
+...
+]]></programlisting>
+ </section>
+
+ <section>
+ <title>Details of Usage</title>
+ <para>There are three ways to attach the <emphasis role="bold">
+ <property><rich:componentControl></property>
+ </emphasis> to another component.</para>
+ <itemizedlist>
+ <listitem>Defining a name of a function that is generated. An "event"
+ argument is passed to this function.</listitem>
+ </itemizedlist>
+ <para>An example is placed below:</para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:componentControl name="ffunction" for="comp_ID" operation="show"/>
+...
+]]></programlisting>
+ <para>According to this code a function with name <property>"call"</property>
+ is generated. It could be used in JavaScript code to trigger an operation on the target
+ component with defined id=<property>"comp_ID"</property>.</para>
+ <para>The generated function is shown below:</para>
+ <programlisting role="JAVA"><![CDATA[function ffunction (event) {
+}
+]]></programlisting>
+ <itemizedlist>
+ <listitem>Attaching to a parent component (usage is similar to <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> component)</listitem>
+ </itemizedlist>
+ <para>An example is placed below:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:modalPanel id="ccModalPanelID" onshow="alert(event.parameters.show)" onhide="alert(event.parameters.hide)">
+ ...
+ </rich:modalPanel>
+ <h:commandButton value="Show Modal Panel">
+ <rich:componentControl for="ccModalPanelID" event="onclick" disableDefault="true" operation="show" params="show:'componentControl work(show)'" />
+ </h:commandButton>
+...
+]]></programlisting>
+ <para>In the example is shown a possibility to manage <emphasis role="bold">
+ <property><rich:modalpanel></property>
+ </emphasis> component via <emphasis role="bold">
+ <property><h:commandButton></property>
+ </emphasis>. The <emphasis>
+ <property>"for"</property>
+ </emphasis> attribute contains value of an Id of <emphasis role="bold">
+ <property><rich:modalpanel></property>
+ </emphasis> component. The <emphasis>
+ <property>"operation"</property>
+ </emphasis> attribute contains a name of JavaScript API function. The <emphasis>
+ <property>"disableDefault"</property>
+ </emphasis> attribute with <property>"true"</property> value is used instead
+ of <property>onclick="return false;"</property> attribute for <emphasis role="bold">
+ <property><h:commandButton></property>
+ </emphasis> to avoid a problem with form submit and <property>modalPanel</property> showing.</para>
+ <itemizedlist>
+ <listitem>Attaching with <emphasis>
+ <property>"attachTo"</property>
+ </emphasis> attribute</listitem>
+ </itemizedlist>
+ <para>An example is placed below:</para>
+
+ <programlisting role="XML"><![CDATA[...
+ <rich:calendar popup="#{componentControl.calendarPopup}" id="ccCalendarID" />
+ ...
+ <f:verbatim>
+ <a href="#" id="doExpandCalendarID">Calendar (nextYear)</a>
+ </f:verbatim>
+ <rich:componentControl attachTo="doExpandCalendarID" for="ccCalendarID" event="onclick" disableDefault="true" operation="nextYear" />
+...
+]]></programlisting>
+ <para>In the example is shown a possibility to manage the <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component. The <emphasis>
+ <property>"attachTo"</property>
+ </emphasis> attribute contais a value of an Id of <property><a></property> tag.
+ The <emphasis>
+ <property>"for"</property>
+ </emphasis> attribute contains value of an Id of <emphasis role="bold">
+ <property><rich:calendar></property>
+ </emphasis> component. The <emphasis>
+ <property>"operation"</property>
+ </emphasis> attribute contains a name of JavaScript API function. Thus, clicking on the link
+ represents the next year on the calendar.</para>
+ <!--para>One more example of <emphasis role="bold">
+ <property><rich:componentControl></property>
+ </emphasis> usage is placed below:</para>
+ <programlisting role="XML"><![CDATA[...
+ <rich:panelMenu id="ccContextMenuPanelMenuID">
+ <h:outputText value="click text" />
+ </rich:panelMenu>
+ <rich:contextMenu id="ccContextMenuID" submitMode="ajax">
+ <rich:menuItem icon="/pics/header.png" value="tab1" reRender="cmInfoID">
+ <f:param name="cmdParam" value="menu" />
+ </rich:menuItem>
+ <rich:menuSeparator />
+ <rich:menuItem icon="/pics/info.gif" value="a" reRender="cmInfoID">
+ <f:param name="cmdParam" value="a" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value=" b" reRender="cmInfoID">
+ <f:param name="cmdParam" value="b" />
+ </rich:menuItem>
+ <rich:menuItem icon="/pics/info.gif" value="c" reRender="cmInfoID">
+ <f:param name="cmdParam" value="c" />
+ </rich:menuItem>
+ </rich:contextMenu>
+ <rich:componentControl event="oncontextmenu" attachTo="ccContextMenuPanelMenuID" for="ccContextMenuID" disableDefault="true" operation="doShow" />
+...
+]]></programlisting-->
+
+ </section>
+
+</section>
More information about the richfaces-svn-commits
mailing list