Author: vkukharchuk
Date: 2007-05-03 09:55:52 -0400 (Thu, 03 May 2007)
New Revision: 163
Modified:
trunk/docs/userguide/en/included/htmlCommandLink.xml
trunk/docs/userguide/en/included/include.xml
trunk/docs/userguide/en/included/jsFunction.xml
trunk/docs/userguide/en/included/loadScript.xml
trunk/docs/userguide/en/included/log.xml
trunk/docs/userguide/en/included/mediaOutput.xml
trunk/docs/userguide/en/included/outputPanel.xml
trunk/docs/userguide/en/included/page.xml
trunk/docs/userguide/en/included/poll.xml
trunk/docs/userguide/en/included/region.xml
trunk/docs/userguide/en/included/repeat.xml
trunk/docs/userguide/en/included/status.xml
trunk/docs/userguide/en/included/support.xml
trunk/docs/userguide/en/modules/a4jUGstart.xml
Log:
Modified: trunk/docs/userguide/en/included/htmlCommandLink.xml
===================================================================
--- trunk/docs/userguide/en/included/htmlCommandLink.xml 2007-05-03 12:51:31 UTC (rev
162)
+++ trunk/docs/userguide/en/included/htmlCommandLink.xml 2007-05-03 13:55:52 UTC (rev
163)
@@ -41,7 +41,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
javax.faces.component.html.HtmlCommandLink;
...
-HtmlCommandLink myForm = new javax.faces.component.html.HtmlCommandLink();
+HtmlCommandLink myForm = new HtmlCommandLink();
...
]]></programlisting>
</section>
@@ -51,12 +51,11 @@
<property><f:param></property>
</emphasis> elements are always rendered and it doesn't depend on links
rendering on the initial page. It solves the problem with invalid links that weren't
rendered on a page immediately, but after some AJAX request.</para>
<programlisting role="XML"><![CDATA[<a4j:form>
- ...
- <a4j:htmlComandLink action="action" value="link"
-rendered="#{bean.rendered}">
-<f:param ...>
- <a4j:htmlComandLink>
- ...
+ ...
+ <a4j:htmlComandLink action="action" value="link"
rendered="#{bean.rendered}">
+ <f:param ...>
+ <a4j:htmlComandLink>
+ ...
</a4j:form>
]]></programlisting>
<para>In this example <emphasis role="bold">
Modified: trunk/docs/userguide/en/included/include.xml
===================================================================
--- trunk/docs/userguide/en/included/include.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/include.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -58,7 +58,7 @@
<section>
<title>Dynamical creation of a component from Java code</title>
<programlisting role="XML"><![CDATA[<a4j:outputPanel
ajaxRendered="true">
- <a4j:include viewId="/pages/include/first.xhtml"/>
+ <a4j:include viewId="/pages/include/first.xhtml"/>
</a4j:outputPanel>
]]></programlisting>
<para>If <emphasis role="bold">
Modified: trunk/docs/userguide/en/included/jsFunction.xml
===================================================================
--- trunk/docs/userguide/en/included/jsFunction.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/jsFunction.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -35,15 +35,15 @@
<title>Creating on a page</title>
<para>Simple component definition example:</para>
<programlisting role="XML"><![CDATA[...
- <head>
- <script>
- <!--There is some script named "myScript" that uses parameters which
will be taken from server-->
- </script>
- </head>
- <body>
- ...
- <a4j:jsFunction data="#{bean.someProperty}" name="callScript"
oncomplete="myScript(data.subProperty1, data.subProperty2)"/>
- ...]]>
+<head>
+ <script>
+ <!--There is some script named "myScript" that uses parameters which will
be taken from server-->
+ </script>
+</head>
+<body>
+...
+<a4j:jsFunction data="#{bean.someProperty}" name="callScript"
oncomplete="myScript(data.subProperty1, data.subProperty2)"/>
+...]]>
</programlisting>
<para>
The script "myScript" will be called after
<property>bean.someProperty</property> data
@@ -54,7 +54,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlAjaxFunction;
...
-AjaxFunction myFunction = new HtmlAjaxFunction();
+HtmlAjaxFunction myFunction = new HtmlAjaxFunction();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/included/loadScript.xml
===================================================================
--- trunk/docs/userguide/en/included/loadScript.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/loadScript.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -41,7 +41,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlLoadScript;
...
-HtmlLoadScript myScript = new org.ajax4jsf.ajax.html.HtmlLoadScript();
+HtmlLoadScript myScript = new HtmlLoadScript();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/included/log.xml
===================================================================
--- trunk/docs/userguide/en/included/log.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/log.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -40,7 +40,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.AjaxLog;
...
-AjaxLog myLog = new org.ajax4jsf.ajax.html.AjaxLog();
+AjaxLog myLog = new AjaxLog();
...]]></programlisting>
</section>
<section>
Modified: trunk/docs/userguide/en/included/mediaOutput.xml
===================================================================
--- trunk/docs/userguide/en/included/mediaOutput.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/mediaOutput.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -43,10 +43,11 @@
]]></programlisting>
<para>Here is the content of paintData that is a bean containing output
data</para>
<programlisting role="JAVA"><![CDATA[package demo;
+
public class PaintData implements Serializable{
private static final long serialVersionUID = 1L;
- Integer Width=100;
- Integer Height=50;
+ Integer width=100;
+ Integer weight=50;
...
]]></programlisting>
<para>The Paint method of the paintBean class is a method transmitting graphical
data into output stream.</para>
@@ -59,7 +60,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.MediaOutput;
...
-MediaOutput myMedia = new org.ajax4jsf.ajax.html.MediaOutput ();
+MediaOutput myMedia = new MediaOutput ();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/included/outputPanel.xml
===================================================================
--- trunk/docs/userguide/en/included/outputPanel.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/outputPanel.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -65,7 +65,7 @@
...
<a4j:outputPanel id="mypanel">
<h:panelGrid rendered="#{not empty foo.bar}">
-...
+ ...
</h:panelGrid>
</a4j:outputPanel>
]]></programlisting>
@@ -102,7 +102,7 @@
...
<a4j:outputPanel layout="none">
<h:panelGrid id="mypanel" rendered="#{not empty foo.bar}">
-...
+ ...
</h:panelGrid>
</a4j:outputPanel>
]]></programlisting>
Modified: trunk/docs/userguide/en/included/page.xml
===================================================================
--- trunk/docs/userguide/en/included/page.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/page.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -59,7 +59,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.components.Page;
...
-Page myPage = new org.ajax4jsf.components.Page();
+Page myPage = new Page();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/included/poll.xml
===================================================================
--- trunk/docs/userguide/en/included/poll.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/poll.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -44,10 +44,9 @@
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
- <programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.components.Page;
-import org.ajax4jsf.ajax.html.AjaxPoll;
+ <programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.AjaxPoll;
...
-AjaxPoll myPoll = new org.ajax4jsf.ajax.html.AjaxPoll();
+AjaxPoll myPoll = new AjaxPoll();
...
]]></programlisting>
</section>
Modified: trunk/docs/userguide/en/included/region.xml
===================================================================
--- trunk/docs/userguide/en/included/region.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/region.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -35,13 +35,15 @@
<title>Creating on a page</title>
<para>Here is an example of the region decoding on a page. </para>
<programlisting role="XML"><![CDATA[<a4j:region>
-<!--..Some content that will be decoded on server after Ajax request.-->
-<a4j:region>]]></programlisting>
+ <!--..Some content that will be decoded on server after Ajax request.-->
+</a4j:region>]]></programlisting>
</section>
<section>
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlAjaxRegion;
-HtmlAjaxRegion = newRegion new HtmlAjaxRegion();
+...
+HtmlAjaxRegion newRegion = new HtmlAjaxRegion();
+...
]]></programlisting>
</section>
<section>
@@ -60,10 +62,10 @@
</itemizedlist></para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:form
id="form1">
- <a4j:region>
- <a4j:commandLink reRender="someID" value="Link"
id="link1"/>
- <!--..Some content that will be decoded on server after Ajax request.-->
- </a4j:region>
+ <a4j:region>
+ <a4j:commandLink reRender="someID" value="Link"
id="link1"/>
+ <!--..Some content that will be decoded on server after Ajax request.-->
+ </a4j:region>
<h:form>]]></programlisting>
<para>Hence, the <emphasis role="bold">
<property><a4j:commandLink></property>
@@ -71,12 +73,12 @@
<para>The regions could be nested in any order, the server picks out and
decodes only the region, which contains a particular component that sends a
request.</para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<a4j:region>
-<a4j:commandLink reRender="someID" value="Link"
id="link1"/>
-<a4j:region>
-<a4j:commandLink reRender="someID" value="Link"
id="link2"/>
-<!--..Some content that will be decoded on server after Ajax request.-->
-</a4j:region >
-<!--..Some content that will be decoded on server after Ajax request.-->
+ <a4j:commandLink reRender="someID" value="Link"
id="link1"/>
+ <a4j:region>
+ <a4j:commandLink reRender="someID" value="Link"
id="link2"/>
+ <!--..Some content that will be decoded on server after Ajax request.-->
+ </a4j:region >
+ <!--..Some content that will be decoded on server after Ajax request.-->
</a4j:region >]]></programlisting>
<para>Therefore, the external region is decoded for the
"link1" and the internal one is decoded for the
"link2".</para>
<para>Ajax4jsf allows setting Ajax responses rendering directly basing on
component tree nodes without referring to the JSP (XHTML) page code. It could be defined
by selfRendered attribute setting to "true" on <emphasis
role="bold">
@@ -87,8 +89,8 @@
</para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<a4j:region selfRendered
="true">
-<a4j:commandLink reRender="someID" value="Link"
id="link1"/>
-<!--..Some content with HTML used ("br" ,"h1" and other tags
used)-->
+ <a4j:commandLink reRender="someID" value="Link"
id="link1"/>
+ <!--..Some content with HTML used ("br" ,"h1" and other tags
used)-->
</a4j:region >]]></programlisting>
<para>In this case, the processing is quicker and going on without referring to
a page code, but the HTML code that isn't saved in a component tree could be lost.
Thus this optimization should be very carefully performed and a usage of the additional
components ajax4jsf (<emphasis
role="bold"><property><a4j:outputPanel></property></emphasis>)
is required. </para>
<para>The processing could be also accelerated if a region decoded for the
processing passes straight away into Encode. But to update some data out of the region or
on another region, use the <emphasis role="italic">
@@ -96,16 +98,16 @@
</emphasis>
attribute set to "false" ("true on default") to
change this behaviour.</para>
<para><emphasis
role="bold">Example:</emphasis></para>
- <programlisting role="XML"><![CDATA[<a4j:region
renderRegionOnly ="true">
-<a4j:commandLink reRender="someID2" value="Link1"
id="link1"/>
-<h:panelGroup id="someId1">
-<h:panelGroup>
-</a4j:region >
+ <programlisting role="XML"><![CDATA[<a4j:region
renderRegionOnly="true">
+ <a4j:commandLink reRender="someID2" value="Link1"
id="link1"/>
+ <h:panelGroup id="someId1">
+ </h:panelGroup>
+</a4j:region>
<a4j:region renderRegionOnly="false">
-<a4j:commandLink reRender="someID1" value="Link2"
id="link2"/>
-<h:panelGroup id="someId1">
-<h:panelGroup>
-</a4j:region >]]></programlisting>
+ <a4j:commandLink reRender="someID1" value="Link2"
id="link2"/>
+ <h:panelGroup id="someId1">
+ </h:panelGroup>
+</a4j:region>]]></programlisting>
<para>This example shows that one of the regions is decoded when a link is used
inside. Nevertheless,
if after processing the "link1" is clicked, the first region passes
into Encode as a root
region and encode performance time is reduced. This optimization doesn't
allow data update out of the
Modified: trunk/docs/userguide/en/included/repeat.xml
===================================================================
--- trunk/docs/userguide/en/included/repeat.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/repeat.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -37,7 +37,7 @@
<property>"facelets"</property>
</emphasis> component:</para>
<programlisting role="XML"><![CDATA[<a4j:repeat
id="detail" value="#{bean.props}" var="detail">
- <h:outputText value="#{detail.someProperty}">
+ <h:outputText value="#{detail.someProperty}"/>
</a4j:repeat>]]></programlisting>
<para>The output is generated according to a collection contained in
<emphasis role="italic">
<property>"bean.props"</property>
Modified: trunk/docs/userguide/en/included/status.xml
===================================================================
--- trunk/docs/userguide/en/included/status.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/status.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -47,12 +47,12 @@
<listitem>
With "Start"/"Stop" facets definition:
<programlisting role="XML"><![CDATA[<a4j:status
for="stat2">
- <f:facet name="start">
- <h:graphicImage value="ajax_process.gif" />
- </f:facet>
- <f:facet name="stop">
- <h:graphicImage value="ajax_stoped.gif" />
- </f:facet>
+ <f:facet name="start">
+ <h:graphicImage value="ajax_process.gif" />
+ </f:facet>
+ <f:facet name="stop">
+ <h:graphicImage value="ajax_stoped.gif" />
+ </f:facet>
</a4j:status>]]></programlisting>
<para>In this case, the elements are generated for each status and
correspond the facets content.</para>
</listitem>
@@ -62,7 +62,7 @@
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlAjaxStatus;
...
-HtmlAjaxStatus myStatus = new org.ajax4jsf.ajax.html.HtmlAjaxStatus();
+HtmlAjaxStatus myStatus = new HtmlAjaxStatus();
...]]></programlisting>
</section>
<section>
Modified: trunk/docs/userguide/en/included/support.xml
===================================================================
--- trunk/docs/userguide/en/included/support.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/included/support.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -40,7 +40,7 @@
from the server.</para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:inputText
value="#{bean.text}">
-<a4j:support event="onkeyup" reRender="repeater"/>
+ <a4j:support event="onkeyup" reRender="repeater"/>
</h:inputText>
<h:outputText id="repeater"
value="#{bean.text}"/>]]></programlisting>
<para>On every keyup event generated by an input field, form is submitted on
the server via Ajax and
@@ -50,7 +50,8 @@
<section>
<title>Dynamical creation of a component from Java code</title>
<programlisting role="JAVA"><![CDATA[import
org.ajax4jsf.ajax.html.HtmlAjaxSupport;
-HtmlAjaxSupport mySupport = new org.ajax4jsf.ajax.html.HtmlAjaxSupport
();>]]></programlisting>
+...
+HtmlAjaxSupport mySupport = new HtmlAjaxSupport();>]]></programlisting>
</section>
<section>
<title>Key attributes and ways of usage</title>
@@ -79,13 +80,11 @@
<property>"oncomplete"</property></emphasis>
attributes the component allows using JavaScript before (for request sending conditions
checking) and after AJAX response processing termination (for performance of user-defined
activities on the client) </para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:selectOneMenu
value="#{bean.text}">
-<f:selectItem itemValue="First Item " itemLabel="First Item"/>
-<f:selectItem itemValue=" Second Item " itemLabel="Second
Item"/>
-<f:selectItem itemValue=" Third Item " itemLabel="Third
Item"/>
- <a4j:support event="onblur" reRender="panel"
- onsubmit="if(!confirm('Are you sure to change the option ?'))
- {form.reset(); return false;}"
- oncomplete="alert('Value succesfully stored')"/>
+ <f:selectItem itemValue="First Item " itemLabel="First
Item"/>
+ <f:selectItem itemValue=" Second Item " itemLabel="Second
Item"/>
+ <f:selectItem itemValue=" Third Item " itemLabel="Third
Item"/>
+ <a4j:support event="onblur" reRender="panel"
onsubmit="if(!confirm('Are you sure to change the option ?'))
+ {form.reset(); return false;}" oncomplete="alert('Value succesfully
stored')"/>
</h:selectOneMenu>]]></programlisting>
<para>In example there is the condition checking (confirm) is used before
request sending and message printing after the request processing is over. </para>
<para>The components allows different AJAX request managing ways for its
various optimization in particular conditions such as:
@@ -100,22 +99,21 @@
</itemizedlist></para>
<para><emphasis role="bold">Example
1:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:form>
-<h:inputText value="#{person.name}" >
-<a4j:support event="onkeyup" reRender="test"
ajaxSingle="true"/>
-</h:inputText>
-<h:inputText value="#{person.middleName}"/>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test"
ajaxSingle="true"/>
+ </h:inputText>
+ <h:inputText value="#{person.middleName}"/>
</form>]]></programlisting>
<para>In this example the request contains only the input component causes the
request generation, not all the components contained on a form, because of
"ajaxSingle=true" usage. </para>
<para><emphasis role="bold">Example
2:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:form>
-<a4j:outputPanel ajaxRendered="true">
-<h:messages/>
-</a4j:outputPanel>
-<h:inputText value="#{person.name}">
-<a4j:support event="onkeyup" reRender="test"
- limitToList="true"/>
-</h:inputText>
-<h:outputText value="#{person.name}" id="test"/>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:messages/>
+ </a4j:outputPanel>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test"
limitToList="true"/>
+ </h:inputText>
+ <h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
<para>In this example the component "h:messages" is always
updated (as it capturing all AJAX requests, located in ajaxRendered <emphasis
role="bold"><property><a4j:outputPanel></property></emphasis>),
except the case when a response is sent from the input component from the example. On
sending this component marks that updating area is limited to the defined in it
components, it means that on its usage with
"limitToList"="true" the only component updated is
the one with "d"="test".</para>
<itemizedlist>
@@ -133,11 +131,11 @@
</para>
<para><emphasis
role="bold">Example:</emphasis></para>
<programlisting role="XML"><![CDATA[<h:form>
-<h:inputText value="#{person.name}">
- <a4j:support event="onkeyup" reRender="test"
- requestDelay="1000" ignoreDupResponces="true"
eventsQueue="myQueue"/>
-</h:inputText>
-<h:outputText value="#{person.name}" id="test"/>
+ <h:inputText value="#{person.name}">
+ <a4j:support event="onkeyup" reRender="test"
+ requestDelay="1000" ignoreDupResponces="true"
eventsQueue="myQueue"/>
+ </h:inputText>
+ <h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
<para>This example clearly shows mentioned above attributes. If quick
typing in a text field happens, every next requests sending is delayed for a second and
requests quantity is reduced. The requests are kept in the queue
"myQueue" till its the sending.
Moreover, if the next request is already sent, the rerendering after the previous request
is banned, and
Modified: trunk/docs/userguide/en/modules/a4jUGstart.xml
===================================================================
--- trunk/docs/userguide/en/modules/a4jUGstart.xml 2007-05-03 12:51:31 UTC (rev 162)
+++ trunk/docs/userguide/en/modules/a4jUGstart.xml 2007-05-03 13:55:52 UTC (rev 163)
@@ -103,8 +103,7 @@
<?dbhtml filename="JSPPage.html"?>
<title>JSP Page</title>
<para>Here is the necessary page (echo.jsp):</para>
- <programlisting role="JSP"> <![CDATA[
- <%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax"
prefix="a4j"%>
+ <programlisting role="JSP"> <![CDATA[<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
<html>