JBoss Rich Faces SVN: r2247 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: keepAlive and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-14 09:46:50 -0400 (Tue, 14 Aug 2007)
New Revision: 2247
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/bundle/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/style/usage.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-524
Language correction in richfaces-demo for aj4 component
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/bundle/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/bundle/usage.xhtml 2007-08-14 13:31:39 UTC (rev 2246)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/bundle/usage.xhtml 2007-08-14 13:46:50 UTC (rev 2247)
@@ -9,16 +9,16 @@
<ui:define name="sample">
<p>a4j:loadBundle allows to use reference to bundle messages during the Ajax re-rendering.
- a4j:loadBundle is a substitute for the f:loadBundle in JSF 1.1 which is not a JSF component originally.
- f:loadBundle is a jsp tag that load the bundle messages into the request scope when page is
+ a4j:loadBundle is a substitution for the f:loadBundle in JSF 1.1 which is not originally a JSF component.
+ f:loadBundle is a jsp tag that loads the bundle messages into the request scope when page is
rendered. As soon as each Ajax request works in own request scope, the bundles loaded with
f:loadBundle are unavailable.
</p>
<p>Instead of f:loadBundle that might be located anywhere on the page, the a4j:loadBundle
- should be declared inside the f:view (this does not matter in case on using Facelets)
+ should be declared inside the f:view (this does not matter in case of using Facelets)
</p>
- <p>JSF 1.2 introduces the bundle registered in the faces-config.xml. This fixed the problem
+ <p>JSF 1.2 introduces the bundle registered in the faces-config.xml. This fixes the problem
with f:loadBundle. Therefore, you can use this JSF 1.2 way to declare your bundles.
</p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml 2007-08-14 13:31:39 UTC (rev 2246)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/keepAlive/usage.xhtml 2007-08-14 13:46:50 UTC (rev 2247)
@@ -12,23 +12,22 @@
a4j:keepAlive extends the live cycle for request scope beans. In general, each Ajax
request works inside the own request scope. Therefore, the state of the component
tree rendered based on the variable from one request scope does not correspond to the
- state of the same tree processed during the next Ajax request. This causes on of
- the most popular problem when the form elements (buttons or fields) appear on
- the page after the previous Ajax response will not processed during after that if
- 'rendered' attribute reference to the request scope variable.
+ state of the same tree processed during the next Ajax request. This causes one of
+ the most widespread problem when the form elements (buttons or fields) can't be correctly proceeded with Ajax if the 'rendered' attribute is mapped to the request scoped variable
+
</p>
- <p>Using the session scope variables solved the problem mentioned above. However,
+ <p>Using the session scope variables solves the above mentioned problem. However,
using a session scope might be inappropriate from the architectural point of view.
- a4j:keepAlive allows to reuse the same value for request scope bean between
- the several Ajax requests.
+ a4j:keepAlive allows to reuse the same value for a request scope bean between
+ several Ajax requests.
</p>
<p>
- <b>beanName</b> attribute references to the requesr scope bean name you want
+ <b>beanName</b> attribute references to a request scope bean name you'd like
to re-use during the Ajax requests.
</p>
- <p><b>ajaxOnly</b> attribute is a flag that declare should the value of the bean
- still be available during the non-Ajax request. If ajaxOnly="true", the request
- scope bean will keep the same value during the Ajax requests from given page, but
+ <p><b>ajaxOnly</b> attribute is a flag that declares whether the value of the bean
+ should be available during a non-Ajax request. If ajaxOnly="true", a request
+ scope bean will keep the same value during Ajax requests from the given page, but
it will be re-created as a regular request scope bean when a non-Ajax request
will send from this page.
</p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml 2007-08-14 13:31:39 UTC (rev 2246)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/script/usage.xhtml 2007-08-14 13:46:50 UTC (rev 2247)
@@ -8,17 +8,17 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>a4j:loadScript is similar to the standard script tag with src attribute, but allows
- to load script from alternative sources like jar file.
+ <p>a4j:loadScript is similar to the standard script tag with src attribute, but it allows
+ to load script from alternative sources like a jar file.
</p>
<p>
<b>src</b> attribute defines the context relative path to the script. Instead of html
- script tag you do not have to have a prefix to your application. The leading slash in
+ script tag it's not required to have a prefix of your application. The leading slash in
the path means the root of the web context.
</p>
<p>
- You can use "resource://" prefix to access to the script file using
- RichFaces resource framework. For example, if you script file is located inside the
+ You can use "resource://" prefix to access the script file using
+ RichFaces resource framework. For example, if your script file is located inside the
jar file and has a full path there: /org/mycompany/assets/script/focus.js , you can
point to it with:
<pre style="margin:0px">
@@ -26,10 +26,10 @@
</pre>
</p>
<p>
- It is possible to register aliases to the static script files or dynamically
+ It is possible to register aliases in the static script files or dynamically
generated scripts and use those aliases then. For example, RichFaces has an
- alias to the prototype.js script. So, you can point to "resource://prototype.js" as
- a src for loading script and use prototype's features. The following example
+ alias for the prototype.js script. So, you can point to "resource://prototype.js" as
+ a src for loading script and use prototype features. The following example
shows how to use shipped with RichFaces prototype.js and script.aculo.us to create
a client-side effects.
</p>
@@ -46,12 +46,12 @@
<p>
- Note that if you have an Ajax functionality on the page, the prototype.js is already
- attached to this page and you do not have to include it explicitly once more.
+ Note that if you have an Ajax functionality on a page, the prototype.js is already
+ attached to this page and you do not have to include it explicitly once again.
</p>
<p>
- Since version 3.1.0, RichFaces introduced the rich:effect component. So, you do not have
- to program with javascript to have effects in your application.
+ Since version 3.1.0, RichFaces introduced the rich:effect component. Hence, you do not have
+ to write any javascript to make effects appear in your application.
</p>
</ui:define>
</ui:composition>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/style/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/style/usage.xhtml 2007-08-14 13:31:39 UTC (rev 2246)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/style/usage.xhtml 2007-08-14 13:46:50 UTC (rev 2247)
@@ -8,18 +8,18 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>a4j:loadStyle is similar to the standard style tag with src attribute, but allows
- to load style sheet file from alternative sources like jar file.
+ <p>a4j:loadStyle is similar to the standard style tag with src attribute, but it allows
+ to load a style sheet file from alternative sources like a jar file.
</p>
<p>
<b>src</b> attribute defines the context relative path to the style sheet file. Instead of html
- style tag you do not have to have a prefix to your application. The leading slash in
+ style tag it's not required to have a prefix in your application. The leading slash in
the path means the root of the web context.
</p>
<p>
- You can use "resource://" prefix to access to the file using
- RichFaces resource framework. For example, if you css file is located inside the
- jar file and has a full path there: /org/mycompany/assets/css/common.css , you can
+ You can use "resource://" prefix to access the file using
+ RichFaces resource framework. For example, if your css file is located inside the
+ jar file and has a full path there: /org/mycompany/assets/css/common.css, you can
point to it with:
</p>
<pre style="margin:0px">
@@ -27,10 +27,10 @@
</pre>
<p>
Richfaces allows to have a dynamically generated css file based on RichFaces
- skinability feature. xcss is a XML formated css with some additional extentions.
+ skinability feature. xcss is an XML formated css with some additional extensions.
The following example shows how the look-n-feel of non-RichFaces components might
be changed based on the selected skin. The panel with the form elements consists
- of only non-Richfaces component, but it is sensitive to the current skin.
+ only of non-Richfaces component, but it is sensitive to the current skin.
</p>
18 years, 8 months
JBoss Rich Faces SVN: r2246 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-14 09:31:39 -0400 (Tue, 14 Aug 2007)
New Revision: 2246
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
http://jira.jboss.com/jira/browse/RF-598
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-08-14 12:40:55 UTC (rev 2245)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-08-14 13:31:39 UTC (rev 2246)
@@ -84,15 +84,21 @@
for example depending on its definition, could be rendered with markup defined in one of
<property>tree</property> nodes. It's defined with the <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute that contains treeNode name for elements rendering. </para>
- <para>On the screenshot there are examples of nodes defined with different templates on the
- following conditions</para>
+ </emphasis> attribute that contains treeNode name for elements rendering. It's not
+ necessary to define <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> attribute. In case when <emphasis>
+ <property>"nodeFace"</property>
+ </emphasis> is undefined the first node inside the tree will be use by default. </para>
+
<para>
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="JAVA"><![CDATA[nodeFace="#{data.name != 'param-value' ? 'input' : 'text'}"
-]]></programlisting>
+ ]]></programlisting>
+ <para>On the screenshot there are examples of nodes defined with different templates on the
+ following conditions.</para>
<figure>
<title>Different nodes of tree</title>
18 years, 8 months
JBoss Rich Faces SVN: r2245 - trunk/samples/tree-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-14 08:40:55 -0400 (Tue, 14 Aug 2007)
New Revision: 2245
Modified:
trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
Log:
icon size customization sample added to demo
Modified: trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2007-08-14 11:28:51 UTC (rev 2244)
+++ trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2007-08-14 12:40:55 UTC (rev 2245)
@@ -25,6 +25,24 @@
white-space: normal;
}
</style>
+
+ <style>
+ .treeIcon32 .dr-tree-h-ic-div {
+ margin-left : 15px;
+ padding-left : 17px;
+ }
+
+ .treeIcon32 .dr-tree-h-ic {
+ width: 32px;
+ padding: 0px;
+ }
+
+ .treeIcon32 .dr-tree-h-ic-img{
+ width : 32px;
+ height : 32px;
+ }
+ </style>
+
</head>
<body>
<f:view>
@@ -62,6 +80,12 @@
<f:selectItem itemLabel="true" itemValue="#{true}" />
<f:selectItem itemLabel="false" itemValue="#{false}" />
</h:selectOneRadio>
+
+ <h:outputText value="Tree icon size:" />
+ <h:selectOneRadio value="#{bean.styleClass}" onclick="submit()">
+ <f:selectItem itemLabel="16x16 (default)" itemValue="" />
+ <f:selectItem itemLabel="32x32" itemValue="treeIcon32" />
+ </h:selectOneRadio>
<h:outputText value="Drag is: #{bean.dragOn ? 'on' : 'off'}" />
<br />
@@ -88,7 +112,8 @@
iconExpanded="#{bean.iconExpanded}"
iconLeaf="#{bean.iconLeaf}"
icon="#{bean.icon}"
- dropListener="#{bean.processDrop}">
+ dropListener="#{bean.processDrop}"
+ styleClass="#{bean.styleClass}">
<f:facet name="icon">
<h:outputText value="icon" rendered="#{bean.renderFacets}"/>
18 years, 8 months
JBoss Rich Faces SVN: r2244 - trunk/docs/userguide/en/src/main/docbook.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-14 07:28:51 -0400 (Tue, 14 Aug 2007)
New Revision: 2244
Modified:
trunk/docs/userguide/en/src/main/docbook/master.xml
Log:
http://jira.jboss.com/jira/browse/RF-574
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-14 11:24:40 UTC (rev 2243)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2007-08-14 11:28:51 UTC (rev 2244)
@@ -96,8 +96,8 @@
&inputNumberSpinner_table;
&menuComponents_table;
&message_table;
+&modalPanel_table;
&panelMenu_table;
-&modalPanel_table;
&paint2D_table;
&panel_table;
&panelBar_table;
18 years, 8 months
JBoss Rich Faces SVN: r2243 - in trunk: framework/impl/src/main/javascript/prototype and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-14 07:24:40 -0400 (Tue, 14 Aug 2007)
New Revision: 2243
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
trunk/framework/impl/src/main/javascript/prototype/patches.js
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
- prototype.js: added Event.unloadElementsCache() & Element.isUninitialized() methods
- AJAX.js clears observers cache on AJAX response
- modalPanel.js switched to Element.isUninitialized()
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-08-14 10:58:48 UTC (rev 2242)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-08-14 11:24:40 UTC (rev 2243)
@@ -288,7 +288,7 @@
if( ! newnode ) { LOG.error("New node for ID "+id+" is not present in response");return;}
var oldnode = window.document.getElementById(id);
if ( oldnode ) {
- var anchor = oldnode.parentNode ;
+ var anchor = oldnode.parentNode;
// need to check for firstChild due to opera 8 bug with hasChildNodes
Sarissa.clearChildNodes(oldnode);
if(oldnode.outerHTML && !oldnode.tagName.match( /(tbody|thead|tfoot|tr|th|td)/i ) ){
@@ -705,6 +705,11 @@
newinputs = req.getElementsByTagName("INPUT",idsSpan);
A4J.AJAX.replaceViewState(inputs,newinputs);
}
+
+ if (typeof Event != "undefined") {
+ Event.unloadElementsCache();
+ }
+
// Process listeners.
for(var li = 0; li < A4J.AJAX._listeners.length; li++){
var listener = A4J.AJAX._listeners[li];
@@ -793,6 +798,11 @@
var oDomDoc = (new DOMParser()).parseFromString(req.getResponseText(), "text/xml");
if(Sarissa.getParseErrorText(oDomDoc) == Sarissa.PARSED_OK){
LOG.debug("response has parsed as DOM documnet.");
+
+ if (typeof Event != "undefined") {
+ Event.unloadElementsCache();
+ }
+
Sarissa.clearChildNodes(window.document.documentElement);
var docNodes = oDomDoc.documentElement.childNodes;
for(var i = 0;i<docNodes.length;i++){
Modified: trunk/framework/impl/src/main/javascript/prototype/patches.js
===================================================================
--- trunk/framework/impl/src/main/javascript/prototype/patches.js 2007-08-14 10:58:48 UTC (rev 2242)
+++ trunk/framework/impl/src/main/javascript/prototype/patches.js 2007-08-14 11:24:40 UTC (rev 2243)
@@ -27,4 +27,34 @@
}
return supposedParent == node;
+};
+
+Element.isUninitialized = function(element) {
+ if (element) {
+ if (!element.parentNode || element.document && element.document.readyState == "uninitialized") {
+ return true;
+ }
+
+ return false;
+ }
+};
+
+Event.unloadElementsCache = function() {
+ if (!Event.observers) return;
+ var compact = false;
+ var observers = Event.observers;
+ for (var i = 0, length = observers.length; i < length; i++) {
+ var observer = observers[i];
+ var elt = observer[0];
+
+ if (Element.isUninitialized(elt)) {
+ compact = true;
+ Event.stopObserving.apply(Event, observer);
+ observers[i] = null;
+ }
+ }
+
+ if (compact) {
+ Event.observers = observers.compact();
+ }
};
\ No newline at end of file
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-08-14 10:58:48 UTC (rev 2242)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-08-14 11:24:40 UTC (rev 2243)
@@ -50,16 +50,6 @@
return str.substr(0,pxIndex);
};
-Richfaces.isNodeInDOMTree = function(node) {
- var root = document.documentElement;
- var elt = node;
- while (elt && elt != root) {
- elt = elt.parentNode;
- }
-
- return !!elt;
-};
-
Richfaces.visitTree = function(root, callback) {
var node = root;
if (!node) {
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-14 10:58:48 UTC (rev 2242)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-08-14 11:24:40 UTC (rev 2243)
@@ -41,7 +41,7 @@
var elt = $(panel.markerId);
- if (!Richfaces.isNodeInDOMTree(elt)) {
+ if (Element.isUninitialized(elt)) {
panel.destroy();
ModalPanel.panels.splice(i, 1);
18 years, 8 months
JBoss Rich Faces SVN: r2242 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/status.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-14 06:58:48 -0400 (Tue, 14 Aug 2007)
New Revision: 2242
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-524
Language correction in richfaces-demo for aj4 component
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/status/usage.xhtml 2007-08-14 10:58:48 UTC (rev 2242)
@@ -9,12 +9,19 @@
<ui:define name="sample">
-
- <p>a4j:status is an indicator of Ajax request. It has two states - start and stop. Start
- state indicates that the Ajax request is in progress. When Ajax response comes back,
+ <p>a4j:status is an indicator of an Ajax request. It has two states - start and stop. The start
+ state indicates that an Ajax request is in progress. When Ajax Response comes back,
the component switches to the stop stage.
</p>
<div class="sample-container" >
+
+ <h:outputText value="Ajax Status:"/>
+
+ <a4j:status id="commonstatus" startText="In progress..." stopText="Complete"/>
+
+ <h:form>
+ <a4j:commandButton eventsQueue="foo" value="Ajax request"/>
+ </h:form>
<ui:include src="/richfaces/status/examples/simple.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/status/examples/simple.xhtml"/>
@@ -23,26 +30,41 @@
<p>
<b>startText</b> attribute defines the label that will be visible when the Ajax request
- is in progress. You can use <b>startStyle</b> or <b>startStyleClass</b> attribuite to
- customize style for start label. You can use <b>facet name="start"</b> to define more enhanced
- content for indication the start state. If facet is defined, the value of startText
+ is in progress. You can use <b>startStyle</b> or <b>startStyleClass</b> attribute to
+ customize style for a start label. You can use <b>facet name="start"</b> to define more enhanced
+ content for indication of the start state. If facet is defined, the value of startText
attribute becomes void.
</p>
<p>
- <b>stopText</b> attribute defines the label that will be visible when the Ajax response
- comes back. You can use <b>stopStyle</b> or <b>stopStyleClass</b> attribuite to
- customize style for stop label. You can use <b>facet name="stop"</b> to define more enhanced
- content for indication the stop state. If facet is defined, the value of stopText
+ <b>stopText</b> attribute defines the label that will be visible when the Ajax Response
+ comes back. You can use <b>stopStyle</b> or <b>stopStyleClass</b> attribute to
+ customize style for a stop label. You can use <b>facet name="stop"</b> to define more enhanced
+ content for indication of the stop state. If facet is defined, the value of stopText
attribute becomes void.
</p>
<p>
In case of not stopText nor facet name="stop" are not defined, the stop stage will
not have a visual representation. You can use this option if you want to show only
- "in progress" indicatior. The following example show the graphic image to
- the right of the input field during the Ajax request.
+ "in progress" indicator. The following example show the graphic image to
+ the right of the input field during an Ajax request.
</p>
<div class="sample-container" >
+ <a4j:region id="rb">
+ <h:panelGrid columns="2">
+
+ <h:form>
+ <a4j:commandButton eventsQueue="foo2" value="Ajax request 2"/>
+ </h:form>
+
+ <a4j:status>
+ <f:facet name="start">
+ <h:graphicImage value="/images/ajax/ajax_process.gif"/>
+ </f:facet>
+ </a4j:status>
+
+ </h:panelGrid>
+ </a4j:region>
<ui:include src="/richfaces/status/examples/pictured.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/status/examples/pictured.xhtml"/>
@@ -53,7 +75,7 @@
<p>
By default, a4j:status works for each Ajax components inside the local region. This
means if you have not any region defined on the page (the whole view is a region) and
- have only one a4j:status on the page, this a4j:status will be activated durng
+ have only one a4j:status on the page, this a4j:status will be activated during
Ajax request sent by any of the Ajax component located on the page.
</p>
<p>
@@ -73,12 +95,12 @@
</p>
<p>
You do not have any additional attribute defined if you have a4j:status inside each region
- and working for this given region. You can locate the a4j:status outside of the region if this
- required by page layout. In this case you have to define a 'for' attribute explicilty. The 'for'
+ and working for this given region. You can locate the a4j:status outside of the region if this is
+ required by a page layout. In this case you have to define a 'for' attribute explicitly. The 'for'
attribute should point to the id of the region it should work for.
</p>
<p>
- Use attrubute 'status' of the Ajax component (such as a4j:commandButton, a4j:poll etc) to point to
+ Use attribute 'status' of the Ajax component (such as a4j:commandButton, a4j:poll, etc.) should point to
the id of the a4j:status if you want to share it between the different Ajax component located in
different regions. The following example shows how to share the same a4j:status from the Ajax
component located in the different region:
18 years, 8 months
JBoss Rich Faces SVN: r2241 - in trunk/samples/richfaces-demo/src/main/webapp/richfaces: ajaxListener and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-08-14 06:57:02 -0400 (Tue, 14 Aug 2007)
New Revision: 2241
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxListener/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
Log:
http://jira.jboss.com/jira/browse/RF-524
Language correction in richfaces-demo for aj4 component
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxAttributes/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -114,11 +114,11 @@
</p>
<p>
The next request posted in the same queue will wait until the previos one is not
- processed and Ajax response is returned back if the eventsQueue attribute is defined. In
+ processed and Ajax Response is returned back if the eventsQueue attribute is defined. In
addition, Richfaces starts to remove from the queue 'similar' requests. 'Similar' requests are
the requests produced by the same event. For example, according to the following code,
only the newest request will be sent to the server if a user types very fast and has typed
- the several characters already before the previous Ajax response is back.
+ the several characters already before the previous Ajax Response is back.
</p>
<div class="esample">
<pre>
@@ -131,7 +131,7 @@
the queue before it is ready to send. When the delay time is over, the request will be
sent to the server or removed if the newest 'similar' request is in a queue already .
</p>
- <p><b>ignoreDupResponses</b> attributes orders to ignore the Ajax response produced by the
+ <p><b>ignoreDupResponses</b> attributes orders to ignore the Ajax Response produced by the
request if the newest 'similar' request is in a queue already. ignoreDupResponses="true"
does not cancel the request while it is processed on the server, but just allows to
avoid unnecessary updates on the client side if the response loses the actuality.
@@ -181,10 +181,10 @@
the action method and define the action event.
</p>
<p>
- <b>action</b> method must return null if you want to have an Ajax response with a partual page
- update. This is regular mode called "Ajax Request generates Ajax Response". In case of
+ <b>action</b> method must return null if you want to have an Ajax Response with a partual page
+ update. This is regular mode called "Ajax request generates Ajax Response". In case of
action does not return null, but the action outcome that matches one of navigation rules, RichFaces
- starts to work in "Ajax Request generates Non-Ajax Response" mode.
+ starts to work in "Ajax request generates Non-Ajax Response" mode.
This mode might be helpful in two major cases:
</p>
<ol>
@@ -224,7 +224,7 @@
</p>
<p>
<b>oncomplete</b> attribute allows to invoke the javascript code right after the
- Ajax response is returned back and the DOM tree of the browser is updated. Richfaces
+ Ajax Response is returned back and the DOM tree of the browser is updated. Richfaces
registers the code for further invocation of XMLHTTP request object before an Ajax
request is sent. This means the code will not be changed during processing of
the request on the server if you use JSF EL value binding. Also, you cannot use
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxListener/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxListener/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/ajaxListener/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -12,13 +12,13 @@
Ajax Listener (a4j:ajaxListener). Ajax Listener is invoked before the Render Response
phase. Instead of Action Listener of Value Change Listener which are not invoked when
Validation of Update Model phases failed, Ajax Listener is guarantied to be invoked
- for each Ajax response. Hence, it is a good place to update the list of re-rendered
+ for each Ajax Response. Hence, it is a good place to update the list of re-rendered
components, for example.
</p>
<p>
Ajax Listener is not invoked for a non-Ajax request and when RichFaces works in
- "Ajax Request generates Non-Ajax Response" mode. Therefore, Ajax Listener invocation
- is a good indicator that Ajax response is going to be processed.
+ "Ajax request generates Non-Ajax Response" mode. Therefore, Ajax Listener invocation
+ is a good indicator that Ajax Response is going to be processed.
</p>
<p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandButton/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -10,9 +10,9 @@
<p>
a4j:commandButton is similar to the standard h:commandButton, but produces an
- Ajax request with further partial page update. 'reRender' attribute point to the
+ Ajax request with a further partial page update. 'reRender' attribute points to the
component(s) that should be re-rendered in the component tree and updated
- in the browser DOM after the ajax response is complete.
+ in the browser DOM after an Ajax Response is completed.
</p>
<p>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/commandLink/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -12,7 +12,7 @@
a4j:commandLink is similar to the standard h:commandLink, but produces an
Ajax request with further partial page update. 'reRender' attribute point to the
component(s) that should be re-rendered in the component tree and updated
- in the browser DOM after the ajax response is complete.
+ in the browser DOM after the Ajax Response is complete.
</p>
<p>
@@ -28,7 +28,7 @@
</ui:include>
</div>
<p>
- For additional information about attributes of this compponent read
+ For additional information about attributes of this component read
<h:outputLink value="#{facesContext.externalContext.requestContextPath}/richfaces/ajaxAttributes.jsf?c=ajaxattributes">
<h:outputText value="'Ajax Attribute' section" />
</h:outputLink>.
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/jsFunction/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -8,10 +8,10 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>a4j:jsFunction component is very similar to a4j:commandButton, but allows to peform
- Ajax request from Javascript code directly. The component sends a request using
- a standard JSF approach, so, the JSF form is required. The folowing example
- shows how the part of the page is re-rendered when user hover over the names.
+ <p>a4j:jsFunction component is very similar to a4j:commandButton, but allows to perform
+ an Ajax request from a Javascript code directly. The component sends a request using
+ a standard JSF approach, so the JSF form is required. The following example
+ shows how the part of the page is re-rendered when a user hovers over the names.
</p>
@@ -27,7 +27,7 @@
<b>name</b> attribute defines the name of the function that will be generated. You
can use it as a regular Javascript function name to invoke. a4j:actionparam
is used to pass the function arguments (you can use f:param as well). The order and
- the number of parameters correspond to the arguments of the called function. The
+ the number of parameters corresponds to the arguments of the called function. The
value(s) of the a4j:actionparam will be replaced with the value of function arguments
before the Ajax request is sent. To read more about a4j:action param visit
<h:outputLink value="#{facesContext.externalContext.requestContextPath}/richfaces/actionparam.jsf?c=actionparam">
@@ -36,8 +36,8 @@
</p>
<p>
As for any other Ajax components, you can use <b>reRender</b> attribute to update the area(s) of the page
- after Ajax response returns back. Also, you can use <b>data</b> attribute and <b>oncomplete</b> attribute to
- take the data from the server and use them for Javascript call them. For additional information about
+ after an Ajax Response comes back. Also, you can use <b>data</b> attribute and <b>oncomplete</b> attribute to
+ take the data from the server and use them for Javascript to call them. For additional information about
Javascript oriented and other important attributes of a4j:jsFunction read
<h:outputLink value="#{facesContext.externalContext.requestContextPath}/richfaces/ajaxAttributes.jsf?c=ajaxattributes">
<h:outputText value="'Ajax Attribute' section" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/poll/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -9,11 +9,11 @@
<ui:define name="sample">
- <p>a4j:poll is one of the way how you can orginize the periodical polling of server data and
- updating the page. a4j:poll is a standard RichFaces Ajax component. So, you can use the same
+ <p>a4j:poll is one of the way how you can organize the periodical polling of server data and
+ updating the page. a4j:poll is a standard RichFaces Ajax component. Thus, you can use the same
approach as for a4j:commandButton for example. I.e. you can use action attribute to invoke the
- actiom method and reRender attribute to update area(s) on the client when Ajax response returns
- back. RichFaces use the standard form based request, so having the form around the
+ action method and reRender attribute to update area(s) on the client when Ajax Response returns
+ back. RichFaces uses the standard form based request, so the form around the
a4j:poll component is required.
</p>
@@ -30,13 +30,13 @@
<p><b>interval</b> attribute defines the interval in ms between the previous response and the
- next request. So, the total period between two request generated by a4j:poll is a sum of interval
+ next request. Hence, the total period between two requests generated by a4j:poll is a sum of interval
and server response time.
</p>
<p>
- <b>timeout</b> attribute defines the time in ms how long the client will wait for server response.
- if Ajax response does not come during this period, the connection is aborted and the next
+ <b>timeout</b> attribute defines the time in ms for how long the the client will wait for the server response.
+ if Ajax Response does not come during this period, the connection is aborted and the next
request is sent. By default, the timeout is not set.
</p>
@@ -45,12 +45,11 @@
to point to the bean property that will be the flag. Re-render the a4j:poll component itself
to apply the current value. See the example how to accomplish this task.
</p>
-
<p>
a4j:poll sends requests in parallel with user activities. The intersections
between a4j:poll Ajax requests and other Ajax requests are possible. This might causes
unpredictable glitches. Especially, it is true for the earlier version of JSF implementations
- when the parallel requests to the server was not expected. To avoid problem, try to follow
+ when the parallel requests to the server was not expected. To avoid the problem, try to follow
very simple rules:
</p>
<ul>
@@ -74,11 +73,11 @@
</li>
<li>Use the eventsQueue with the same name as the name for other Ajax components.
This allows to queue the Ajax request and avoid updating the server side data
- and re-rendering the page area(s) in parallet;
+ and re-rendering the page area(s) in parallel;
</li>
<li>Set the reasonable interval. Note that each Ajax request restores the session
- and component tree as well as processes the whole JSF lifecycle. Too often requests
- just degrade the overall performance of application
+ and a component tree as well as processes the whole JSF lifecycle. Too often requests
+ just degrade the overall performance of an application
</li>
</ul>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2007-08-14 10:30:24 UTC (rev 2240)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/support/usage.xhtml 2007-08-14 10:57:02 UTC (rev 2241)
@@ -9,7 +9,7 @@
<ui:define name="sample">
<p>
- a4j:support is a most important core component in the RichFaces library. It allows
+ a4j:support is the most important core component in the RichFaces library. It allows
to add an Ajax capability to the existing non-ajax components. All other Ajax components
are based on the same principles a4j:support has.
</p>
@@ -17,11 +17,11 @@
The key attributes are 'event' and 'reRender'.
</p>
<p>
- <b>event</b> attribute defines the javascript event the ajax support will be attached at.
+ <b>event</b> attribute defines the javascript event the ajax support will be attached to.
</p>
<p>
'reRender' attribute points to the JSF component(s) that should be re-rendered on the server side
- and updated on the client when ajax response comes back.
+ and updated on the client when an Ajax Response comes back.
</p>
<p>
The following example shows how the outputText component value is changed while a user is
@@ -51,8 +51,8 @@
<p>
In case of attaching a4j:support to non-Ajax JSF command component, such as h:commandButton
- or h:commandLink, it is important to set disableDefault equals true. Otherwise, non-ajax
- request will be send just after ajax request and the page will be unexpectedly refreshed.
+ or h:commandLink, it is important to set disableDefault equals true. Otherwise, a non-ajax
+ request will be send just after an Ajax request and the page will be unexpectedly refreshed.
</p>
<p>
18 years, 8 months
JBoss Rich Faces SVN: r2240 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-08-14 06:30:24 -0400 (Tue, 14 Aug 2007)
New Revision: 2240
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
Richfaces.Position object added
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-08-14 08:52:27 UTC (rev 2239)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2007-08-14 10:30:24 UTC (rev 2240)
@@ -171,4 +171,164 @@
}
return value;
-};
\ No newline at end of file
+};
+
+if (!Richfaces.position) Richfaces.Position={};
+
+Richfaces.Position.setElementPosition = function(element, baseElement, jointPoint, direction, offset)
+{
+ // parameters:
+ // jointPoint: {x:,y:} or ('top-left','top-right','bottom'-left,'bottom-right')
+ // direction: ('top-left','top-right','bottom'-left,'bottom-right', 'auto')
+ // offset: {x:,y:}
+
+ var elementDim = Richfaces.Position.getOffsetDimensions(element);
+ var baseElementDim = Richfaces.Position.getOffsetDimensions(baseElement);
+
+ var windowRect = Richfaces.Position.getWindowViewport();
+
+ var baseOffset = Position.cumulativeOffset(baseElement);
+
+ // jointPoint
+ var ox=baseOffset[0];
+ var oy=baseOffset[1];
+ var re = /^(top|bottom)-(left|right)$/;
+ var match;
+
+ if (typeof jointPoint=='object') {ox = jointPoint.x; oy = jointPoint.y}
+ else if ( jointPoint && (match=jointPoint.toLowerCase().match(re))!=null )
+ {
+ if (match[2]=='right') ox+=baseElementDim.width;
+ if (match[1]=='bottom') oy+=baseElementDim.height;
+ } else
+ {
+ // ??? auto
+ }
+
+ // direction
+ if (direction && (match=direction.toLowerCase().match(re))!=null )
+ {
+ var d = direction.toLowerCase().split('-');
+ if (match[2]=='left') { ox-=elementDim.width + offset.x; } else ox += offset.x;
+ if (match[1]=='top') { oy-=elementDim.height + offset.y; } else oy += offset.y
+ } else
+ {
+ // auto
+ var theBest = {square:0};
+ // jointPoint: bottom-right, direction: bottom-left
+ var rect = {right: baseOffset[0] + baseElementDim.width, top: baseOffset[1] + baseElementDim.height};
+ rect.left = rect.right - elementDim.width;
+ rect.bottom = rect.top + elementDim.height;
+ ox = rect.left; oy = rect.top;
+ var s = Richfaces.Position.checkCollision(rect, windowRect);
+ if (s!=0)
+ {
+ if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
+ // jointPoint: top-right, direction: top-left
+ rect = {right: baseOffset[0] + baseElementDim.width, bottom: baseOffset[1]};
+ rect.left = rect.right - elementDim.width;
+ rect.top = rect.bottom - elementDim.height;
+ ox = rect.left; oy = rect.top;
+ s = Richfaces.Position.checkCollision(rect, windowRect);
+ if (s!=0)
+ {
+ if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
+ // jointPoint: bottom-left, direction: bottom-right
+ rect = {left: baseOffset[0], top: baseOffset[1] + baseElementDim.height};
+ rect.right = rect.left + elementDim.width;
+ rect.bottom = rect.top + elementDim.height;
+ ox = rect.left; oy = rect.top;
+ s = Richfaces.Position.checkCollision(rect, windowRect);
+ if (s!=0)
+ {
+ if (ox>=0 && oy>=0 && theBest.square<s) theBest = {x:ox, y:oy, square:s};
+ // jointPoint: top-left, direction: top-right
+ rect = {left: baseOffset[0], bottom: baseOffset[1]};
+ rect.right = rect.left + elementDim.width;
+ rect.top = rect.bottom - elementDim.height;
+ ox = rect.left; oy = rect.top;
+ s = Richfaces.Position.checkCollision(rect, windowRect);
+ if (s!=0)
+ {
+ // the best way selection
+ if (ox<0 || oy<0 || theBest.square>s) {ox=theBest.x; oy=theBest.y}
+ }
+ }
+ }
+
+ }
+ }
+
+ element.style.left = ox + 'px';
+ element.style.top = oy + 'px';
+};
+
+Richfaces.Position.getOffsetDimensions = function(element) {
+ // from prototype 1.5.0 // Pavel Yascenko
+ element = $(element);
+ var display = $(element).getStyle('display');
+ if (display != 'none' && display != null) // Safari bug
+ return {width: element.offsetWidth, height: element.offsetHeight};
+
+ // All *Width and *Height properties give 0 on elements with display none,
+ // so enable the element temporarily
+ var els = element.style;
+ var originalVisibility = els.visibility;
+ var originalPosition = els.position;
+ var originalDisplay = els.display;
+ els.visibility = 'hidden';
+ els.position = 'absolute';
+ els.display = 'block';
+ var originalWidth = element.offsetWidth; // was element.clientWidth // Pavel Yascenko
+ var originalHeight = element.offsetHeight; // was element.clientHeight // Pavel Yascenko
+ els.display = originalDisplay;
+ els.position = originalPosition;
+ els.visibility = originalVisibility;
+ return {width: originalWidth, height: originalHeight};
+};
+
+Richfaces.Position.checkCollision = function(elementRect, windowRect, windowOffset)
+{
+ if (elementRect.left >= windowRect.left &&
+ elementRect.top >= windowRect.top &&
+ elementRect.right <= windowRect.right &&
+ elementRect.bottom <= windowRect.bottom)
+ return 0;
+
+ var rect = {left: (elementRect.left>windowRect.left ? elementRect.left : windowRect.left),
+ top: (elementRect.top>windowRect.top ? elementRect.top : windowRect.top),
+ right: (elementRect.right<windowRect.right ? elementRect.right : windowRect.right),
+ bottom: (elementRect.bottom<windowRect.bottom ? elementRect.bottom : windowRect.bottom)};
+ return (rect.right-rect.left)* (rect.bottom-rect.top);
+};
+
+
+Richfaces.Position.getWindowDimensions = function() {
+ var w = self.innerWidth
+ || document.documentElement.clientWidth
+ || document.body.clientWidth
+ || 0;
+ var h = self.innerHeight
+ || document.documentElement.clientHeight
+ || document.body.clientHeight
+ || 0;
+ return {width:w, height: h};
+};
+
+Richfaces.Position.getWindowScrollOffset = function() {
+ var dx = window.pageXOffset
+ || document.documentElement.scrollLeft
+ || document.body.scrollLeft
+ || 0;
+ var dy = window.pageYOffset
+ || document.documentElement.scrollTop
+ || document.body.scrollTop
+ || 0;
+ return {left:dx, top: dy};
+};
+
+Richfaces.Position.getWindowViewport = function() {
+ var windowDim = Richfaces.Position.getWindowDimensions();
+ var windowOffset = Richfaces.Position.getWindowScrollOffset();
+ return {left:windowOffset.left, top:windowOffset.top, right: windowDim.width+windowOffset.left, bottom: windowDim.height+windowOffset.top};
+};
18 years, 8 months
JBoss Rich Faces SVN: r2239 - in trunk/docs/userguide/en/src/main/docbook: modules and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-14 04:52:27 -0400 (Tue, 14 Aug 2007)
New Revision: 2239
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
http://jira.jboss.com/jira/browse/RF-391
http://jira.jboss.com/jira/browse/RF-389
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-08-14 07:59:59 UTC (rev 2238)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-08-14 08:52:27 UTC (rev 2239)
@@ -232,11 +232,10 @@
<listitem>ondragenter - drags an element appearing on a tree event</listitem>
</itemizedlist>
- <para>
- Also standart HTML event attributes like "onclick", "onmousedown", "onmouseover" and etc. could be used.
- Event handlers of a tree component capture events occured on any tree part.
- But event handlers of treeNode capture events occured on treeNode only except for children events.
- </para>
+ <para> Also standart HTML event attributes like "onclick", "onmousedown", "onmouseover" and etc.
+ could be used. Event handlers of a tree component capture events occured on any tree part. But
+ event handlers of treeNode capture events occured on treeNode only except for children events.
+ </para>
</section>
<section>
<title>Look-and-Feel Customization</title>
@@ -293,6 +292,8 @@
<ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf?c=tree">Here</ulink>
you can see the example of <emphasis role="bold"><rich:tree></emphasis> usage
and sources for the given example. </para>
+ <para>How to Expand/Collapse Tree Nodes from code see <ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes">here</ulink>. </para>
</section>
</section>
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2007-08-14 07:59:59 UTC (rev 2238)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2007-08-14 08:52:27 UTC (rev 2239)
@@ -1,47 +1,47 @@
<?xml version='1.0' encoding='UTF-8'?>
<section>
-<sectioninfo>
-<keywordset>
-<keyword>node</keyword>
-<keyword>rich:treeNode</keyword>
-<keyword>HtmlTreeNode</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.TreeNode</entry>
- </row>
- <row>
- <entry>component-class</entry>
- <entry>org.richfaces.component.html.HtmlTreeNode</entry>
- </row>
- <row>
- <entry>component-family</entry>
- <entry>org.richfaces.TreeNode</entry>
- </row>
- <row>
- <entry>renderer-type</entry>
- <entry>org.richfaces.TreeNodeRenderer</entry>
- </row>
- <row>
- <entry>tag-class</entry>
- <entry>org.richfaces.taglib.TreeNodeTag</entry>
- </row>
- </tbody>
- </tgroup>
- </table>
-
+ <sectioninfo>
+ <keywordset>
+ <keyword>node</keyword>
+ <keyword>rich:treeNode</keyword>
+ <keyword>HtmlTreeNode</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.TreeNode</entry>
+ </row>
+ <row>
+ <entry>component-class</entry>
+ <entry>org.richfaces.component.html.HtmlTreeNode</entry>
+ </row>
+ <row>
+ <entry>component-family</entry>
+ <entry>org.richfaces.TreeNode</entry>
+ </row>
+ <row>
+ <entry>renderer-type</entry>
+ <entry>org.richfaces.TreeNodeRenderer</entry>
+ </row>
+ <row>
+ <entry>tag-class</entry>
+ <entry>org.richfaces.taglib.TreeNodeTag</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
<section>
<title>Creating the Component with a Page Tag</title>
<para>Here is a simple example as it might be used in a page: </para>
@@ -72,14 +72,17 @@
</section>
<section>
<title>Details of Usage</title>
- <para>
- The <emphasis ><property>"icon"</property></emphasis>,
- <emphasis ><property>"iconCollapsed"</property></emphasis>,
- <emphasis ><property>"iconExpanded"</property></emphasis>,
- <emphasis ><property>"iconLeaf"</property></emphasis>
- attributes define icons for the component. Also you can define icons using facets with the same names. If the facets are defined,
- the corresponding attributes are ignored and facets contents are used as icons. The width of a rendered facet area is 16px.
-<programlisting role="JAVA"><![CDATA[...
+ <para> The <emphasis>
+ <property>"icon"</property>
+ </emphasis>, <emphasis>
+ <property>"iconCollapsed"</property>
+ </emphasis>, <emphasis>
+ <property>"iconExpanded"</property>
+ </emphasis>, <emphasis>
+ <property>"iconLeaf"</property>
+ </emphasis> attributes define icons for the component. Also you can define icons using facets
+ with the same names. If the facets are defined, the corresponding attributes are ignored and
+ facets contents are used as icons. The width of a rendered facet area is 16px. <programlisting role="JAVA"><![CDATA[...
<rich:tree ....>
...
<rich:treeNode ...>
@@ -100,18 +103,18 @@
</rich:tree>
...
]]></programlisting></para>
-
- </section>
- <section>
+
+ </section>
+ <section>
<title>Look-and-Feel Customization</title>
<para>As it has been mentioned above, <property>treeNode</property> defines a template for nodes
- rendering in a tree. Thus, during XML document rendering (a web.xml application) as a tree, the
- following nodes output (passed via var="data" on a tree) happens:</para>
+ rendering in a tree. Thus, during XML document rendering (a web.xml application) as a tree,
+ the following nodes output (passed via var="data" on a tree) happens:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<rich:tree ... faceNode="simpleNode" ... value="#{bean.data}" var="data">
<rich:treeNode type="simpleNode">
<h:outputText value="context-param:"/>
@@ -120,63 +123,70 @@
</rich:tree >
...
]]></programlisting>
-<figure>
- <title>Nodes output</title>
- <mediaobject>
+ <figure>
+ <title>Nodes output</title>
+ <mediaobject>
<imageobject>
- <imagedata fileref="images/tree2.gif"/>
+ <imagedata fileref="images/tree2.gif"/>
</imageobject>
- </mediaobject>
+ </mediaobject>
</figure>
- <para>Hence, outputText outputs the "context-param" string and then the input is output for
- the data.name element of this node.</para>
- <para>Different nodes for rendering could be defined depending on some conditions on the tree level.
- Each condition represents some rendering template. To get more information on various <property>treeNodes</property>
- definition for nodes,
- <link linkend="tree">see the tree component chapter</link>.</para>
+ <para>Hence, outputText outputs the "context-param" string and then the input
+ is output for the data.name element of this node.</para>
+ <para>Different nodes for rendering could be defined depending on some conditions on the tree
+ level. Each condition represents some rendering template. To get more information on various
+ <property>treeNodes</property> definition for nodes, <link linkend="tree">see the tree
+ component chapter</link>.</para>
<para>Switching between expanded/collapsed modes is also managed on the tree level and defined
in <link linkend="tree">the corresponding section</link>.</para>
- <para>Default nodes of the tree level as well as ones defined with the <property>treeNodes</property> component could
- send AJAX requests when selected with the mouse, it's managed with the
- <emphasis ><property>"ajaxSubmitSelection"</property></emphasis> attribute
- (true/false).</para>
- </section>
- <section>
- <title>Built-in Drag and Drop</title>
- <para>The main information on Drag and Drop operations is given in
- <link linkend="tree">the corresponding paragraph</link> of
- the <property>tree</property> component chapter. It's only necessary to mention that each node could also be a Drag
- element as well as a Drop container, i.e. the container and the element have all attributes,
- listeners and ways of behavior similar to the ones of the <emphasis role="bold"><property><rich:draggable></property></emphasis> and <emphasis role="bold"><property><rich:dropZone></property></emphasis> components
- simultaneously.</para></section>
- <section>
- <title>Events Handling</title>
- <para>Just as Drag and Drop operations it corresponds to the one described on
- <link linkend="tree">the tree component level</link> for a default Node.</para>
- </section>
- <section>
- <title>Look-and-Feel Customization</title>
- <para>For skinnability implementation the components use a <emphasis
-><property>style class redefinition method</property></emphasis>.</para>
- <para>Default style classes are mapped on <emphasis
-><property>skin parameters</property>.</emphasis></para>
- <para>To redefine appearance of all treeNodes at once, there are two ways:</para>
- <itemizedlist>
- <listitem>to redefine corresponding skin parameters</listitem>
- <listitem>to add <emphasis
-><property>style classes</property></emphasis> used by the treeNode to your page style sheets</listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Skin parameters redefinition:</title>
- <table>
- <title>Default skins for treeNode element</title>
+ <para>Default nodes of the tree level as well as ones defined with the
+ <property>treeNodes</property> component could send AJAX requests when selected with the
+ mouse, it's managed with the <emphasis>
+ <property>"ajaxSubmitSelection"</property>
+ </emphasis> attribute (true/false).</para>
+ </section>
+ <section>
+ <title>Built-in Drag and Drop</title>
+ <para>The main information on Drag and Drop operations is given in <link linkend="tree">the
+ corresponding paragraph</link> of the <property>tree</property> component chapter.
+ It's only necessary to mention that each node could also be a Drag element as well as
+ a Drop container, i.e. the container and the element have all attributes, listeners and ways
+ of behavior similar to the ones of the <emphasis role="bold">
+ <property><rich:draggable></property>
+ </emphasis> and <emphasis role="bold">
+ <property><rich:dropZone></property>
+ </emphasis> components simultaneously.</para>
+ </section>
+ <section>
+ <title>Events Handling</title>
+ <para>Just as Drag and Drop operations it corresponds to the one described on <link
+ linkend="tree">the tree component level</link> for a default Node.</para>
+ </section>
+ <section>
+ <title>Look-and-Feel Customization</title>
+ <para>For skinnability implementation the components use a <emphasis>
+ <property>style class redefinition method</property>
+ </emphasis>.</para>
+ <para>Default style classes are mapped on <emphasis><property>skin
+ parameters</property>.</emphasis></para>
+ <para>To redefine appearance of all treeNodes at once, there are two ways:</para>
+ <itemizedlist>
+ <listitem>to redefine corresponding skin parameters</listitem>
+ <listitem>to add <emphasis>
+ <property>style classes</property>
+ </emphasis> used by the treeNode to your page style sheets</listitem>
+ </itemizedlist>
+ </section>
+ <section>
+ <title>Skin parameters redefinition:</title>
+ <table>
+ <title>Default skins for treeNode element</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Default skins for treeNode element</entry>
- <entry>Properties corresponding to CSS parameter</entry>
- </row>
+ <thead>
+ <row>
+ <entry>Default skins for treeNode element</entry>
+ <entry>Properties corresponding to CSS parameter</entry>
+ </row>
</thead>
<tbody>
<row>
@@ -188,20 +198,20 @@
<entry>font-size</entry>
</row>
<row>
- <entry>preferableDataFamilyFont</entry>
- <entry>font-family</entry>
+ <entry>preferableDataFamilyFont</entry>
+ <entry>font-family</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
- <title>Skin parameters for selected Node element</title>
+ <title>Skin parameters for selected Node element</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for selected Node element</entry>
- <entry>Properties corresponding to CSS parameter</entry>
- </row>
+ <thead>
+ <row>
+ <entry>Skin parameters for selected Node element</entry>
+ <entry>Properties corresponding to CSS parameter</entry>
+ </row>
</thead>
<tbody>
<row>
@@ -213,20 +223,20 @@
<entry>background-color</entry>
</row>
<row>
- <entry>headTextColor</entry>
- <entry>color</entry>
+ <entry>headTextColor</entry>
+ <entry>color</entry>
</row>
</tbody>
</tgroup>
</table>
<table>
- <title>Skin parameters for mouseovered Node element</title>
+ <title>Skin parameters for mouseovered Node element</title>
<tgroup cols="2">
- <thead>
- <row>
- <entry>Skin parameters for mouseovered Node element</entry>
- <entry>Properties corresponding to CSS parameter</entry>
- </row>
+ <thead>
+ <row>
+ <entry>Skin parameters for mouseovered Node element</entry>
+ <entry>Properties corresponding to CSS parameter</entry>
+ </row>
</thead>
<tbody>
<row>
@@ -236,27 +246,31 @@
</tbody>
</tgroup>
</table>
- <para>Hence, to change look and feel of all <property>treeNodes</property> components on an application, change these
- parameters values.</para>
- </section>
- <section>
- <title>Definition custom style classes:</title>
- <para>The following classes are applied to a node element in three states: default, marked,
+ <para>Hence, to change look and feel of all <property>treeNodes</property> components on an
+ application, change these parameters values.</para>
+ </section>
+ <section>
+ <title>Definition custom style classes:</title>
+ <para>The following classes are applied to a node element in three states: default, marked,
mouseovered:</para>
- <itemizedlist>
- <listitem>rich-tree-node</listitem>
- <listitem>rich-tree-node-selected</listitem>
- <listitem>rich-tree-node-highlighted</listitem>
- </itemizedlist>
- <para>Hence, in order to change an appearance of all <property>treeNodes</property> on a page,
- declare and customize the above-mentioned classes in your CSS.</para>
- <para>It is also possible to change look and feel of specific <property>treeNodes</property>
- with the help of defining for them
- <emphasis ><property>"selectedClass"</property></emphasis>
- and <emphasis ><property>"highlightedClass"</property></emphasis>
- attributes by their specific classes.</para>
- </section>
- </section>
-
-
-
\ No newline at end of file
+ <itemizedlist>
+ <listitem>rich-tree-node</listitem>
+ <listitem>rich-tree-node-selected</listitem>
+ <listitem>rich-tree-node-highlighted</listitem>
+ </itemizedlist>
+ <para>Hence, in order to change an appearance of all <property>treeNodes</property> on a page,
+ declare and customize the above-mentioned classes in your CSS.</para>
+ <para>It is also possible to change look and feel of specific <property>treeNodes</property>
+ with the help of defining for them <emphasis>
+ <property>"selectedClass"</property>
+ </emphasis> and <emphasis>
+ <property>"highlightedClass"</property>
+ </emphasis> attributes by their specific classes.</para>
+ </section>
+
+ <section>
+ <title>Relevant resources links</title>
+ <para>How to Expand/Collapse Tree Nodes from code see <ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes">here</ulink>. </para>
+ </section>
+</section>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-14 07:59:59 UTC (rev 2238)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-08-14 08:52:27 UTC (rev 2239)
@@ -44,9 +44,8 @@
<section>
<?dbhtml filename="HowtobuildRichFacessnapshotmanually.html"?>
<title>How to build RichFaces snapshot manually?</title>
- <para>As it was mentioned <link linkend="Wherearethesnapshots">
- before</link> you can download the snapshots or you can build them
- manually. This <ulink
+ <para>As it was mentioned <link linkend="Wherearethesnapshots"> before</link> you
+ can download the snapshots or you can build them manually. This <ulink
url="http://labs.jboss.com/wiki/HowToBuildRichFacesSnapshotManually"
> wiki article</ulink> helps you.</para>
</section>
@@ -81,8 +80,8 @@
url="http://anonsvn.jboss.org/repos/richfaces/trunk/samples/richfaces-demo/"
>here</ulink>.</para>
<para>See also <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113454"
- >how to prevent richfaces-demo deployment failed</ulink>.</para>
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=113454"
+ >how to prevent richfaces-demo deployment failed</ulink>.</para>
</section>
<section>
@@ -356,11 +355,13 @@
]]></programlisting>
<para>
<note>
- <title>Note:</title>Two rules are important for modalPanel:
- <itemizedlist>
- <listitem>modalPanel must have its own form if it has form elements (input or/and command components) inside (as it was shown in the example above) </listitem>
- <listitem>modalPanel must not be included into the form (on any level up) if it has the form inside.</listitem>
- </itemizedlist></note>
+ <title>Note:</title>Two rules are important for modalPanel: <itemizedlist>
+ <listitem>modalPanel must have its own form if it has form
+ elements (input or/and command components) inside
+ (as it was shown in the example above) </listitem>
+ <listitem>modalPanel must not be included into the form (on
+ any level up) if it has the form inside.</listitem>
+ </itemizedlist></note>
</para>
</section>
@@ -387,12 +388,12 @@
...
]]></programlisting>
</section>
-
+
<section>
<?dbhtml filename="Howtoremembercurrentselectedtab.html"?>
<title>How to remember the current selected tab?</title>
<para> For necessary information you can see discussion about this problem on the
- <ulink
+ <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=111761"
>RichFaces Users Forum</ulink>.</para>
</section>
@@ -510,170 +511,187 @@
</section>
- <section id="DecidingWhatToChangeOnTheServerSide">
- <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
- <title>What should I change on the server side?</title>
- <para> As it was mentioned <ulink url="index.html#DecideWhatToChange">before</ulink>, the
- list of zones to be reRendered can be specified as EL expression. But there is a
- question that must be specified more exactly. </para>
- <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE. Therefore, in this
- case one can point reRender to the Set type Bean's property and fill the Set
- during a tracking request. </para>
- <para> It's the way to form a list of updatable areas dynamically. </para>
- </section>
- <section id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
- <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>
+ <section>
+ <?dbhtml filename="HowtoExpand/CollapseTreeNodesfromcode.html"?>
+ <title>How to Expand/Collapse Tree Nodes from code?</title>
+ <para>The answer could be found <ulink
+ url="http://labs.jboss.com/wiki/ExpandCollapseTreeNodes"
+ >here</ulink>.</para>
+ </section>
- <title>How to check sending request conditions? Custom JavaScript before request
- "OnSubmit" attribute.</title>
- <para> To check on the client some terms of request sending, the <emphasis >
- <property>"onSubmit</property>
- </emphasis>" attribute is added to all components, which may cause the request. </para>
- <para>
- <emphasis role="bold">Example: </emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
+ <section id="DecidingWhatToChangeOnTheServerSide">
+ <?dbhtml filename="DecidingWhatToChangeOnTheServerSide.html"?>
+ <title>What should I change on the server side?</title>
+ <para> As it was mentioned <ulink url="index.html#DecideWhatToChange"
+ >before</ulink>, the list of zones to be reRendered can be specified as EL
+ expression. But there is a question that must be specified more exactly. </para>
+ <para> The list of Ids is formed during beforePhase of RENDER_RESPONSE. Therefore,
+ in this case one can point reRender to the Set type Bean's property
+ and fill the Set during a tracking request. </para>
+ <para> It's the way to form a list of updatable areas dynamically. </para>
+ </section>
+ <section id="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute">
+ <?dbhtml filename="CheckSendingRequestConditions.CustomJavaScriptBeforeRequest.OnSubmitAttribute.html"?>
+
+ <title>How to check sending request conditions? Custom JavaScript before request
+ "OnSubmit" attribute.</title>
+ <para> To check on the client some terms of request sending, the <emphasis>
+ <property>"onSubmit</property>
+ </emphasis>" attribute is added to all components, which may cause
+ the request. </para>
+ <para>
+ <emphasis role="bold">Example: </emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<h:inputText id="i" value="#{beanText.kennung}">
<a4j:support event="onfocus" onsubmit="doSomething();" reRender="panelToReRender"/>
</h:inputText>]]></programlisting>
- <para> So in this case "<emphasis
- ><property>doSomething()</property>"</emphasis> function is executed before
- the AJAX request. </para>
- <para> Besides, if this function returns "false", AJAX request
- isn't fired. </para>
- <note>
- <title>Note:</title>
- <para>Behavior of our <emphasis >
- <property>"onsubmit"</property>
- </emphasis>slightly differs from the standard one. Do not return <emphasis
- >
- <property>"true"</property>
- </emphasis> if you want to fire the request - because <emphasis role="bold">
- <property><xxx><a4j:support
- event="onclick" onsubmit="return
- true;"></property>
- </emphasis> is transformed into <xxx onclick="return true;
- A4J.Submit(.... );" > and the request isn't fired also in
- this case (but the standard event processing fired). You must only return <emphasis
- >
- <property>"false"</property>
- </emphasis> if your conditions weren't completed or perform some actions
- (if needed) without any returns in case you need to fire it. </para>
- </note>
- </section>
- <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
- <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
- <title> What is differences of "onCompelete" attribute after release 1.0?</title>
- <para> To avoid differences with other JavaScript attributes, a function placement in a
- JavaScript call is changed, instead of simple inserting of attribute content
- (..oncomplete :anotherFunction(this)..), it places (oncomplete:
- function(){anotherFunction(this);}..) in anonymous function, to allow put
- "chain" of statements in attribute. </para>
- <para> Since, <emphasis >
- <property>"this"</property>
- </emphasis> keyword will point to a parameters map instead of a control element as it
- was before. You may use <emphasis >
- <property>document.findElementById()</property>
- </emphasis>to get references to this object after a request is processed as when a page
- is updated in AJAX you will have reference to a control, removed from a DOM tree. </para>
- <para> Or, if you are sure that your element is not updated, you can add <emphasis
- >
- <property>"onsubmit"</property>
- </emphasis> in <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis> (or onclick in <emphasis role="bold">
- <property><a4j:commandLink/Button></property>
- </emphasis>) to place reference to known variable (<emphasis role="bold">
- <property><a4j:commandLink onclick="var myControl=this;"
- oncomplete="anotherFunction(myControl)"/></property>
- </emphasis>). </para>
- <important>
- <title>New:</title>
- <para> The onComplete syntax now is: </para>
- <programlisting role="XML">
+ <para> So in this case
+ "<emphasis><property>doSomething()</property>"</emphasis>
+ function is executed before the AJAX request. </para>
+ <para> Besides, if this function returns "false", AJAX request
+ isn't fired. </para>
+ <note>
+ <title>Note:</title>
+ <para>Behavior of our <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis>slightly differs from the standard one. Do not return <emphasis>
+ <property>"true"</property>
+ </emphasis> if you want to fire the request - because <emphasis
+ role="bold">
+ <property><xxx><a4j:support
+ event="onclick"
+ onsubmit="return
+ true;"></property>
+ </emphasis> is transformed into <xxx onclick="return
+ true; A4J.Submit(.... );" > and the request
+ isn't fired also in this case (but the standard event
+ processing fired). You must only return <emphasis>
+ <property>"false"</property>
+ </emphasis> if your conditions weren't completed or perform
+ some actions (if needed) without any returns in case you need to
+ fire it. </para>
+ </note>
+ </section>
+ <section id="onCompleteAttribute.DifferencesAfterRelease1.0">
+ <?dbhtml filename="onCompleteAttribute.DifferencesAfterRelease1.0.html"?>
+ <title> What is differences of "onCompelete" attribute after
+ release 1.0?</title>
+ <para> To avoid differences with other JavaScript attributes, a function placement
+ in a JavaScript call is changed, instead of simple inserting of attribute
+ content (..oncomplete :anotherFunction(this)..), it places (oncomplete:
+ function(){anotherFunction(this);}..) in anonymous function, to allow put
+ "chain" of statements in attribute. </para>
+ <para> Since, <emphasis>
+ <property>"this"</property>
+ </emphasis> keyword will point to a parameters map instead of a control
+ element as it was before. You may use <emphasis>
+ <property>document.findElementById()</property>
+ </emphasis>to get references to this object after a request is processed as
+ when a page is updated in AJAX you will have reference to a control, removed
+ from a DOM tree. </para>
+ <para> Or, if you are sure that your element is not updated, you can add <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> in <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis> (or onclick in <emphasis role="bold">
+ <property><a4j:commandLink/Button></property>
+ </emphasis>) to place reference to known variable (<emphasis role="bold">
+ <property><a4j:commandLink onclick="var myControl=this;"
+ oncomplete="anotherFunction(myControl)"/></property>
+ </emphasis>). </para>
+ <important>
+ <title>New:</title>
+ <para> The onComplete syntax now is: </para>
+ <programlisting role="XML">
<![CDATA[<someAjaxActionComponent ...oncomplete="myFunc(req,event,data)".../>]]>
</programlisting>
- <para> where the <property>event</property> is a variable where the JS event copy that
- fires the request is placed into. One may use it to get the element instead of this.
- and <property>data</property> is a variable that contains deserialized value from
- the <property>data</property> attribute. </para>
- </important>
- </section>
- <section id="InvokeOnComponentUsingWithJSF1.2">
- <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
- <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
- <para> Ajax4jsf currently does not use <emphasis >invokeOnComponent</emphasis>
- because of the 2 reasons: </para>
- <itemizedlist>
- <listitem> Compatibility with JSF 1.1 and MyFaces applications is kept, due to a big
- amount of code used in corporate applications. </listitem>
- <listitem>
- <emphasis > InvokeOnComponent</emphasis> works with already known
- clientId, and works fine for communication between widget and backed component, or
- updates content of already rendered component. But there are some troubles to use
- this method for more complex use-cases implemented in Ajax4jsf, as there is a choice
- for updatable components in application logic, where it's necessary to
- navigate in a components tree by the native id, with
- <property>findComponent()</property> methods. </listitem>
- </itemizedlist>
- <para> Thus, for example, only entire dataTable can be updated in response (but all AJAX
- action components inside table work properly). </para>
- </section>
- <!--<section id="RegionsInDataTables">
+ <para> where the <property>event</property> is a variable where the JS event
+ copy that fires the request is placed into. One may use it to get
+ the element instead of this. and <property>data</property> is a
+ variable that contains deserialized value from the
+ <property>data</property> attribute. </para>
+ </important>
+ </section>
+ <section id="InvokeOnComponentUsingWithJSF1.2">
+ <?dbhtml filename="InvokeOnComponentUsingWithJSF1.2.html"?>
+ <title>Is it possible to use InvokeOnComponent with JSF 1.2?</title>
+ <para> Ajax4jsf currently does not use <emphasis>invokeOnComponent</emphasis>
+ because of the 2 reasons: </para>
+ <itemizedlist>
+ <listitem> Compatibility with JSF 1.1 and MyFaces applications is kept, due
+ to a big amount of code used in corporate applications. </listitem>
+ <listitem>
+ <emphasis> InvokeOnComponent</emphasis> works with already known
+ clientId, and works fine for communication between widget and backed
+ component, or updates content of already rendered component. But
+ there are some troubles to use this method for more complex
+ use-cases implemented in Ajax4jsf, as there is a choice for
+ updatable components in application logic, where it's
+ necessary to navigate in a components tree by the native id, with
+ <property>findComponent()</property> methods. </listitem>
+ </itemizedlist>
+ <para> Thus, for example, only entire dataTable can be updated in response (but all
+ AJAX action components inside table work properly). </para>
+ </section>
+ <!--<section id="RegionsInDataTables">
<?dbhtml filename="RegionsInDataTables.html"?>
<title>Regions in Data Tables</title>
<para>The regions in Data Tables aren't supported now, but the feature will be implemented in a new Ajax4jsf version for JSF 1.2.</para>
</section>-->
- <section id="keepAliveComponentGeneratesException">
- <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
- <title>How to avoid generating exception for "keepAlive" component?</title>
- <para>To avoid exception, don't forget that the component stores beans in
- serialized view, but your bean should implement java.io.Serializable.</para>
- </section>
- <section id="FilterUsageDamagesAnApplicationLayout">
- <?dbhtml filename="FilterUsageDamagesAnApplicationLayout.html"?>
- <title>Why does filter usage damage an application layout?</title>
- <para>Ajax4jsf uses <property>filters</property> for correction of xhtml code received on an
- AJAX response, because when a response is recieved from the server, Ajax4jsf makes
- direct changes in DOM tree and browser doesn't make any corrections in
- generated xhtml. There are two ways for setting <property>filters</property> that could
- be used in an Ajax4jsf-based application.</para>
- <para> The first one:</para>
+ <section id="keepAliveComponentGeneratesException">
+ <?dbhtml filename="keepAliveComponentGeneratesException.html"?>
+ <title>How to avoid generating exception for "keepAlive"
+ component?</title>
+ <para>To avoid exception, don't forget that the component stores beans in
+ serialized view, but your bean should implement java.io.Serializable.</para>
+ </section>
+ <section id="FilterUsageDamagesAnApplicationLayout">
+ <?dbhtml filename="FilterUsageDamagesAnApplicationLayout.html"?>
+ <title>Why does filter usage damage an application layout?</title>
+ <para>Ajax4jsf uses <property>filters</property> for correction of xhtml code
+ received on an AJAX response, because when a response is recieved from the
+ server, Ajax4jsf makes direct changes in DOM tree and browser
+ doesn't make any corrections in generated xhtml. There are two ways
+ for setting <property>filters</property> that could be used in an
+ Ajax4jsf-based application.</para>
+ <para> The first one:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<context-param filter>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<context-param filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>]]></programlisting>
- <para>This <property>filter</property> is based on Tidy Filter usage and recommended for
- applications with complicated or non-standard markup, as all the necessary xhtml code
- corrections are made by the filter when a response comes from the server.</para>
- <para> Anyway, some obvious errors could damage a layout, if it happens, make sure that the
- markup corresponds to the xhtml-strict specification. </para>
- <para>The second one:</para>
+ <para>This <property>filter</property> is based on Tidy Filter usage and recommended
+ for applications with complicated or non-standard markup, as all the
+ necessary xhtml code corrections are made by the filter when a response
+ comes from the server.</para>
+ <para> Anyway, some obvious errors could damage a layout, if it happens, make sure
+ that the markup corresponds to the xhtml-strict specification. </para>
+ <para>The second one:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<filter>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<filter>
<display-name>org.ajax4jsf.FastFilter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.FastFilter</filter-class>
</filter>]]></programlisting>
- <para>This <property>filter</property> is based on the Nekko pacer. In this case an output
- xhtml code isn't strictly verified and it also could cause lot's of
- errors and corrupt a layout as a result. Though if you sure that your application markup
- is really strict for this filter, the filter considerably accelerates all AJAX requests
- processing. </para>
- <para><emphasis role="bold">Extra information</emphasis>. </para>
- <para>forceParcer parameters setting for <property>filters</property>:</para>
+ <para>This <property>filter</property> is based on the Nekko pacer. In this case an
+ output xhtml code isn't strictly verified and it also could cause
+ lot's of errors and corrupt a layout as a result. Though if you
+ sure that your application markup is really strict for this filter, the
+ filter considerably accelerates all AJAX requests processing. </para>
+ <para><emphasis role="bold">Extra information</emphasis>. </para>
+ <para>forceParcer parameters setting for <property>filters</property>:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<filter>
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<filter>
...
<init-param>
<param-name>forceparser</param-name>
@@ -681,186 +699,191 @@
</init-param>
...
</filter>]]></programlisting>
- <para>The "false" setting for initialization parameter switches off
- application of filters for non-AJAX requests, if "true" is chosen, the
- filter checks all requests. <important>
- <title>Changes for Ajax4jsf 1.1.0</title>
- <property>forceparser parameter</property> default value is false from this version.
- </important>
- </para>
- </section>
- <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
- <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
- <title>Why form isn't submitted or setter isn't called after AJAX request?</title>
- <para>This situation could happen because of conversion/validation errors on form
- submission. In order to verify this, it's necessary to place this updating via
- an AJAX error message inside a form:</para>
+ <para>The "false" setting for initialization parameter switches
+ off application of filters for non-AJAX requests, if
+ "true" is chosen, the filter checks all requests. <important>
+ <title>Changes for Ajax4jsf 1.1.0</title>
+ <property>forceparser parameter</property> default value is false
+ from this version. </important>
+ </para>
+ </section>
+ <section id="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest">
+ <?dbhtml filename="AFormIsNotSubmittedOrASetterIsNotCalledAfterAJAXrequest.html"?>
+ <title>Why form isn't submitted or setter isn't called after AJAX
+ request?</title>
+ <para>This situation could happen because of conversion/validation errors on form
+ submission. In order to verify this, it's necessary to place this
+ updating via an AJAX error message inside a form:</para>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
- <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+ <programlisting role="XML"><![CDATA[<a4j:outputPanel ajaxRendered="true">
<h:messages/>
</a4j:outpurPanel>]]></programlisting>
- </section>
+ </section>
- <section id="DelayedRenderZone">
- <?dbhtml filename="DelayedRenderZone.html"?>
- <title>How to create "a4j delayed render zone"?</title>
- <para>The <emphasis role="bold"><a4j:support></emphasis> component has a
- "requestDelay" attribute where you can define the delay.</para>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104969"
- >Ajax4Jsf Users Forum.</ulink>
- </para>
- </section>
+ <section id="DelayedRenderZone">
+ <?dbhtml filename="DelayedRenderZone.html"?>
+ <title>How to create "a4j delayed render zone"?</title>
+ <para>The <emphasis role="bold"><a4j:support></emphasis> component has
+ a "requestDelay" attribute where you can define the delay.</para>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104969"
+ >Ajax4Jsf Users Forum.</ulink>
+ </para>
+ </section>
- <section id="HowToStopPoll">
- <?dbhtml filename="HowToStopPoll.html"?>
- <title>How to stop "a4j:poll"?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104951"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="HowToStopPoll">
+ <?dbhtml filename="HowToStopPoll.html"?>
+ <title>How to stop "a4j:poll"?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104951"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="IgnoreDupResponsesAndRequestDelay">
- <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
+ <section id="IgnoreDupResponsesAndRequestDelay">
+ <?dbhtml filename="IgnoreDupResponsesAndRequestDelay.html"?>
- <title>How to use IgnoreDupResponses and requestDelay?</title>
- <para>The <emphasis >
- <property>"IgnoreDupResponses"</property>
- </emphasis> attribute appeared from 1.0.4 RC1 version and is used on the client for
- response ignoring after an AJAX request if a newer request has been already sent. <para>
- The additional information could be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
- >here</ulink>. </para>
- <emphasis >
- <property>"RequestDelay"</property>
- </emphasis> attribute also defines the client behavior. It sets the time delay, after
- which another request could be sent, all other requests are taken away from a queue
- except the last one. </para>
- </section>
+ <title>How to use IgnoreDupResponses and requestDelay?</title>
+ <para>The <emphasis>
+ <property>"IgnoreDupResponses"</property>
+ </emphasis> attribute appeared from 1.0.4 RC1 version and is used on the
+ client for response ignoring after an AJAX request if a newer request has
+ been already sent. <para> The additional information could be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
+ >here</ulink>. </para>
+ <emphasis>
+ <property>"RequestDelay"</property>
+ </emphasis> attribute also defines the client behavior. It sets the time
+ delay, after which another request could be sent, all other requests are
+ taken away from a queue except the last one. </para>
+ </section>
- <section id="RefreshImage">
- <?dbhtml filename="RefreshImage.html"?>
- <title>How to refresh an image using <a4j:support> component?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105995"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="RefreshImage">
+ <?dbhtml filename="RefreshImage.html"?>
+ <title>How to refresh an image using <a4j:support> component?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105995"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="EventQueueUsage">
- <?dbhtml filename="EventQueueUsage.html"?>
- <title>How to use "EventQueue" attribute?</title>
- <para>The <emphasis >
- <property>"EventQueue"</property>
- </emphasis> attribute defines the query name where the requests are saved before their
- sending to the server. The queue is created for redundant requests deleting during
- frequent events, which call several requests forming one after another. The queue cuts
- redundant requests and send only the last one. The queue is created in any case and
- named on default, the attribute usage only re-defines this name. </para>
- </section>
+ <section id="EventQueueUsage">
+ <?dbhtml filename="EventQueueUsage.html"?>
+ <title>How to use "EventQueue" attribute?</title>
+ <para>The <emphasis>
+ <property>"EventQueue"</property>
+ </emphasis> attribute defines the query name where the requests are saved
+ before their sending to the server. The queue is created for redundant
+ requests deleting during frequent events, which call several requests
+ forming one after another. The queue cuts redundant requests and send only
+ the last one. The queue is created in any case and named on default, the
+ attribute usage only re-defines this name. </para>
+ </section>
- <section id="PageRequiredOrNot">
- <?dbhtml filename="PageRequiredOrNot.html"?>
- <title>Is <a4j:page> component required or not?</title>
- <para>
- <emphasis role="bold"><4j:page></emphasis> is a component used for solving
- of incompatibility problems in early Ajax4jsf and MyFaces versions. The component
- encodes the full html page structure. </para>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=106849&p..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="PageRequiredOrNot">
+ <?dbhtml filename="PageRequiredOrNot.html"?>
+ <title>Is <a4j:page> component required or not?</title>
+ <para>
+ <emphasis role="bold"><4j:page></emphasis> is a component used
+ for solving of incompatibility problems in early Ajax4jsf and MyFaces
+ versions. The component encodes the full html page structure. </para>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=106849&p..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="SeveralStatusOnPage">
- <?dbhtml filename="SeveralStatusOnPage.html"?>
- <title>Can I have several <a4j:status> components on one page?</title>
- <para>Yes, you can. More information about this problem could be found on the <ulink
- url="http://livedemo.exadel.com/a4j-status/">JBoss Ajax4jsf Online Demos</ulink>.
- </para>
- </section>
+ <section id="SeveralStatusOnPage">
+ <?dbhtml filename="SeveralStatusOnPage.html"?>
+ <title>Can I have several <a4j:status> components on one page?</title>
+ <para>Yes, you can. More information about this problem could be found on the <ulink
+ url="http://livedemo.exadel.com/a4j-status/">JBoss Ajax4jsf Online
+ Demos</ulink>. </para>
+ </section>
- <section id="SomeProblemsWithRendering">
- <?dbhtml filename="SomeProblemsWithRendering.html"?>
- <title>Can I use <a4j:region> within <a4j:repeat>?</title>
- <para>
- <emphasis role="bold"><a4j:region></emphasis> can't work inside
- iteration components like <emphasis role="bold"><h:dataTable></emphasis>
- and <emphasis role="bold"><a4j:repeat></emphasis>. </para>
- <para>The details could be found <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=109080"
- >here. </ulink>
- </para>
- </section>
+ <section id="SomeProblemsWithRendering">
+ <?dbhtml filename="SomeProblemsWithRendering.html"?>
+ <title>Can I use <a4j:region> within <a4j:repeat>?</title>
+ <para>
+ <emphasis role="bold"><a4j:region></emphasis> can't
+ work inside iteration components like <emphasis role="bold"
+ ><h:dataTable></emphasis> and <emphasis role="bold"
+ ><a4j:repeat></emphasis>. </para>
+ <para>The details could be found <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=109080"
+ >here. </ulink>
+ </para>
+ </section>
- <section id="CustomAjaxRequest">
- <?dbhtml filename="CustomAjaxRequest.html"?>
- <title>Why custom AJAX request does not work?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114025"
- >Ajax4Jsf Users Forum.</ulink>
- </para>
- </section>
-
-
- <section id="RerederingSingleDataTableColumn">
- <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
- <title>How to reRender single dataTable column?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105725"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="CustomAjaxRequest">
+ <?dbhtml filename="CustomAjaxRequest.html"?>
+ <title>Why custom AJAX request does not work?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&t=114025"
+ >Ajax4Jsf Users Forum.</ulink>
+ </para>
+ </section>
- <section id="DisableSkins">
- <?dbhtml filename="DisableSkins.html"?>
- <title>How to disable skinability?</title>
- There is possibility to use special skin with name "plain". It doesn't have any parameters.
- It's necessary for embedding RichFaces components into existing projecst which have its own styles.
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066340#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
-
- <section id="reRenderingfailed">
- <?dbhtml filename="reRenderingfailed.html"?>
- <title>Why does reRendering fail? Hide/Show components using rendered.</title>
- <para> During "show/hide" functionality implementation the main error
- happens because of the "reRender" attribute of some AJAX Action
- Component is set on a component that depends on rendered properties, i.e. a component
- that is to be hidden/rendered is tried to be updated. The problem is that if
- rendered="false" in this moment, the component isn't in the
- DOM tree and can't be updated because of the general limitations described in
- the Ajax Processing chapter. </para>
- <para>The correct variant of functionality implantation:</para>
- <orderedlist>
- <listitem>
- <para>With the rendered attribute wrap the component that is to be hidden or
- rendered on AJAX in a wrapper component (e.g. a4j:outputPanel)</para>
- </listitem>
+ <section id="RerederingSingleDataTableColumn">
+ <?dbhtml filename="RerederingSingleDataTableColumn.html"?>
+ <title>How to reRender single dataTable column?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105725"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <listitem>
- <para>Set reRender of an AJAX Action component on this wrapper component instead of
- the component itself.</para>
- </listitem>
- </orderedlist>
+ <section id="DisableSkins">
+ <?dbhtml filename="DisableSkins.html"?>
+ <title>How to disable skinability?</title> There is possibility to use special skin
+ with name "plain". It doesn't have any parameters. It's necessary for embedding
+ RichFaces components into existing projecst which have its own styles. <para>For
+ information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066340#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <para>
- <emphasis role="bold">Example:</emphasis>
- </para>
+ <section id="reRenderingfailed">
+ <?dbhtml filename="reRenderingfailed.html"?>
+ <title>Why does reRendering fail? Hide/Show components using rendered.</title>
+ <para> During "show/hide" functionality implementation the main
+ error happens because of the "reRender" attribute of some
+ AJAX Action Component is set on a component that depends on rendered
+ properties, i.e. a component that is to be hidden/rendered is tried to be
+ updated. The problem is that if rendered="false" in this
+ moment, the component isn't in the DOM tree and can't be
+ updated because of the general limitations described in the Ajax Processing
+ chapter. </para>
+ <para>The correct variant of functionality implantation:</para>
- <programlisting role="XML"><![CDATA[...
+ <orderedlist>
+ <listitem>
+ <para>With the rendered attribute wrap the component that is to be
+ hidden or rendered on AJAX in a wrapper component (e.g.
+ a4j:outputPanel)</para>
+ </listitem>
+
+ <listitem>
+ <para>Set reRender of an AJAX Action component on this wrapper
+ component instead of the component itself.</para>
+ </listitem>
+ </orderedlist>
+
+ <para>
+ <emphasis role="bold">Example:</emphasis>
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
<a4j:outputPanel id="panel">
<h:panelGroup rendered="#{bean.rendered}">
<!--Some nested content to be hidden/shown depending on bean.rendered -->
@@ -871,47 +894,47 @@
...
]]></programlisting>
- <para>In this case the wrapper component always presents in the DOM tree and its inner
- content could be updated dynamically on AJAX.</para>
- </section>
+ <para>In this case the wrapper component always presents in the DOM tree and its
+ inner content could be updated dynamically on AJAX.</para>
+ </section>
- <section id="PreventDupRerenderingPoll">
- <?dbhtml filename="PreventDupRerenderingPoll.html"?>
- <title>How to prevent duplicate reRendering when using <a4j:poll>?</title>
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059731#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
-
- <section id="JSCallPropblemsInInclude">
- <?dbhtml filename="JSCallPropblemsInInclude.html"?>
- <title>Why does JavaScript call don't work in <a4j:include>?</title>
- <para>More information about this problem could be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104317"
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
+ <section id="PreventDupRerenderingPoll">
+ <?dbhtml filename="PreventDupRerenderingPoll.html"?>
+ <title>How to prevent duplicate reRendering when using <a4j:poll>?</title>
+ <para>For information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059731#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <section id="IncludeAndNavRules">
- <?dbhtml filename="IncludeAndNavRules.html"?>
- <title>How to use <a4j:include> and navigation rules?</title>
- <para>For information you can see discussion about this problem on the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
- >Ajax4Jsf Users Forum. </ulink>
- </para>
- </section>
-
- <section id="ResourceNotRegisteredException">
- <?dbhtml filename="ResourceNotRegisteredException.html"?>
- <title>What does ResourceNotRegistered Exception mean?</title>
+ <section id="JSCallPropblemsInInclude">
+ <?dbhtml filename="JSCallPropblemsInInclude.html"?>
+ <title>Why does JavaScript call don't work in <a4j:include>?</title>
+ <para>More information about this problem could be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=104317"
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <para>Ajax4jsf registers its resources (scripts, images) after an application is accessed
- and then accesses it via a generated URL. During an application development when a
- developer constantly updates it on the server, it could happen that Ajax4jsf
- re-registers its resources after every server restart and a browser tries to access them
- via cashed URL.</para>
+ <section id="IncludeAndNavRules">
+ <?dbhtml filename="IncludeAndNavRules.html"?>
+ <title>How to use <a4j:include> and navigation rules?</title>
+ <para>For information you can see discussion about this problem on the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062036#..."
+ >Ajax4Jsf Users Forum. </ulink>
+ </para>
+ </section>
- <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
- </section>
+ <section id="ResourceNotRegisteredException">
+ <?dbhtml filename="ResourceNotRegisteredException.html"?>
+ <title>What does ResourceNotRegistered Exception mean?</title>
+
+ <para>Ajax4jsf registers its resources (scripts, images) after an application is
+ accessed and then accesses it via a generated URL. During an application
+ development when a developer constantly updates it on the server, it could
+ happen that Ajax4jsf re-registers its resources after every server restart
+ and a browser tries to access them via cashed URL.</para>
+
+ <para>The problem is solved with browser cash update (e.g. CTRL+F5).</para>
+ </section>
</chapter>
18 years, 8 months
JBoss Rich Faces SVN: r2238 - trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-08-14 03:59:59 -0400 (Tue, 14 Aug 2007)
New Revision: 2238
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-498 fixed
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2007-08-14 01:27:59 UTC (rev 2237)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuGroupRendererBase.java 2007-08-14 07:59:59 UTC (rev 2238)
@@ -72,14 +72,14 @@
ComponentsVariableResolver.getVariables(this, menuGroup);
String icon = ViewUtil.getResourceURL(menuGroup.getIcon());
- if (icon == null) {
+ if (icon == null || icon.length() == 0) {
icon = getSpacerUri(context, menuGroup);
}
variables.setVariable("icon", icon);
String iconDisabled = ViewUtil.getResourceURL(menuGroup.getIconDisabled());
- if (iconDisabled == null) {
+ if (iconDisabled == null || iconDisabled.length() == 0) {
iconDisabled = getSpacerUri(context, menuGroup);
}
@@ -89,14 +89,14 @@
variables.setVariable("actualIcon", actualIcon);
String iconFolder = ViewUtil.getResourceURL(menuGroup.getIconFolder());
- if (iconFolder == null) {
+ if (iconFolder == null || iconFolder.length() == 0) {
iconFolder = getSpacerUri(context, menuGroup);
}
variables.setVariable("iconFolder", iconFolder);
String iconFolderDisabled = ViewUtil.getResourceURL(menuGroup.getIconFolderDisabled());
- if (iconFolderDisabled == null) {
+ if (iconFolderDisabled == null || iconFolderDisabled.length() == 0) {
iconFolderDisabled = getSpacerUri(context, menuGroup);
}
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-08-14 01:27:59 UTC (rev 2237)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-08-14 07:59:59 UTC (rev 2238)
@@ -86,7 +86,7 @@
String resource = menuItem.isDisabled()
? ViewUtil.getResourceURL(menuItem.getIconDisabled())
: ViewUtil.getResourceURL(menuItem.getIcon());
- if (resource == null) {
+ if (resource == null || (resource.length() == 0)) {
resource = getResource("images/spacer.gif").getUri(
context, menuItem);
}
18 years, 8 months