Author: atsebro
Date: 2009-06-12 13:52:45 -0400 (Fri, 12 Jun 2009)
New Revision: 14607
Modified:
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml
branches/community/3.3.X/ui/core/src/main/config/component/commandLink.xml
Log:
RF-7342: a4j:commandLink component description review
Modified:
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent
===================================================================
---
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent 2009-06-12
13:06:45 UTC (rev 14606)
+++
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/ajax_component_attributes.ent 2009-06-12
17:52:45 UTC (rev 14607)
@@ -80,7 +80,7 @@
<property >
<name>focus</name>
<classname>java.lang.String</classname>
- <description>id of element to set focus after request completed on client
side</description>
+ <description>ID of an element to set focus after request is completed on
client side</description>
</property>
<property >
<name>data</name>
Modified:
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent
===================================================================
---
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent 2009-06-12
13:06:45 UTC (rev 14606)
+++
branches/community/3.3.X/cdk/generator/src/main/resources/META-INF/schema/entities/html_anchor_attributes.ent 2009-06-12
17:52:45 UTC (rev 14607)
@@ -9,16 +9,19 @@
<classname>java.lang.String</classname>
<description> The character encoding of a resource designated by this
hyperlink</description>
</property>
+
<property>
<name>coords</name>
<classname>java.lang.String</classname>
- <description> This attribute specifies the position and shape on the
screen. The number and order of values depends on the shape being defined. Possible
combinations:
-
- * rect: left-x, top-y, right-x, bottom-y.
- * circle: center-x, center-y, radius. Note. When the radius value is
percentage value, user agents should calculate the final radius value based on the
associated object's width and height. The radius should be the smaller value of the
two.
- * poly: x1, y1, x2, y2, ..., xN, yN. The first x and y coordinate pair and
the last should be the same to close the polygon. When these coordinate values are not the
same, user agents should infer an additional coordinate pair to close the polygon.
-
- Coordinates are relative to the top, left corner of the object. All values
are lengths. All values are separated by commas
+ <description>
+ The attribute specifies shape and it position on the screen.
+ Possible values: "rect: left-x, top-y, right-x, bottom-y",
"circle: center-x, center-y, radius", "poly: x1, y1, x2, y2, ..., xN,
yN".
+ Notes:
+ a) when giving the radius value is percents, user agents should calculate the
final radius value in pixels based on the associated object's width and height;
+ b) the radius value should be smaller than center-x and center-y values;
+ c) for a polygon, the first and last coordinate pairs should have same x and y to
close the shape (x1=xN; y1=yN)
+ (when these coordinates are different, user agents should infer an additional
pair to close a polygon).
+ Coordinates are relative to the top left corner of an object. All values are
lengths. All values are comma separated.
</description>
</property>
Modified:
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml
===================================================================
---
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml 2009-06-12
13:06:45 UTC (rev 14606)
+++
branches/community/3.3.X/docs/userguide/en/src/main/docbook/included/commandLink.xml 2009-06-12
17:52:45 UTC (rev 14607)
@@ -36,16 +36,19 @@
</table>
<section>
- <title>Creating on a page</title>
- <para>To create the simplest variant on a page use the following
syntax:</para>
- <para>
+ <title>Creating the Component with a Page Tag</title>
+ <para>To create the simplest variant of the component on a page use the
following syntax:</para>
+ <para id="CL_example">
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
- <a4j:commandLink reRender="someData" action="#{bean.action1}"
value="Link"/>
-...]]></programlisting>
- </section>
- <section>
+ <programlisting role="XML"><![CDATA[<a4j:commandLink
value="Follow this link" reRender="some ID"
action="#{bean.action}" />]]></programlisting>
+ <para>
+ The example above creates a link on a page clicking on which causes an Ajax
form submit on the server, <code>"action"</code> method
performance,
+ and rendering the component with
<code>"someData"</code> ID after response comes back.
+ </para>
+ </section>
+
+ <section>
<title>Creating the Component Dynamically Using Java</title>
<para>
@@ -58,32 +61,37 @@
]]></programlisting>
</section>
<section>
- <title>Key attributes and ways of usage</title>
- <para>The <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
component is used in the same way as the <emphasis
role="bold"><property><h:commandLink></property></emphasis>
component, but with definition of the area that is updated after the response comes back
from the server.</para>
- <para>This definition of the component provides a link, and a click on the
link causes an Ajax form
- submit on the server, <code>"action1"</code> method
performance, and rendering of the component
- with <code>"someData"</code> id after the response
comes back from the server.</para>
- <tip>
- <title>Tip:</title>
- <para>The example in the "Creation on a page" section
generates the following HTML code:</para>
- <programlisting role="XML"><![CDATA[...
-<a href="#" onclick="A4J.AJAX.Submit(?"request parameters");
return false;">
- <span>Link</span>
-</a>
-...]]></programlisting>
- <para>If you click on the generated anchor the utility method
<code>A4J.AJAX.Submit()</code> is fired.
- The method performs an Ajax request as the Ajax support is built-in. It's not
necessary to add nested <emphasis
role="bold"><property><a4j:support
/></property></emphasis> to the <emphasis
role="bold"><property><a4j:commandLink
/></property></emphasis> component.</para>
- </tip>
-
- <!--<note>
- <title>Note:</title>
-
- </note>-->
- <para>Common JSF navigation could be performed after Ajax submit and partial
rendering, but Navigation Case must be defined as <emphasis
role="bold"><property><redirect/></property></emphasis>
in order to avoid problems with some browsers.</para>
- <para>As any Core Ajax component sending Ajax requests and processing server
responses <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
has all attributes described above (see <emphasis
role="bold"><property><a4j:support></property></emphasis>
<link linkend="support">chapter</link>) that provide the required
behavior of requests sending (delay, limitation of submit area and rendering,
etc.)</para>
+ <title>Details of Usage</title>
<para>
- Information about the
<emphasis><property>"process"</property></emphasis>
attribute usage you can find <link linkend="process">" Decide
what to process " </link> guide section.
+ The <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
component is used in the same way as JSF <emphasis
role="bold"><property><h:commandLink></property></emphasis>.
+ The difference is that in case of <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
the components to be updated should be specified.
</para>
+
+ <para>
+ The example <link linkend="CL_example">above</link>
generates the following HTML code:
+ </para>
+
+ <programlisting role="XML"><![CDATA[<a href="#"
onclick="A4J.AJAX.Submit(?"request parameters"); return
false;"><span>Follow this
link</span></a>]]></programlisting>
+
+ <para>
+ If you click on the generated anchor the utility method
<code>A4J.AJAX.Submit()</code> will be fired.
+ It's not necessary to add nested <emphasis
role="bold"><property><a4j:support></property></emphasis>
as the <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
has an Ajax support already built-in.
+ </para>
+
+ <note>
+ <title>Note:</title>
+ <para>
+ Common JSF navigation could be performed after Ajax submit and
partial rendering, but Navigation Case must be defined as <emphasis
role="bold"><property><redirect/></property></emphasis>
in order to avoid problems with some browsers.
+ </para>
+ </note>
+
+ <para>
+ As any Core Ajax component that sends Ajax requests and processes server
responses the <emphasis
role="bold"><property><a4j:commandLink></property></emphasis>
has all attributes that provide the required behavior of requests (delay, limitation of
submit area and rendering, etc.)
+ </para>
+
+ <para>
+ Information about the
<emphasis><property>"process"</property></emphasis>
attribute usage you can find "<link linkend="process">Decide what
to process</link>" guide section.
+ </para>
</section>
<section>
Modified: branches/community/3.3.X/ui/core/src/main/config/component/commandLink.xml
===================================================================
--- branches/community/3.3.X/ui/core/src/main/config/component/commandLink.xml 2009-06-12
13:06:45 UTC (rev 14606)
+++ branches/community/3.3.X/ui/core/src/main/config/component/commandLink.xml 2009-06-12
17:52:45 UTC (rev 14607)
@@ -71,7 +71,7 @@
&ui_command_attributes;
&html_events;
&html_universal_attributes;
- &html_anchor_attributes;
+ &html_anchor_attributes;
&html_style_attributes;
&ajax_component_attributes;
<property>
@@ -88,10 +88,10 @@
<classname>int</classname>
<description>Timeout ( in ms ) for request.</description>
</property>
- <property>
- <name>disabled</name>
- <classname>boolean</classname>
- <description>If true, disable this component on page.</description>
- </property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>Disables the component on page. Boolean.</description>
+ </property>
</component>
</components>
\ No newline at end of file