JBoss Rich Faces SVN: r3577 - in trunk/sandbox/ui/orderingList/src/main/templates: org and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-26 14:50:55 -0400 (Fri, 26 Oct 2007)
New Revision: 3577
Added:
trunk/sandbox/ui/orderingList/src/main/templates/org/
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/
trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
Log:
htmlSelectOrderShuttle.jspx is added
Added: trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
===================================================================
--- trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx (rev 0)
+++ trunk/sandbox/ui/orderingList/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx 2007-10-26 18:50:55 UTC (rev 3577)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ baseclass="org.richfaces.renderkit.html.SelectOrderShuttleRendererBase"
+ class="org.richfaces.renderkit.html.SelectOrderShuttleRenderer"
+ component="org.richfaces.component.UISelectOrderShuttle"
+ >
+ <h:styles>css/selectOrderShuttle.xcss</h:styles>
+
+ <h:scripts>
+ scripts/StringBuilder.js,scripts/SelectItem.js,scripts/SelectOrderShuttle.js
+ </h:scripts>
+
+ <f:clientid var="clientId"/>
+ <div id="#{clientId}">
+ <vcp:body>
+ <input type="text" value="dsfdsf" name="asdasdas"/>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ </div>
+ <a href="#" onclick="shuttle.sort();">Header</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('up');">up</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('down');">down</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('first');">first</a><br/>
+ <a href="#" onclick="shuttle.moveSelectedItems('last');">last</a>
+ <script type="text/javascript">
+ #{this:initJSShuttleObject(context, component)}
+ document.body.onselectstart = function() {return false;};
+ document.body.className = "body";
+
+ </script>
+</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3576 - trunk/ui/dropdown-menu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2007-10-26 14:47:32 -0400 (Fri, 26 Oct 2007)
New Revision: 3576
Added:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
Removed:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
Log:
revertof htmlDropDownMenu.jspx
Copied: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx (from rev 3563, trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx)
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx (rev 0)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-10-26 18:47:32 UTC (rev 3576)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:c=" http://java.sun.com/jsf/core"
+ xmlns:ui=" http://ajax4jsf.org/cdk/ui"
+ xmlns:u=" http://ajax4jsf.org/cdk/u"
+ xmlns:x=" http://ajax4jsf.org/cdk/x"
+ baseclass="org.richfaces.renderkit.html.DropDownMenuRendererBase"
+ class="org.richfaces.renderkit.html.DropDownMenuRenderer"
+ component="org.richfaces.component.UIDropDownMenu"
+ >
+ <h:styles>css/dropdownmenu.xcss</h:styles>
+
+ <h:scripts>
+ new org.ajax4jsf.javascript.PrototypeScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
+ scripts/menu.js
+ </h:scripts>
+
+ <f:clientid var="clientId"/>
+ <jsp:scriptlet>
+ <![CDATA[if (!((org.richfaces.component.UIDropDownMenu)component).getSubmitMode().equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
+ </jsp:scriptlet>
+ <div id="#{clientId}"
+ style="#{component.attributes['style']};"
+ class="#{component.attributes['styleClass']} dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect"
+ onmouseover="this.className='dr-menu-label dr-menu-label-select rich-ddmenu-label rich-ddmenu-label-select' ; #{component.attributes['onmouseover']}"
+ onmouseout="this.className='dr-menu-label dr-menu-label-unselect rich-ddmenu-label rich-ddmenu-label-unselect'; #{component.attributes['onmouseout']}"
+ onmousemove="#{component.attributes['onmousemove']}">
+
+ <jsp:scriptlet>
+ <![CDATA[if(component.getFacet("label")!=null && component.getFacet("label").isRendered()) {]]>
+ </jsp:scriptlet>
+ <span class="dr-label-text-decor rich-label-text-decor">
+ <u:insertFacet name="label" />
+ </span>
+ <jsp:scriptlet>
+ <![CDATA[} else {]]>
+ </jsp:scriptlet>
+ <span class="dr-label-text-decor rich-label-text-decor">#{component.attributes['value']}</span>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+
+ <div style="margin: 0px; padding: 0px; border: 0px; position: relative; z-index:100;">
+ <vcp:body>
+ <f:call name="renderChildren" />
+ </vcp:body>
+ </div>
+
+ </div>
+
+</f:root>
\ No newline at end of file
Deleted: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx 2007-10-26 18:37:19 UTC (rev 3575)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlSelectOrderShuttle.jspx 2007-10-26 18:47:32 UTC (rev 3576)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:c=" http://java.sun.com/jsf/core"
- xmlns:ui=" http://ajax4jsf.org/cdk/ui"
- xmlns:u=" http://ajax4jsf.org/cdk/u"
- xmlns:x=" http://ajax4jsf.org/cdk/x"
- baseclass="org.richfaces.renderkit.html.SelectOrderShuttleRendererBase"
- class="org.richfaces.renderkit.html.SelectOrderShuttleRenderer"
- component="org.richfaces.component.UISelectOrderShuttle"
- >
- <h:styles>css/selectOrderShuttle.xcss</h:styles>
-
- <h:scripts>
- scripts/StringBuilder.js,scripts/SelectItem.js,scripts/SelectOrderShuttle.js
- </h:scripts>
-
- <f:clientid var="clientId"/>
- <div id="#{clientId}">
-
- <vcp:body>
- <f:call name="renderChildren" />
- </vcp:body>
- </div>
- <a href="#" onclick="shuttle.sort();">Header</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('up');">up</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('down');">down</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('first');">first</a><br/>
- <a href="#" onclick="shuttle.moveSelectedItems('last');">last</a>
- <script type="text/javascript">
- #{this:initJSShuttleObject(context, component)}
- document.body.onselectstart = function() {return false;};
- document.body.className = "body";
-
- </script>
-</f:root>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3575 - management/planning.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-10-26 14:37:19 -0400 (Fri, 26 Oct 2007)
New Revision: 3575
Modified:
management/planning/RichFaces 3.1.3-3.2.0.mpp
Log:
Updated project plan commited
Modified: management/planning/RichFaces 3.1.3-3.2.0.mpp
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Rich Faces SVN: r3574 - trunk/ui/core/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2007-10-26 13:19:57 -0400 (Fri, 26 Oct 2007)
New Revision: 3574
Modified:
trunk/ui/core/src/main/config/component/mediaOutput.xml
Log:
Fix build to work around Java 5 bug (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5082928)
Modified: trunk/ui/core/src/main/config/component/mediaOutput.xml
===================================================================
--- trunk/ui/core/src/main/config/component/mediaOutput.xml 2007-10-26 17:04:56 UTC (rev 3573)
+++ trunk/ui/core/src/main/config/component/mediaOutput.xml 2007-10-26 17:19:57 UTC (rev 3574)
@@ -99,14 +99,14 @@
<name>element</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA[Name of html element for resource link - may be <a> <img> <object> <applet> <script> or <link> ]]>
+ <![CDATA[Name of html element for resource link - may be <a> <img> <object> <applet> <script> or <link> ]]>
</description>
</property>
<property>
<name>uriAttribute</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA[Name of attribute for resource-link attribute ( 'href' for <a>, 'src' for <img> or <script>, etc ]]>
+ <![CDATA[Name of attribute for resource-link attribute ( 'href' for <a>, 'src' for <img> or <script>, etc ]]>
</description>
</property>
17 years, 2 months
JBoss Rich Faces SVN: r3573 - trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-26 13:04:56 -0400 (Fri, 26 Oct 2007)
New Revision: 3573
Modified:
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
http://jira.jboss.com/jira/browse/RF-993
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-26 16:16:55 UTC (rev 3572)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-10-26 17:04:56 UTC (rev 3573)
@@ -48,11 +48,20 @@
},
observeEvents: function(element) {
+ var cells = element.rows[0].cells;
var eIcon = null;
var eText = null;
if ("NETSCAPE" == RichFaces.navigatorType()) {
- eIcon = $(this.elementID.icon);
- eText = $(this.elementID.text);
+ for (var i = 0; i < cells.length; i++) {
+ if (cells[i].id == this.elementID.icon) {
+ eIcon = cells[i];
+ } else if (cells[i].id == this.elementID.text) {
+ eText = cells[i];
+ }
+ if (eIcon && eText) {
+ break;
+ }
+ }
} else {
var cells = element.rows[0].cells;
//seeking by id seems to be miserably slow in IE than by index
17 years, 2 months
JBoss Rich Faces SVN: r3572 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-26 12:16:55 -0400 (Fri, 26 Oct 2007)
New Revision: 3572
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
http://jira.jboss.com/jira/browse/RF-1137 - fixed some errors
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-26 15:57:11 UTC (rev 3571)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-26 16:16:55 UTC (rev 3572)
@@ -91,7 +91,7 @@
</section>
<section>
<title>Details of Usage</title>
- <para>As it has been mentioned <link linked="tree">above</link> the tree component allows
+ <para>As it has been mentioned <link linkend="tree">above</link> the tree component allows
rendering any tree-like structure of data.</para>
<para>A bean property is passed into a tree <emphasis>
<property>"value"</property>
@@ -172,7 +172,7 @@
<property>"var"</property>
</emphasis> attribute. </para>
- <para> It&s possible to define several treeNode components with the equal values of <emphasis>
+ <para> It's possible to define several treeNode components with the equal values of <emphasis>
<property>"type"</property>
</emphasis> attribute and different values of <emphasis>
<property>"rendered"</property>
@@ -187,18 +187,17 @@
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer.gif"
-rendered="#{item.exist}">
+ rendered="#{item.exist}">
<h:outputText value="#{item.name}" />
</rich:treeNode>
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer_absent.gif"
-rendered="#{not item.exist}">
+ rendered="#{not item.exist}">
<h:outputText value="#{item.name}" />
</rich:treeNode>
...
</rich:tree>
</h:form>
-...
-]]></programlisting>
+...]]></programlisting>
<para> The example represents definition of two different treeNode components. The first
specifies the album that's available for sale, the other specifies the album that is
@@ -276,8 +275,7 @@
</f:facet>
...
</rich:tree>
-...
-]]></programlisting>
+...]]></programlisting>
<para> The <emphasis role="bold">
<property><rich: tree></property>
17 years, 2 months
JBoss Rich Faces SVN: r3571 - in trunk: framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-10-26 11:57:11 -0400 (Fri, 26 Oct 2007)
New Revision: 3571
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/browser_info.js
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
Log:
Optimaze browser detection.
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/browser_info.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/browser_info.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/browser_info.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -2,26 +2,35 @@
window.RichFaces = {};
}
+RichFaces.MSIE = 0;
+RichFaces.FF = 1;
+RichFaces.OPERA = 2;
+RichFaces.NETSCAPE = 3;
+RichFaces.SAFARI = 4;
+RichFaces.KONQ = 5;
+
RichFaces.navigatorType = function () {
- if (navigator.userAgent.toLowerCase().indexOf("msie") >= 0 ||
- navigator.userAgent.toLowerCase().indexOf("explorer") >= 0)
- return "MSIE";
- if (navigator.userAgent.toLowerCase().indexOf("firefox") >= 0 ||
- navigator.userAgent.toLowerCase().indexOf("iceweasel") >= 0)
- return "FF";
- if (navigator.userAgent.toLowerCase().indexOf("opera") >= 0)
- return "OPERA";
- if (navigator.userAgent.toLowerCase().indexOf("netscape") >= 0)
- return "NETSCAPE";
- if (navigator.userAgent.toLowerCase().indexOf("safari") >= 0)
- return "SAFARI";
- if (navigator.userAgent.toLowerCase().indexOf("konqueror") >= 0)
- return "KONQUEROR";
+ var userAgent = navigator.userAgent.toLowerCase();
+ if (userAgent.indexOf("msie") >= 0 ||
+ userAgent.indexOf("explorer") >= 0)
+ return RichFaces.MSIE;
+ if (userAgent.indexOf("firefox") >= 0 ||
+ userAgent.indexOf("iceweasel") >= 0)
+ return RichFaces.FF;
+ if (userAgent.indexOf("opera") >= 0)
+ return RichFaces.OPERA;
+ if (userAgent.indexOf("netscape") >= 0)
+ return RichFaces.NETSCAPE;
+ if (userAgent.indexOf("safari") >= 0)
+ return RichFaces.SAFARI;
+ if (userAgent.indexOf("konqueror") >= 0)
+ return RichFaces.KONQ;
return "OTHER";
}
RichFaces.getOperaVersion = function () {
- var index = navigator.userAgent.toLowerCase().indexOf("opera");
+ var userAgent = navigator.userAgent.toLowerCase();
+ var index = userAgent.indexOf("opera");
if (index == -1) return;
- return parseFloat(navigator.userAgent.toLowerCase().substring(index+6));
+ return parseFloat(userAgent.substring(index+6));
}
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-draggable.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -37,7 +37,7 @@
}
if (this.mouseMoveProvidesButton && !Event.isLeftClick(event) &&
- RichFaces.navigatorType() != "MSIE") {
+ RichFaces.navigatorType() != RichFaces.MSIE) {
this.endDrag(event);
}
}
Modified: trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -293,13 +293,13 @@
Richfaces.createEvent("mouseup", this.mainTable, null, null).fire();
Event.stop(event);
}
- if (RichFaces.navigatorType() != "MSIE")
+ if (RichFaces.navigatorType() != RichFaces.MSIE)
Richfaces.createEvent("change", this.input, null, null).fire();
},
fireClickIfNeeded: function(event){
if ((this.prevMouseDownEvent.target != event.target
- && RichFaces.navigatorType() == "FF")
+ && RichFaces.navigatorType() == RichFaces.FF)
|| (RichFaces.getOperaVersion()
&& RichFaces.getOperaVersion() < 9.0
&& event.target.tagName.toLowerCase() != "div")) {
Modified: trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -11,8 +11,8 @@
this.ch = options.chameleon;
this.items = new Array();
this.table = $ (containers.buttons.substr(containers.buttons.indexOf("buttons")+7));
- if (RichFaces.navigatorType() == "FF" ||
- RichFaces.navigatorType() == "NETSCAPE") {
+ if (RichFaces.navigatorType() == RichFaces.FF ||
+ RichFaces.navigatorType() == RichFaces.NETSCAPE) {
if (!this.fie)
this.table.style.display = "-moz-inline-box";
}
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-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -127,7 +127,7 @@
function getSizeElement() {
var element;
- if (RichFaces.navigatorType() != "OPERA" && document.compatMode=='CSS1Compat') {
+ if (RichFaces.navigatorType() != RichFaces.OPERA && document.compatMode=='CSS1Compat') {
element = document.documentElement;
} else {
element = document.body;
@@ -598,7 +598,7 @@
_left = parseInt(options.left, 10);
} else {
var cw = getSizeElement().clientWidth;
- if (RichFaces.navigatorType() == "OPERA")
+ if (RichFaces.navigatorType() == RichFaces.OPERA)
{
_left = (cw - eContentDiv.parentNode.getWidth()) / 2;
}
@@ -620,7 +620,7 @@
_top = parseInt(options.top, 10);
} else {
var cw = getSizeElement().clientHeight;
- if (RichFaces.navigatorType() == "OPERA")
+ if (RichFaces.navigatorType() == RichFaces.OPERA)
{
_top = (cw - eContentDiv.parentNode.getHeight()) / 2;
}
@@ -741,7 +741,7 @@
var eContentDiv = $(this.contentDiv);
// Avoid currentStyle bug in opera
- if (RichFaces.navigatorType() != "OPERA")
+ if (RichFaces.navigatorType() != RichFaces.OPERA)
{
newSize = Richfaces.getComputedStyleSize(eContentDiv, "width");
}
@@ -790,7 +790,7 @@
}
// Avoid currentStyle bug in opera
- if (RichFaces.navigatorType() != "OPERA")
+ if (RichFaces.navigatorType() != RichFaces.OPERA)
{
newSize = Richfaces.getComputedStyleSize(eContentDiv, "height");
}
@@ -950,7 +950,7 @@
Richfaces.showModalPanel = function (id, opts) {
var invoke =
- ("MSIE" == RichFaces.navigatorType()) ?
+ (RichFaces.MSIE == RichFaces.navigatorType()) ?
function(f) {
if (document.readyState != "complete") {
var args = arguments;
Modified: trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js
===================================================================
--- trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/simpleTogglePanel/src/main/resources/org/richfaces/renderkit/html/scripts/simpleTogglePanel.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -47,7 +47,7 @@
switch_off.style.display="";
}
- if (RichFaces.navigatorType() == "MSIE"){
+ if (RichFaces.navigatorType() == RichFaces.MSIE){
/* if ($(this.panelId_head).clientWidth<$(this.panelId).clientWidth){
$(this.panelId_head).style.width=$(this.panelId).clientWidth-2+"px";
}*/
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -4,7 +4,7 @@
};
Suggestion.Base.prototype = {
baseInitialize: function(element, update, options) {
- this.isOpera = (RichFaces.navigatorType() == "OPERA"?true:false);
+ this.isOpera = (RichFaces.navigatorType() == RichFaces.OPERA?true:false);
this.element = $(element);
this.update = $(update);
this.hasFocus = false;
@@ -19,7 +19,7 @@
options.selection = update + "_selection";
- var needIframe = (RichFaces.navigatorType() == "MSIE");
+ var needIframe = (RichFaces.navigatorType() == RichFaces.MSIE);
if (needIframe) {
options.iframeId = update + "_iframe";
@@ -158,7 +158,7 @@
},
show: function() {
- if ("SAFARI" == RichFaces.navigatorType()) {
+ if (RichFaces.SAFARI == RichFaces.navigatorType()) {
this.wasScroll = false;
this.wasBlur = false;
if (!this.overflow)
@@ -171,7 +171,7 @@
},
hide: function() {
- if ("SAFARI" == RichFaces.navigatorType()) {
+ if (RichFaces.SAFARI == RichFaces.navigatorType()) {
if (this.wasScroll) {
this.wasScroll = false;
return;
@@ -381,7 +381,7 @@
if (!this.active) return;
var offsets = RichFaces.Position.calcOffsets(this.update);
- if (RichFaces.navigatorType() != "MSIE") {
+ if (RichFaces.navigatorType() != RichFaces.MSIE) {
offsets["x"] = 0;
offsets["y"] = 0;
}
@@ -405,7 +405,7 @@
},
onScroll: function(event) {
- if ("SAFARI" == RichFaces.navigatorType() && this.wasBlur ) {
+ if (RichFaces.SAFARI == RichFaces.navigatorType() && this.wasBlur ) {
if(this.element) {
this.element.focus();
this.wasScroll = true;
@@ -419,7 +419,7 @@
var realOffset = 0;
while (item && (item != scroll)) {
// Avoid bug in Safari. Details: http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in...
- if ("SAFARI" == RichFaces.navigatorType() && "TR" == item.tagName.toUpperCase()) {
+ if (RichFaces.SAFARI == RichFaces.navigatorType() && "TR" == item.tagName.toUpperCase()) {
realOffset += document.getElementsByClassName("dr-sb-cell-padding", item)[0].offsetTop;
}
else
@@ -429,7 +429,7 @@
}
var entryOffsetHeight;
- if ("SAFARI" == RichFaces.navigatorType()) {
+ if (RichFaces.SAFARI == RichFaces.navigatorType()) {
var tdElement = document.getElementsByClassName("dr-sb-cell-padding", item)[0];
entryOffsetHeight = tdElement.offsetTop + tdElement.offsetHeight;
} else
Modified: trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js
===================================================================
--- trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2007-10-26 15:01:40 UTC (rev 3570)
+++ trunk/ui/tabPanel/src/main/resources/org/richfaces/renderkit/html/scripts/tabPanel.js 2007-10-26 15:57:11 UTC (rev 3571)
@@ -1,6 +1,6 @@
if (!window.RichFaces) window.RichFaces = {};
-var RichFaces_FF_Loaded = (RichFaces.navigatorType() == "FF");
+var RichFaces_FF_Loaded = (RichFaces.navigatorType() == RichFaces.FF);
RichFaces.panelTabs={};
17 years, 2 months
JBoss Rich Faces SVN: r3570 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-26 11:01:40 -0400 (Fri, 26 Oct 2007)
New Revision: 3570
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
http://jira.jboss.com/jira/browse/RF-391 - added note
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-10-26 15:00:46 UTC (rev 3569)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-10-26 15:01:40 UTC (rev 3570)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter id="TechnicalRequirements" xreflabel="TechnicalRequirements">
-<?dbhtml filename="TechnicalRequirements.html"?>
+ <?dbhtml filename="TechnicalRequirements.html"?>
<title>Technical Requirements</title>
@@ -48,11 +48,10 @@
</keywordset>
</chapterinfo>
- <para><property>RichFaces</property> was developed with an open architecture
- to be compatible with the widest possible variety of environments.</para>
+ <para><property>RichFaces</property> was developed with an open architecture to be compatible with
+ the widest possible variety of environments.</para>
- <para>This is what you need to start working with
- <property>RichFaces 3.1.0</property>:</para>
+ <para>This is what you need to start working with <property>RichFaces 3.1.0</property>:</para>
<itemizedlist>
<listitem>Java</listitem>
@@ -67,7 +66,7 @@
</itemizedlist>
<section id="SupportedJavaVersions">
-<?dbhtml filename="SupportedJavaVersions.html"?>
+ <?dbhtml filename="SupportedJavaVersions.html"?>
<title>Supported Java Versions</title>
@@ -77,7 +76,7 @@
</section>
<section id="SupportedJavaServerFacesImplementations">
-<?dbhtml filename="SupportedJavaServerFacesImplementations.html"?>
+ <?dbhtml filename="SupportedJavaServerFacesImplementations.html"?>
<title>Supported JavaServer Faces Implementations</title>
@@ -91,7 +90,7 @@
</section>
<section id="SupportedServers">
-<?dbhtml filename="SupportedServers.html"?>
+ <?dbhtml filename="SupportedServers.html"?>
<title>Supported Servers</title>
@@ -113,18 +112,18 @@
<listitem>Glassfish (J2EE 5)</listitem>
<listitem>JBoss 3.2 - 4.0.x</listitem>
-
+
<listitem>Sybase EAServer 6.0.1</listitem>
</itemizedlist>
</section>
<section id="SupportedBrowsers">
-<?dbhtml filename="SupportedBrowsers.html"?>
+ <?dbhtml filename="SupportedBrowsers.html"?>
<title>Supported Browsers</title>
<itemizedlist>
- <listitem>Internet Explorer 5.5 - 7.0</listitem>
+ <listitem>Internet Explorer 6.0 - 7.0</listitem>
<listitem>Firefox 1.5 - 2.0</listitem>
@@ -135,7 +134,15 @@
<listitem>Safari 2.0</listitem>
</itemizedlist>
- <para>This list is composed basing on reports received from our users. We assume the list can be incomplete and absence of your environment in the list doesn't mean incompatibility.</para>
- <para>We appreciate your feedback on platforms and browsers that aren't in the list but are compatible with RichFaces. It helps us to keep the list up-to-date.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Safari 3.0 Beta is not supported.</para>
+ </note>
+
+ <para>This list is composed basing on reports received from our users. We assume the list can be
+ incomplete and absence of your environment in the list doesn't mean incompatibility.</para>
+ <para>We appreciate your feedback on platforms and browsers that aren't in the list but
+ are compatible with RichFaces. It helps us to keep the list up-to-date.</para>
</section>
-</chapter>
\ No newline at end of file
+</chapter>
17 years, 2 months
JBoss Rich Faces SVN: r3569 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-10-26 11:00:46 -0400 (Fri, 26 Oct 2007)
New Revision: 3569
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
http://jira.jboss.com/jira/browse/RF-1137
language is corrected
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml 2007-10-26 15:00:17 UTC (rev 3568)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.desc.xml 2007-10-26 15:00:46 UTC (rev 3569)
@@ -17,8 +17,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>On the screenshot above there is an example of the tree with expanded node. This node
- contains its own node with several leaves. Besides, it's possible to choose different
+ <para>On the screenshot above, there is an example of the tree with an expanded node. This node
+ contains its own node with several leaves. Besides, it's possible to choose your own
icons for tree nodes.</para>
</section>
<section>
@@ -26,7 +26,7 @@
<itemizedlist>
<listitem>
<para>Highly customizable look-and-feel</para>
- <para>This feature provides rich possibilities to change an appearance of a component to different corresponding modern styles.</para>
+ <para>This feature provides rich possibilities to change an appearance of a component into different styles.</para>
</listitem>
<listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-26 15:00:17 UTC (rev 3568)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2007-10-26 15:00:46 UTC (rev 3569)
@@ -47,7 +47,7 @@
<para>There are two cases for a tree definition: together with <emphasis role="bold">
<property><rich:recursiveTreeNodesAdaptor></property>
</emphasis>
- and without it. In the first case, it’s possible to define it without <emphasis>
+ and without it. In the first case, it's possible to define it without <emphasis>
<property>"value"</property>
</emphasis> and <emphasis>
<property>"var"</property>
@@ -61,11 +61,9 @@
<rich:tree>
<rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
</rich:tree>
-...
-]]></programlisting>
+...]]></programlisting>
-
- <para> In the second case, it's necessary to define it with these attributes as it’s
+ <para> In the second case, it's necessary to define it with these attributes as it's
shown below: </para>
<para>
@@ -78,8 +76,7 @@
</rich:treeNode>
...
</rich:tree>
-...
-]]></programlisting>
+...]]></programlisting>
</section>
<section>
<title>Creating the Component Dynamically Using Java</title>
@@ -90,10 +87,9 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlTree;
...
HtmlTree myPanel = new HtmlTree();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
- <section>
+ <section>
<title>Details of Usage</title>
<para>As it has been mentioned <link linked="tree">above</link> the tree component allows
rendering any tree-like structure of data.</para>
@@ -102,22 +98,20 @@
</emphasis> attribute. The property keeps a structure of an <ulink
url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone..."
>org.richfaces.component.TreeNode</ulink> type.</para>
- <para>There is a default class TreeNodeImpl which is used for treeNode interface implementation.
+ <para>There is a default class TreeNodeImpl which is used for TreeNode interface implementation.
XmlTreeDataBuilder class allows transforming XML into structures of objects with XmlNodeData
- type which could be represented by the tree component. </para>
- <para><emphasis role="bold">
- <property><rich:treeNode></property>
- </emphasis> has getValue method which is available in a request scope variable with name that
- is defined by <emphasis>
+ type which could be represented by the tree component. TreeNode has attribute <emphasis>
+ <property>"data"</property>
+ </emphasis> which value is available as request scope variable with name that is defined by <emphasis>
<property>"var"</property>
</emphasis> attribute of tree component. </para>
<para>For particular visual representation of data <emphasis role="bold">
<property><rich:tree></property>
- </emphasis> selects by type one of the children treeNode components. The type is defined with
+ </emphasis> selects one of the children treeNode components by type. The type is defined with
the <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute that contains value of <emphasis>
+ </emphasis> attribute that contains a value of <emphasis>
<property>"type"</property>
</emphasis> attribute for treeNode. An example of definition is placed below: </para>
@@ -139,8 +133,7 @@
</rich:treeNode>
</rich:tree>
</h:form>
-...
- ]]></programlisting>
+...]]></programlisting>
<para>This is a result: </para>
@@ -155,18 +148,18 @@
<para>In case when <emphasis>
<property>"nodeFace"</property>
- </emphasis> attribute isn't defined or defined but its value isn&t equal to
+ </emphasis> attribute isn't defined or defined but its value isn't equal to
any type of all children treeNode components or this value is equal to some type, but the
value of <emphasis>
<property>"rendered"</property>
</emphasis> attribute for this treeNode is not defined then default treeNode is used. </para>
- <para> Default treeNode is the first node (with not defined <emphasis>
+ <para>Default treeNode is the first node (with not defined <emphasis>
<property>"type"</property>
</emphasis> attribute and defined <emphasis>
<property>"rendered"</property>
- </emphasis> attribute) from all children nodes of tree component. If such treeNode
- wasn't found, following default interior presentation is used: </para>
+ </emphasis> attribute) from all children nodes of the tree component. If such treeNode
+ wasn't found, the following default interior presentation is used: </para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -179,7 +172,7 @@
<property>"var"</property>
</emphasis> attribute. </para>
- <para> It&s possible to define several treeNode components with equal values of <emphasis>
+ <para> It&s possible to define several treeNode components with the equal values of <emphasis>
<property>"type"</property>
</emphasis> attribute and different values of <emphasis>
<property>"rendered"</property>
@@ -194,20 +187,20 @@
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer.gif"
-rendered=”#{item.exist}”>
+rendered="#{item.exist}">
<h:outputText value="#{item.name}" />
</rich:treeNode>
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer_absent.gif"
-rendered=”#{not item.exist}”>
+rendered="#{not item.exist}">
<h:outputText value="#{item.name}" />
</rich:treeNode>
- …
+ ...
</rich:tree>
</h:form>
...
- ]]></programlisting>
+]]></programlisting>
- <para> The example represents definition of two different treeNode components. The first
+ <para> The example represents definition of two different treeNode components. The first
specifies the album that's available for sale, the other specifies the album that is
not available. The result is shown on the following screenshot: </para>
@@ -224,7 +217,7 @@
</mediaobject>
</figure>
- <para> You can define an EL-expression for <emphasis>
+ <para>You can define an EL-expression for <emphasis>
<property>"nodeFace"</property>
</emphasis> attribute. See an example: </para>
@@ -232,25 +225,23 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[nodeFace="#{data.name != 'param-value' ? 'artist' : 'album'}"
- ]]></programlisting>
+ <programlisting role="JAVA"><![CDATA[nodeFace="#{data.name != 'param-value' ? 'artist' : 'album'}" ]]></programlisting>
- <para> Switching on treeNode could be performed in three modes. Modes could be specified with <emphasis>
+ <para>Switching on treeNode could be performed in three modes. Modes could be specified with <emphasis>
<property>"switchType"</property>
</emphasis> attribute. </para>
<itemizedlist>
<listitem>Ajax - Ajax submission is used for switching </listitem>
<listitem>Server - regular form submition request is used</listitem>
- <listitem>Client - switching is done as a whole on a client, server iteration is
- absent</listitem>
+ <listitem>Client - switching is done as a whole on a client, no interaction with the server presents</listitem>
</itemizedlist>
<para>If <emphasis>
<property>"ajaxSubmitSelection"</property>
</emphasis> attribute value set to <emphasis>
<property>"true"</property>
- </emphasis> than any change in selection initiates Ajax request to server.</para>
+ </emphasis> than any change in selection initiates Ajax request to the server.</para>
<para> The <emphasis>
<property>"icon"</property>
@@ -283,7 +274,6 @@
<f:facet name="iconLeaf">
<h:graphicImage value="/images/tree/song.gif " />
</f:facet>
-
...
</rich:tree>
...
@@ -297,7 +287,7 @@
<property>"value"</property>
</emphasis> and <emphasis>
<property>"var"</property>
- </emphasis>. Besides, visual representation shouldn’t be defined right in the tree. There is
+ </emphasis>. Besides, visual representation shouldn't be defined right in the tree. There is
possibility to use common attributes such as <emphasis>
<property>"ajaxSubmitSelection"</property>
</emphasis>, for instance. </para>
@@ -352,7 +342,7 @@
</row>
<row>
<entry>acceptedTypes</entry>
- <entry>Drag zone names allowed to be processed with a drop zone.</entry>
+ <entry>Drag zone names are allowed to be processed with a drop zone.</entry>
</row>
<row>
<entry>typeMapping</entry>
@@ -364,12 +354,12 @@
</section>
<section>
<title>Events handling</title>
- <para>Listeners classes that process events on server side are defined with the help:</para>
+ <para>Listeners classes that process events on the server side are defined with the help of:</para>
<itemizedlist>
<listitem>nodeSelectListener is called during request sending on a node selecting event (if
request sending on this event is defined)</listitem>
- <listitem>dropListener processes Drop event</listitem>
- <listitem>dragListener processes Drug event</listitem>
+ <listitem>dropListener processes a Drop event</listitem>
+ <listitem>dragListener processes a Drug event</listitem>
<listitem>changeExpandListener processes expand/collapse event of a tree node</listitem>
</itemizedlist>
@@ -425,8 +415,8 @@
<tgroup cols="2">
<thead>
<row>
- <entry>Skin parameters for wrapper element</entry>
- <entry>Properties corresponding to CSS parameter</entry>
+ <entry>Skin parameters for a wrapper element</entry>
+ <entry>Properties corresponding to a CSS parameter</entry>
</row>
</thead>
<tbody>
@@ -460,7 +450,7 @@
<para>In order to redefine styles for all <emphasis role="bold">
<property><rich:tree></property>
- </emphasis> components on a page using CSS, it's enough to create class with the same
+ </emphasis> components on a page using CSS, it's enough to create a class with the same
names and define necessary properties in them.</para>
<para>To change styles of particular <emphasis role="bold">
17 years, 2 months
JBoss Rich Faces SVN: r3568 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-10-26 11:00:17 -0400 (Fri, 26 Oct 2007)
New Revision: 3568
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
http://jira.jboss.com/jira/browse/RF-1110 - section "Creating and Using Your Own Skin File" was rewritten.
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-10-26 14:49:45 UTC (rev 3567)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-10-26 15:00:17 UTC (rev 3568)
@@ -128,38 +128,38 @@
incorrect HTML code. </listitem>
</itemizedlist>
</section>
-
+
<section id="AjaxRequestOptimization">
- <?dbhtml filename="AjaxRequestOptimization.html"?>
- <title>Ajax Request Optimization</title>
- <section id="Re-Rendering">
- <?dbhtml filename="Re-Rendering.html"?>
- <title>Re-Rendering</title>
- <para>Ajax attributes are common for Ajax components such as <emphasis role="bold">
- <property><a4j:support></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:jsFunction></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:poll></property>
- </emphasis>, <emphasis role="bold">
- <property><a4j:push></property>
- </emphasis> and so on. Also, most RichFaces components with built-in Ajax support have
- these attributes for a similar purpose. Ajax components attributes help RichFaces to
- expose its features. Most of the attributes have default values. Thus, you can start
- working with RichFaces without knowing the usage of these attribute. However, their usage
- allows to tune the required Ajax behavior very smoothly.</para>
+ <?dbhtml filename="AjaxRequestOptimization.html"?>
+ <title>Ajax Request Optimization</title>
+ <section id="Re-Rendering">
+ <?dbhtml filename="Re-Rendering.html"?>
+ <title>Re-Rendering</title>
+ <para>Ajax attributes are common for Ajax components such as <emphasis role="bold">
+ <property><a4j:support></property>
+ </emphasis>, <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis>, <emphasis role="bold">
+ <property><a4j:jsFunction></property>
+ </emphasis>, <emphasis role="bold">
+ <property><a4j:poll></property>
+ </emphasis>, <emphasis role="bold">
+ <property><a4j:push></property>
+ </emphasis> and so on. Also, most RichFaces components with built-in Ajax support have these
+ attributes for a similar purpose. Ajax components attributes help RichFaces to expose its
+ features. Most of the attributes have default values. Thus, you can start working with
+ RichFaces without knowing the usage of these attribute. However, their usage allows to tune
+ the required Ajax behavior very smoothly.</para>
- <para><emphasis>
- <property>"reRender"</property>
- </emphasis> is a key attribute. The attribute allows to point to area(s) on a page that
- should be updated as a response on Ajax interaction. The value of the <emphasis>
- <property>"reRender"</property>
- </emphasis> attribute is an id of the JSF component or an id list. </para>
- <para>A simple example is placed below:</para>
+ <para><emphasis>
+ <property>"reRender"</property>
+ </emphasis> is a key attribute. The attribute allows to point to area(s) on a page that
+ should be updated as a response on Ajax interaction. The value of the <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute is an id of the JSF component or an id list. </para>
+ <para>A simple example is placed below:</para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<a4j:commandButton value="update" reRender="infoBlock"/>
...
<h:panelGrid id="infoBlock">
@@ -168,31 +168,31 @@
...
]]></programlisting>
- <para>The value of <emphasis>
- <property>"reRender"</property>
- </emphasis> attribute of the <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis> tag defines which part(s) of your page is (are) to be updated. In this case,
- the only part of the page to update is the <emphasis role="bold">
- <property><h:panelGrid></property>
- </emphasis> tag because its ID value matches to the value of <emphasis>
- <property>"reRender"</property>
- </emphasis> attribute. As you see, it's not difficult to update multiple elements
- on the page, only list their IDs as the value of <emphasis>
- <property>"reRender"</property>
- </emphasis>.</para>
+ <para>The value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute of the <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis> tag defines which part(s) of your page is (are) to be updated. In this case, the
+ only part of the page to update is the <emphasis role="bold">
+ <property><h:panelGrid></property>
+ </emphasis> tag because its ID value matches to the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute. As you see, it's not difficult to update multiple elements
+ on the page, only list their IDs as the value of <emphasis>
+ <property>"reRender"</property>
+ </emphasis>.</para>
- <para><emphasis>
- <property>"reRender"</property>
- </emphasis> uses <ulink
- url="http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/c..."
- >UIComponent.findComponent() algorithm</ulink> (with some additional exceptions) to find
- the component in the component tree. As can you see, the algorithm presumes several steps.
- Each other step is used if the previous step is not successful. Therefore, you can define
- how fast the component is found mentioning it more precisely. The following example shows
- the difference in approaches (both buttons will work successfully):</para>
+ <para><emphasis>
+ <property>"reRender"</property>
+ </emphasis> uses <ulink
+ url="http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/c..."
+ >UIComponent.findComponent() algorithm</ulink> (with some additional exceptions) to find
+ the component in the component tree. As can you see, the algorithm presumes several steps.
+ Each other step is used if the previous step is not successful. Therefore, you can define
+ how fast the component is found mentioning it more precisely. The following example shows
+ the difference in approaches (both buttons will work successfully):</para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form id="form1">
...
<a4j: commandButton value="Usual Way" reRender="infoBlock, infoBlock2" />
@@ -212,288 +212,281 @@
...
]]></programlisting>
- <para>It's also possible to use JSF EL expression as a value of the reRender
- attribute. It might be a property of types Set, Collection, Array or simple String. The EL
- for reRender is resolved right before the Render Response phase. Hence, you can calculate
- what should be re-rendered on any previous phase during the Ajax request processing.</para>
+ <para>It's also possible to use JSF EL expression as a value of the reRender
+ attribute. It might be a property of types Set, Collection, Array or simple String. The EL
+ for reRender is resolved right before the Render Response phase. Hence, you can calculate
+ what should be re-rendered on any previous phase during the Ajax request processing.</para>
- <para>Most common problem with using reRender is pointing it to the component that has a <emphasis>
- <property>"reRender"</property>
- </emphasis> attribute. Note, that JSF does not mark the place in the browser DOM where the
- outcome of the component should be placed in case the <emphasis>
- <property>"rendered"</property>
- </emphasis> condition returns false. Therefore, after the component becomes rendered
- during the Ajax request, RichFaces delivers the rendered code to the client, but does not
- update a page, because the place for update is unknown. You need to point to one of the
- parent components that has no <emphasis>
- <property>"rendered"</property>
- </emphasis> attribute. As an alternative, you can wrap the component with <emphasis
- role="bold">
- <property><a4j:outputPanel></property>
- </emphasis> layout=<property>"none"</property>.</para>
+ <para>Most common problem with using reRender is pointing it to the component that has a <emphasis>
+ <property>"reRender"</property>
+ </emphasis> attribute. Note, that JSF does not mark the place in the browser DOM where the
+ outcome of the component should be placed in case the <emphasis>
+ <property>"rendered"</property>
+ </emphasis> condition returns false. Therefore, after the component becomes rendered during
+ the Ajax request, RichFaces delivers the rendered code to the client, but does not update a
+ page, because the place for update is unknown. You need to point to one of the parent
+ components that has no <emphasis>
+ <property>"rendered"</property>
+ </emphasis> attribute. As an alternative, you can wrap the component with <emphasis
+ role="bold">
+ <property><a4j:outputPanel></property>
+ </emphasis> layout=<property>"none"</property>.</para>
- <para><emphasis>
- <property>"ajaxRendered" </property>
- </emphasis> attribute of the <emphasis role="bold">
- <property><a4j:outputPanel></property>
- </emphasis> set to <property>"true"</property> allows to define the area
- of the page that will be re-rendered even if it is not pointed in the reRender attribute
- explicitly. It might be useful if you have an area on a page that should be updated as a
- response on any Ajax request. For example, the following code allows to output error
- messages regardless of what Ajax request causes the Validation phase failed. </para>
- <programlisting role="XML"><![CDATA[...
+ <para><emphasis>
+ <property>"ajaxRendered" </property>
+ </emphasis> attribute of the <emphasis role="bold">
+ <property><a4j:outputPanel></property>
+ </emphasis> set to <property>"true"</property> allows to define the area
+ of the page that will be re-rendered even if it is not pointed in the reRender attribute
+ explicitly. It might be useful if you have an area on a page that should be updated as a
+ response on any Ajax request. For example, the following code allows to output error
+ messages regardless of what Ajax request causes the Validation phase failed. </para>
+ <programlisting role="XML"><![CDATA[...
<a4j:outputPanel ajaxRendered="true">
<h:messages />
</a4j:outputPanel>
...
]]></programlisting>
- <para><emphasis>
- <property>"limitToList"</property>
- </emphasis> attribute allows to dismiss the behavior of the <emphasis role="bold">
- <property><a4j:outputPanel></property>
- </emphasis>
- <emphasis>
- <property>"ajaxRendered" </property>
- </emphasis> attribute. "limitToList" =
- <property>"false"</property> means to update only the area(s) that
- mentioned in the <emphasis/>"reRender"<property/> attribute explicitly.
- All output panels with
- "ajaxRendered"=<property>"true"</property> will be
- ignored.</para>
- </section>
+ <para><emphasis>
+ <property>"limitToList"</property>
+ </emphasis> attribute allows to dismiss the behavior of the <emphasis role="bold">
+ <property><a4j:outputPanel></property>
+ </emphasis>
+ <emphasis>
+ <property>"ajaxRendered" </property>
+ </emphasis> attribute. "limitToList" =
+ <property>"false"</property> means to update only the area(s) that
+ mentioned in the <emphasis/>"reRender"<property/> attribute explicitly.
+ All output panels with
+ "ajaxRendered"=<property>"true"</property> will be
+ ignored.</para>
+ </section>
- <section id="QueueandTrafficFloodProtection">
- <?dbhtml filename="QueueandTrafficFloodProtection.html"?>
- <title>Queue and Traffic Flood Protection</title>
- <para><emphasis>
- <property>"eventsQueue"</property>
- </emphasis> attribute defines the name of the queue that will be used to order upcoming
- Ajax requests. By default, RichFaces does not queue Ajax requests. If events are produced
- simultaneously, they will come to the server simultaneously. JSF implementations
- (especially, the very first ones) does not guaranty that the request that comes first will
- be served or passed into the JSF lifecycle first. The order how the server side data will
- be modified in case of simultaneous request might be unpredictable. Usage of eventsQueue
- attribute allows to avoid possible mess. Define the queue name explicitly, if you expect
- intensive Ajax traffic in your application.</para>
- <para>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 <emphasis>
- <property>"eventsQueue"</property>
- </emphasis> 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.</para>
+ <section id="QueueandTrafficFloodProtection">
+ <?dbhtml filename="QueueandTrafficFloodProtection.html"?>
+ <title>Queue and Traffic Flood Protection</title>
+ <para><emphasis>
+ <property>"eventsQueue"</property>
+ </emphasis> attribute defines the name of the queue that will be used to order upcoming Ajax
+ requests. By default, RichFaces does not queue Ajax requests. If events are produced
+ simultaneously, they will come to the server simultaneously. JSF implementations
+ (especially, the very first ones) does not guaranty that the request that comes first will
+ be served or passed into the JSF lifecycle first. The order how the server side data will be
+ modified in case of simultaneous request might be unpredictable. Usage of eventsQueue
+ attribute allows to avoid possible mess. Define the queue name explicitly, if you expect
+ intensive Ajax traffic in your application.</para>
+ <para>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 <emphasis>
+ <property>"eventsQueue"</property>
+ </emphasis> 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.</para>
- <programlisting role="XML"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:inputText value="#{userBean.name}">
<a4j:support event="onkeyup" eventsQueue="foo" reRender="bar" />
</h:inputText>
...
]]></programlisting>
- <para><emphasis>
- <property>"requestDelay"</property>
- </emphasis> attribute defines the time (in ms) that the request will be wait in 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
- .</para>
- <para><emphasis>
- <property>"ignoreDupResponses"</property>
- </emphasis> attribute orders to ignore the Ajax Response produced by the request if the
- newest "similar" request is in a queue already.
- "ignoreDupResponses"=<property>"true"</property>
- 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.</para>
- <para>Defining the <emphasis>
- <property>"eventsQueue"</property>
- </emphasis> along with <emphasis>
- <property>"requestDelay"</property>
- </emphasis> allows to protect against unnecessary traffic flood and synchronizes Ajax
- requests order. If you have several sources of Ajax requests, you can define the same
- queue name there. This might be very helpful if you have Ajax components that invoke
- request asynchronously from the ones produced by events from users. For example, <emphasis
- role="bold">
- <property><a4j:poll></property>
- </emphasis> or <emphasis role="bold">
- <property><a4j:push></property>
- </emphasis>. In case the requests from such components modify the same data, the
- synchronization might be very helpful.</para>
+ <para><emphasis>
+ <property>"requestDelay"</property>
+ </emphasis> attribute defines the time (in ms) that the request will be wait in 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 .</para>
+ <para><emphasis>
+ <property>"ignoreDupResponses"</property>
+ </emphasis> attribute orders to ignore the Ajax Response produced by the request if the
+ newest "similar" request is in a queue already.
+ "ignoreDupResponses"=<property>"true"</property> 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.</para>
+ <para>Defining the <emphasis>
+ <property>"eventsQueue"</property>
+ </emphasis> along with <emphasis>
+ <property>"requestDelay"</property>
+ </emphasis> allows to protect against unnecessary traffic flood and synchronizes Ajax
+ requests order. If you have several sources of Ajax requests, you can define the same queue
+ name there. This might be very helpful if you have Ajax components that invoke request
+ asynchronously from the ones produced by events from users. For example, <emphasis
+ role="bold">
+ <property><a4j:poll></property>
+ </emphasis> or <emphasis role="bold">
+ <property><a4j:push></property>
+ </emphasis>. In case the requests from such components modify the same data, the
+ synchronization might be very helpful.</para>
- <para>More information can be found on the <ulink
- url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
- >RichFaces Users Forum</ulink>.</para>
- </section>
+ <para>More information can be found on the <ulink
+ url="http://jboss.com/index.html?module=bb&op=viewtopic&t=105766"
+ >RichFaces Users Forum</ulink>.</para>
+ </section>
- <section id="DataProcessingOptions">
- <?dbhtml filename="DataProcessingOptions.html"?>
- <title>Data Processing Options</title>
- <para>RichFaces uses form based approach for Ajax request sending. This means each time,
- when a user click an Ajax button or <emphasis role="bold">
- <property><a4j:poll></property>
- </emphasis> produces an asynchronous request, the data from the closest JSF form is
- submitted with the XMLHTTPRequest object. The form data contains the values from the form
- input element and auxiliary information such as state saving data.</para>
- <para>When <emphasis>
- <property>"ajaxSingle"</property>
- </emphasis> attribute value is <property>"true"</property>, it orders to
- include only a value of the current component (along with <emphasis role="bold">
- <property><f:param></property>
- </emphasis> or <emphasis role="bold">
- <property><a4j:action></property>
- </emphasis> param values if any) to the request map. In case of <emphasis role="bold">
- <property>a4j:support</property>
- </emphasis>, it will be a value of the parent component.</para>
- <para>Note, that
- "ajaxSingle"=<property>"true"</property> reduces the
- upcoming traffic, but does not prevent decoding other input components on the server side.
- Some JSF components, such as <emphasis role="bold">
- <property><h:selectOneMenu></property>
- </emphasis> do recognize the missing data in the request map value as a null value and try
- to pass the validation process with a failed result. Thus, use <emphasis role="bold">
- <property><a4j:region></property>
- </emphasis> to limit a part of the component tree that will be processed on the server
- side when it is required.</para>
- <para><emphasis>
- <property>"immediate"</property>
- </emphasis> attribute has the same purpose as any other non-JSF component. The default <emphasis>
- <property>"ActionListener"</property>
- </emphasis> should be executed immediately (i.e. during the Apply Request Values phase of
- a request processing lifecycle), rather than waiting until the Invoke Application phase.
- Using immediate=<property>"true"</property> is one of the ways to have
- some data model values updated when other cannot be updated because of a problem with
- passing the Validation phase successfully. This might be important inside the <emphasis
- role="bold">
- <property><h:dataTable></property>
- </emphasis> like components where using <emphasis role="bold">
- <property><a4j:region></property>
- </emphasis> is impossible due to the <emphasis role="bold">
- <property><h:dataTable></property>
- </emphasis> component architecture.</para>
+ <section id="DataProcessingOptions">
+ <?dbhtml filename="DataProcessingOptions.html"?>
+ <title>Data Processing Options</title>
+ <para>RichFaces uses form based approach for Ajax request sending. This means each time, when
+ a user click an Ajax button or <emphasis role="bold">
+ <property><a4j:poll></property>
+ </emphasis> produces an asynchronous request, the data from the closest JSF form is
+ submitted with the XMLHTTPRequest object. The form data contains the values from the form
+ input element and auxiliary information such as state saving data.</para>
+ <para>When <emphasis>
+ <property>"ajaxSingle"</property>
+ </emphasis> attribute value is <property>"true"</property>, it orders to
+ include only a value of the current component (along with <emphasis role="bold">
+ <property><f:param></property>
+ </emphasis> or <emphasis role="bold">
+ <property><a4j:action></property>
+ </emphasis> param values if any) to the request map. In case of <emphasis role="bold">
+ <property>a4j:support</property>
+ </emphasis>, it will be a value of the parent component.</para>
+ <para>Note, that "ajaxSingle"=<property>"true"</property>
+ reduces the upcoming traffic, but does not prevent decoding other input components on the
+ server side. Some JSF components, such as <emphasis role="bold">
+ <property><h:selectOneMenu></property>
+ </emphasis> do recognize the missing data in the request map value as a null value and try
+ to pass the validation process with a failed result. Thus, use <emphasis role="bold">
+ <property><a4j:region></property>
+ </emphasis> to limit a part of the component tree that will be processed on the server side
+ when it is required.</para>
+ <para><emphasis>
+ <property>"immediate"</property>
+ </emphasis> attribute has the same purpose as any other non-JSF component. The default <emphasis>
+ <property>"ActionListener"</property>
+ </emphasis> should be executed immediately (i.e. during the Apply Request Values phase of a
+ request processing lifecycle), rather than waiting until the Invoke Application phase. Using
+ immediate=<property>"true"</property> is one of the ways to have some
+ data model values updated when other cannot be updated because of a problem with passing the
+ Validation phase successfully. This might be important inside the <emphasis role="bold">
+ <property><h:dataTable></property>
+ </emphasis> like components where using <emphasis role="bold">
+ <property><a4j:region></property>
+ </emphasis> is impossible due to the <emphasis role="bold">
+ <property><h:dataTable></property>
+ </emphasis> component architecture.</para>
- <para><emphasis>
- <property>"bypassUpdates"</property>
- </emphasis> attribute allows to bypass the Update Model phase. It might be useful if you
- need to check user input against the available validator, but not to update the model with
- those data. Note, that an action will be invoked at the end of the Validation phase only
- if the Validation phase is passed successfully. The listeners of the Application phase
- will not be invoked in any case.</para>
- </section>
+ <para><emphasis>
+ <property>"bypassUpdates"</property>
+ </emphasis> attribute allows to bypass the Update Model phase. It might be useful if you
+ need to check user input against the available validator, but not to update the model with
+ those data. Note, that an action will be invoked at the end of the Validation phase only if
+ the Validation phase is passed successfully. The listeners of the Application phase will not
+ be invoked in any case.</para>
+ </section>
- <section id="ActionandNavigation">
- <?dbhtml filename="ActionandNavigation.html"?>
- <title>Action and Navigation</title>
- <para>Ajax component is similar to any other non-Ajax JSF component like <emphasis
+ <section id="ActionandNavigation">
+ <?dbhtml filename="ActionandNavigation.html"?>
+ <title>Action and Navigation</title>
+ <para>Ajax component is similar to any other non-Ajax JSF component like <emphasis role="bold">
+ <property><h:commandButton></property>
+ </emphasis>. It allows to submit the form. You can use <emphasis>
+ <property>"action"</property>
+ </emphasis> and <emphasis>
+ <property>"actionListener"</property>
+ </emphasis> attribute to invoke the action method and define the action event.</para>
+ <para><emphasis>
+ <property>"action"</property>
+ </emphasis> 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. This mode might
+ be helpful in two major cases:</para>
+ <itemizedlist>
+ <listitem>RichFaces allows to organize a page flow inside the <emphasis role="bold">
+ <property><a4j:include></property>
+ </emphasis> component. This is a typical scenario for Wizard like behavior. The new
+ content is rendered inside the <emphasis role="bold">
+ <property><a4j:include></property>
+ </emphasis> area. The content is taken from the navigation rule of the faces configuration
+ file (usually, the faces-config.xml). Note, that the content of the "wizard" is not
+ isolated from the rest of the page. The included page should not have own <emphasis
role="bold">
+ <property><f:view></property>
+ </emphasis> (it does not matter if you use facelets). You need to have an Ajax component
+ inside the <emphasis role="bold">
+ <property><a4j:include></property>
+ </emphasis> to navigate between the wizard pages. Otherwize, the whole page update will be
+ performed.</listitem>
+ <listitem>If you want to involve the server side validators and navigate to the next page
+ only if the Validation phase is passed successfully, you can replace <emphasis role="bold">
<property><h:commandButton></property>
- </emphasis>. It allows to submit the form. You can use <emphasis>
- <property>"action"</property>
- </emphasis> and <emphasis>
- <property>"actionListener"</property>
- </emphasis> attribute to invoke the action method and define the action event.</para>
- <para><emphasis>
- <property>"action"</property>
- </emphasis> 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. This
- mode might be helpful in two major cases:</para>
- <itemizedlist>
- <listitem>RichFaces allows to organize a page flow inside the <emphasis role="bold">
- <property><a4j:include></property>
- </emphasis> component. This is a typical scenario for Wizard like behavior. The new
- content is rendered inside the <emphasis role="bold">
- <property><a4j:include></property>
- </emphasis> area. The content is taken from the navigation rule of the faces
- configuration file (usually, the faces-config.xml). Note, that the content of the
- "wizard" is not isolated from the rest of the page. The included page should not have
- own <emphasis role="bold">
- <property><f:view></property>
- </emphasis> (it does not matter if you use facelets). You need to have an Ajax component
- inside the <emphasis role="bold">
- <property><a4j:include></property>
- </emphasis> to navigate between the wizard pages. Otherwize, the whole page update will
- be performed.</listitem>
- <listitem>If you want to involve the server side validators and navigate to the next page
- only if the Validation phase is passed successfully, you can replace <emphasis
- role="bold">
- <property><h:commandButton></property>
- </emphasis> with <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis> and point to the action method that navigates to the next page. If
- Validation process fails, the partial page update will occur and a user will see an
- error message. Otherwize, the application proceeds to the next page. Make sure, you
- define <redirect/> option for the navigation rule to avoid memory
- leaks.</listitem>
- </itemizedlist>
- </section>
+ </emphasis> with <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis> and point to the action method that navigates to the next page. If Validation
+ process fails, the partial page update will occur and a user will see an error message.
+ Otherwize, the application proceeds to the next page. Make sure, you define
+ <redirect/> option for the navigation rule to avoid memory leaks.</listitem>
+ </itemizedlist>
+ </section>
- <section id="JavascriptInteractions">
- <?dbhtml filename="JavascriptInteractions.html"?>
- <title>JavaScript Interactions</title>
- <para>RichFaces allows writing Ajax-enabled JSF application without writing any Javascript
- code. However, you can still invoke the javascript code if you need. There are several
- ajax attributes that helps to do it.</para>
- <para><emphasis>
- <property>"onsubmit"</property>
- </emphasis> attribute allows to invoke JavaScript code before an Ajax request is sent. If <emphasis>
- <property>"onsubmit"</property>
- </emphasis> returns <property>"false"</property>, the Ajax request is
- canceled. The code of <emphasis>
- <property>"onsubmit"</property>
- </emphasis> is inserted before the RichFaces Ajax call. Hence, the <emphasis>
- <property>"onsubmit"</property>
- </emphasis> should not has a "return" statement if you want the Ajax
- request to be sent. If you are going to invoke a JavaScript function that returns
- <property>"true"</property> or
- <property>"false"</property>, use the conditional statement to return
- something only when you need to cancel the request. For example: </para>
- <programlisting role="XML"><![CDATA[...
+ <section id="JavascriptInteractions">
+ <?dbhtml filename="JavascriptInteractions.html"?>
+ <title>JavaScript Interactions</title>
+ <para>RichFaces allows writing Ajax-enabled JSF application without writing any Javascript
+ code. However, you can still invoke the javascript code if you need. There are several ajax
+ attributes that helps to do it.</para>
+ <para><emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> attribute allows to invoke JavaScript code before an Ajax request is sent. If <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> returns <property>"false"</property>, the Ajax request is
+ canceled. The code of <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> is inserted before the RichFaces Ajax call. Hence, the <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis> should not has a "return" statement if you want the Ajax
+ request to be sent. If you are going to invoke a JavaScript function that returns
+ <property>"true"</property> or
+ <property>"false"</property>, use the conditional statement to return
+ something only when you need to cancel the request. For example: </para>
+ <programlisting role="XML"><![CDATA[...
onsubmit="if (mynosendfunct()==false){return false}"
...
]]></programlisting>
- <para><emphasis>
- <property>"onclick"</property>
- </emphasis> attribute is similar to the <emphasis>
- <property>"onsubmit"</property>
- </emphasis>, but for clickable components such as <emphasis role="bold">
- <property><a4j:commandLink></property>
- </emphasis> and <emphasis role="bold">
- <property><a4j:commandButton></property>
- </emphasis>. If it returns <property>"false"</property>, the Ajax
- request is canceled also.</para>
- <para><emphasis>
- <property>"oncomplete"</property>
- </emphasis> 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 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 "this'" inside the code,
- because it will not point the component where Ajax request was initiated.</para>
+ <para><emphasis>
+ <property>"onclick"</property>
+ </emphasis> attribute is similar to the <emphasis>
+ <property>"onsubmit"</property>
+ </emphasis>, but for clickable components such as <emphasis role="bold">
+ <property><a4j:commandLink></property>
+ </emphasis> and <emphasis role="bold">
+ <property><a4j:commandButton></property>
+ </emphasis>. If it returns <property>"false"</property>, the Ajax request
+ is canceled also.</para>
+ <para><emphasis>
+ <property>"oncomplete"</property>
+ </emphasis> 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 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 "this'" inside the code, because it
+ will not point the component where Ajax request was initiated.</para>
- <para><emphasis>
- <property>"data"</property>
- </emphasis> attribute allows to get the additional data from the server during an Ajax
- call. You can use JSF EL to point the property of the managed bean and its value will be
- serialized in JSON format and be available on the client side. You can refer to it using
- the <emphasis>
- <property>"data"</property>
- </emphasis> variable. For example:</para>
- <programlisting role="XML"><![CDATA[...
+ <para><emphasis>
+ <property>"data"</property>
+ </emphasis> attribute allows to get the additional data from the server during an Ajax call.
+ You can use JSF EL to point the property of the managed bean and its value will be
+ serialized in JSON format and be available on the client side. You can refer to it using the <emphasis>
+ <property>"data"</property>
+ </emphasis> variable. For example:</para>
+ <programlisting role="XML"><![CDATA[...
<a4j:commandButton value="Update" data="#{userBean.name}" oncomplete="showTheName(data.name)" />
...
]]></programlisting>
- <para>Richfaces allows to serialize not only primitive types into JSON format, but also
- complex types including arrays and collections. The beans should be serializable to be
- refered with <emphasis>
- <property>"data"</property>
- </emphasis>.</para>
- </section>
-
+ <para>Richfaces allows to serialize not only primitive types into JSON format, but also
+ complex types including arrays and collections. The beans should be serializable to be
+ refered with <emphasis>
+ <property>"data"</property>
+ </emphasis>.</para>
</section>
-
+
+ </section>
+
<section id="HowTo...">
<?dbhtml filename="HowTo.html"?>
<title>How To...</title>
@@ -580,8 +573,8 @@
</itemizedlist-->
</section>
-
+
<section id="DecideWhatToSend">
<?dbhtml filename="DecideWhatToSend.html"?>
<title>Decide What to Send</title>
@@ -1272,34 +1265,37 @@
<?dbhtml filename="CreatingAndUsingYourOwnSkinFile.html"?>
<title>Creating and Using Your Own Skin File</title>
- <para>In order to create your own skin whose constants are used by style classes at the first
- level, do the following:</para>
+ <para>In order to create your own skin file, do the following:</para>
<itemizedlist>
<listitem>
- <para>Create a file whose name follows the format of a skin file and place it into the
- ClassPath for the application. (Any skin file follows the naming format, <emphasis>
- <property><name.skin.properties></property>
- </emphasis>.)</para>
+ <para>Create a file and define in it skin constants which are used by style classes (see
+ section <link linkend="SkinParametersTablesInRichFaces">"Skin Parameters Tables
+ in RichFaces"</link>). The name of skin file should correspond to the
+ following format: <property>name.skin.properties</property>. As an example of such file
+ you can see RichFaces predefined skin parameters (skins): blueSky, classic, deepMarine,
+ etc. These files are located in the richfaces-impl-xxxxx.jar inside the /META-INF/skins
+ folder.</para>
</listitem>
<listitem>
- <para>Add a skin definition context-param element to the application's web.xml
- file:</para>
-
-
+ <para>Add a skin definition <contex-param> to the web.xml of your
+ application. An example is placed below:</para>
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>name</param-value>
-</context-param></programlisting>
+ <programlisting role="XML"><![CDATA[...
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>name</param-value>
+ </context-param>
+...
+]]></programlisting>
</listitem>
<listitem>
- <para>In the skins file, specify your own values for skin constants as described in the
- table.</para>
+ <para>Put your <property>name.skin.properties</property> file in one of the following classpath elements:
+ META-INF/skins/ or default package (e.g. WEB-INF/classes).</para>
</listitem>
</itemizedlist>
</section>
17 years, 2 months