JBoss Rich Faces SVN: r16171 - root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-12-18 10:16:45 -0500 (Fri, 18 Dec 2009)
New Revision: 16171
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js
Log:
merged file
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js 2009-12-18 15:10:27 UTC (rev 16170)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js 2009-12-18 15:16:45 UTC (rev 16171)
@@ -61,6 +61,7 @@
this.expandControl = this.getElement(id + ":expand");
this.collapseControl = this.getElement(id + ":collapse");
this.form = this.getElement(options.formId);
+ this.options = options;
this.forId = options.forId;
this.state = options.initialState;
@@ -120,6 +121,13 @@
},
ajaxToggle: function(expand){
+ if(richfaces.ajax && typeof richfaces.ajax == 'function') {
+ this.saveState(expand);
+ var source = this.id;
+ var event = this.options.eventName;
+ var params = this.options.ajax;
+ jsf.ajax.request(source, event, params);
+ }
},
command: function(name, element){
@@ -129,7 +137,6 @@
}
}
}
-
};
})());
14 years, 4 months
JBoss Rich Faces SVN: r16170 - root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-12-18 10:10:27 -0500 (Fri, 18 Dec 2009)
New Revision: 16170
Modified:
root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js
Log:
code review
Modified: root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js
===================================================================
--- root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js 2009-12-18 12:52:58 UTC (rev 16169)
+++ root/ui-sandbox/trunk/components/tables/ui/src/main/resources/META-INF/resources/toggler.js 2009-12-18 15:10:27 UTC (rev 16170)
@@ -1,3 +1,6 @@
+
+// TODO: remove second closure
+// TODO:
(function(jQuery, richfaces) {
richfaces.ui = richfaces.ui || {};
@@ -2,4 +5,5 @@
+ // TODO: Make "T" small. ToggleManager is not a class
richfaces.ui.ToggleManager = {};
-
+
(function(manager){
@@ -13,6 +17,7 @@
}
};
+ // TODO: Rename function names "clientToggle", "serverToggle" ... May be one function "toggle" with additional argument for type will be enough
manager['clientToggle'] = function(id, toState) {
if(id) {
togglers[id].clientToggle(toState);
@@ -46,8 +51,9 @@
(function (jQuery, richfaces) {
+ // TODO: not needed, was defined above
richfaces.ui = richfaces.ui || {};
-
+ // TODO: unnecessary space in tab
richfaces.ui.Toggle = function(id, options) {
this.getElement(id).rich= {component: this};
this.id = id;
@@ -62,12 +68,14 @@
jQuery.extend(richfaces.ui.Toggle.prototype, ( function () {
+ // REM: this=window. If you want to get this as instance to you object, you should call this function from public function using call or apply and set as context your object
var convertId = function (id){
return id.replace(/:/g, "\\:");
};
return {
getElement : function (id) {
+ // TODO: use jQuery instead of $
return $("#" + convertId(id));
},
@@ -125,4 +133,4 @@
};
})());
-})(jQuery, window.RichFaces);
\ No newline at end of file
+})(jQuery, window.RichFaces); // TODO: RichFaces may be undefined
\ No newline at end of file
14 years, 4 months
JBoss Rich Faces SVN: r16169 - root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-12-18 07:52:58 -0500 (Fri, 18 Dec 2009)
New Revision: 16169
Modified:
root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
Log:
fix checkstyle vilations
Modified: root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java
===================================================================
--- root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2009-12-18 10:02:13 UTC (rev 16168)
+++ root/cdk/trunk/plugins/maven-cdk-plugin/src/main/java/org/richfaces/builder/mojo/GenerateMojo.java 2009-12-18 12:52:58 UTC (rev 16169)
@@ -43,12 +43,9 @@
import org.richfaces.cdk.StandardOutputFolders;
import org.richfaces.cdk.StandardSources;
import org.richfaces.cdk.ValidatorImpl;
-import org.richfaces.cdk.model.ComponentLibrary;
import java.io.File;
import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
14 years, 4 months
JBoss Rich Faces SVN: r16168 - branches/community/3.3.X/samples/richfaces-demo/functional-test.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-12-18 05:02:13 -0500 (Fri, 18 Dec 2009)
New Revision: 16168
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
Log:
- RF-demo Ftest - copy richfaces-demo.war from ${demo.location} although destination file is newer
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-18 09:36:13 UTC (rev 16167)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-18 10:02:13 UTC (rev 16168)
@@ -390,7 +390,7 @@
</goals>
<configuration>
<tasks>
- <copy file="${demo.location}" tofile="${project.build.directory}/richfaces-demo.war" verbose="true" />
+ <copy file="${demo.location}" tofile="${project.build.directory}/richfaces-demo.war" overwrite="true" verbose="true" />
</tasks>
</configuration>
</execution>
@@ -463,7 +463,7 @@
</property>
</activation>
<properties>
- <container.home>${project.build.directory}/installs/apache-tomcat-${container.version}/apache-tomcat-${container.version}</container.home>
+ <container.home>${project.build.directory}/installs/apache-tomcat-r.version}/apache-tomcat-${container.version}</container.home>
</properties>
<build>
<plugins>
14 years, 4 months
JBoss Rich Faces SVN: r16167 - branches/community/3.3.X/samples/richfaces-demo/functional-test.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-12-18 04:36:13 -0500 (Fri, 18 Dec 2009)
New Revision: 16167
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
Log:
* RF-demo Ftest
- removed parent definition
- maven-selenium-plugin forced to version 1.0
- unpack jbossqa-extensions.js from selenium-testing-lib will overwrite original file
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-18 09:09:36 UTC (rev 16166)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-18 09:36:13 UTC (rev 16167)
@@ -1,13 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>samples</artifactId>
- <version>3.3.3-SNAPSHOT</version>
- </parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.richfaces.integrationTest</groupId>
<artifactId>functional-test</artifactId>
+ <version>3.3.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>selenium-test</name>
<url>http://maven.apache.org</url>
@@ -163,6 +159,8 @@
<includeArtifactIds>selenium</includeArtifactIds>
<includes>jbossqa-extensions.js</includes>
<outputDirectory>${extensions.dir}</outputDirectory>
+ <overWriteReleases>true</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
@@ -192,6 +190,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
+ <version>1.0</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
14 years, 4 months
JBoss Rich Faces SVN: r16166 - branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-12-18 04:09:36 -0500 (Fri, 18 Dec 2009)
New Revision: 16166
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
Log:
- RF-demo Ftest - seleniumLoggingListener creation and registration moved to @BeforeSuite (reference made as static), injecting selenium in @BeforeClass initializeContext and outjecting in @AfterClass finalizeContext
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-18 07:05:05 UTC (rev 16165)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-18 09:09:36 UTC (rev 16166)
@@ -39,7 +39,7 @@
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Parameters;
import com.thoughtworks.selenium.DefaultSelenium;
@@ -79,25 +79,20 @@
protected Waiting waitModelUpdate = Wait.interval(100).timeout(30000);
protected Waiting waitGuiInteraction = Wait.interval(100).timeout(500);
- /**
- * Test listener used to logging to selenium's server.log
- * via getEval() method (see {@link SeleniumLoggingTestListener})
- *
- * Don't forget to use SeleniumLoggingTestListener.setSelenium(Selenium)
- * to initialize selenium-side logging properly
- */
- SeleniumLoggingTestListener loggingTestListener;
-
- /**
- * Register test listener in test context
- *
- * @param context
- * will be injected by TestNG
- */
- @BeforeTest
- protected void addTestListeners(ITestContext context) {
- TestRunner runner = (TestRunner) context;
+ /**
+ * Test listener used to logging to selenium's server.log via getEval()
+ * method (see {@link SeleniumLoggingTestListener})
+ *
+ * Don't forget to use SeleniumLoggingTestListener.setSelenium(Selenium) to
+ * initialize selenium-side logging properly
+ */
+ private static volatile SeleniumLoggingTestListener loggingTestListener;
+
+ @BeforeSuite
+ protected void registerSeleniumInListeners(ITestContext context) {
loggingTestListener = new SeleniumLoggingTestListener();
+
+ TestRunner runner = (TestRunner) context;
runner.addTestListener(loggingTestListener);
}
@@ -132,6 +127,7 @@
selenium.start();
allowInitialXpath();
loadCustomLocationStrategies();
+ loggingTestListener.setSelenium(selenium);
// adding selenium-side logging facility
loggingTestListener.setSelenium(selenium);
@@ -167,16 +163,17 @@
selenium.allowNativeXpath("false");
}
- /**
- * Finalize context after each class run.
- */
- @AfterClass
- public void finalizeContext() {
- selenium.close();
- selenium.stop();
- selenium = null;
- contextPath = null;
- }
+ /**
+ * Finalize context after each class run.
+ */
+ @AfterClass
+ public void finalizeContext() {
+ loggingTestListener.setSelenium(null);
+ selenium.close();
+ selenium.stop();
+ selenium = null;
+ contextPath = null;
+ }
/**
* Default implementation of obtaining properties for each class.
14 years, 4 months
JBoss Rich Faces SVN: r16165 - in root/docs/trunk/Component_Reference/en-US: extras and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2009-12-18 02:05:05 -0500 (Fri, 18 Dec 2009)
New Revision: 16165
Added:
root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Resources-a4jloadBundle-0.xml_sample
Modified:
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
Log:
Worked on Resources chapter
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2009-12-17 18:52:56 UTC (rev 16164)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Actions.xml 2009-12-18 07:05:05 UTC (rev 16165)
@@ -10,7 +10,19 @@
This chapter details the basic components that respond to a user action and submit an Ajax request.
</para>
<section id="sect-Component_Reference-Actions-a4jactionParam">
- <title>a4j:actionParam</title>
+ <title><a4j:actionParam></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.ActionParameter</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HTMLActionParameter</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:actionParam></sgmltag> behavior combines the functionality of the JavaServer Faces (<acronym>JSF</acronym>) components <sgmltag><f:param></sgmltag> and <sgmltag><f:actionListener></sgmltag>.
</para>
@@ -78,11 +90,28 @@
<section id="sect-Component_Reference-Actions-a4jajaxListener">
<title>a4j:ajaxListener</title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ listener-class: <classname>org.ajax4jsf.event.AjaxListener</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ event-class: <classname>org.ajax4jsf.event.AjaxEvent</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ tag-class: <classname>org.ajax4jsf.taglib.html.jsp.AjaxListenerTag</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:ajaxListener></sgmltag> component adds an action listener to a parent component. It works similar to the JavaServer Faces <sgmltag><f:actionListener></sgmltag> or <sgmltag><f:valueChangeListener></sgmltag> components, except that the invocation of <sgmltag><a4j:ajaxListener></sgmltag> is not canceled if validation of the <emphasis>Update Model</emphasis> phase fails. The <sgmltag><a4j:ajaxListener></sgmltag> component is guaranteed to be invoked with each Ajax response.
</para>
<para>
- Baasic usage requires only the <varname>type</varname> attribute, which defines the fully-qualified Java class name for the listener. This Java class should implement the <classname>org.ajax4jsf.event.AjaxListener</classname> interface, which is a base listener for all listeners and is capable of receiving Ajax events. The object from which the event originated could be accessed using the <methodname>java.util.EventObject.getSource()</methodname> method.
+ Basic usage requires only the <varname>type</varname> attribute, which defines the fully-qualified Java class name for the listener. This Java class should implement the <classname>org.ajax4jsf.event.AjaxListener</classname> interface, which is a base listener for all listeners and is capable of receiving Ajax events. The object from which the event originated could be accessed using the <methodname>java.util.EventObject.getSource()</methodname> method.
</para>
<para>
The <sgmltag><a4j:ajaxListener></sgmltag> component is not invoked for non-Ajax requests, or when the RichFaces works in the <emphasis>Ajax request generates non-Ajax response</emphasis> mode, so the <sgmltag><a4j:ajaxListener></sgmltag> invocation is a good indicator that an Ajax response is going to be processed.
@@ -184,12 +213,37 @@
</listitem>
</itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:htmlCommandLink></sgmltag> component functions similarly to the standard <sgmltag><h:commandLink></sgmltag> component, but addresses some of the potential issues that can occur.
</para>
+ <para>
+ When using the standard component, hidden fields were not rendered to child elements if they were deemed unnecessary, so command links relating to content on the initial page could become broken if they were later updated through Ajax. The <sgmltag><a4j:htmlCommandLink></sgmltag> component addresses this by always rendering all hidden fields.
+ </para>
</section>
<section id="sect-Component_Reference-Actions-a4jjsFunction">
<title><a4j:jsFunction></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Function</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.ajaxFunction</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlajaxFunction</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.ajaxFunctionRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:jsFunction></sgmltag> component allows Ajax requests to be performed directly from JavaScript code, and server-side data to be invoked and returned in JavaScript Object Notation (<acronym>JSON</acronym>) format to use in client-side JavaScript calls.
</para>
@@ -213,19 +267,75 @@
<section id="sect-Component_Reference-Actions-a4jpoll">
<title><a4j:poll></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Poll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPoll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPoll</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPollRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
The <sgmltag><a4j:poll></sgmltag> component allows periodical sending of Ajax requests to the server. It is used for repeatedly updating a page at specific time intervals.
</para>
<para>
- The <varname>interval</varname> attribute specifies the time in milliseconds to between requests. The default for this value is 1000 ms (1 second).
+ The <varname>interval</varname> attribute specifies the time in milliseconds between requests. The default for this value is 1000 ms (1 second).
</para>
+ <para>
+ The <varname>timeout</varname> attribute defines the response waiting time in milliseconds. If a response isn't received within the timeout period, the connection is aborted and the next request is sent. By default, the timeout is not set.
+ </para>
+ <para>
+ The <sgmltag><a4j:poll></sgmltag> component can be enabled and disabled using the <varname>enabled</varname> attribute. Using Expression Language (<acronym>EL</acronym>), the <varname>enabled</varname> attribute can point to a bean property to apply a particular attribute value.
+ </para>
</section>
<section id="sect-Component_Reference-Actions-a4jpush">
<title><a4j:push></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:push></sgmltag> component periodically performs an Ajax request to the server, simulating "push" functionality. While it is not strictly pushing updates, the request is made to minimal code only, not to the <acronym>JSF</acronym> tree, checking for the presence of new messages in the queue. The request registers <classname>EventListener</classname>, which receives messages about events, but does not poll registered beans. If a message exists, a complete request is performed. This is different from the <sgmltag><a4j:poll></sgmltag> component, which performs a full request at every interval.
</para>
+ <para>
+ The <varname>interval</varname> attribute specifies the time in milliseconds between checking for messages. The default for this value is 1000 ms (1 second). It is possible to set the interval value to <literal>0</literal>, in which case it is constantly checking for new messages.
+ </para>
+ <para>
+ The <varname>timeout</varname> attribute defines the response waiting time in milliseconds. If a response isn't received within the timeout period, the connection is aborted and the next request is sent. By default, the timeout is not set. In combination with the <varname>interval</varname> attribute, checks for the queue state can short polls or long connections.
+ </para>
</section>
</chapter>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml 2009-12-17 18:52:56 UTC (rev 16164)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Common_features.xml 2009-12-18 07:05:05 UTC (rev 16165)
@@ -19,7 +19,7 @@
<section id="sect-Component_Reference-Common_features-Calling_available_JavaScript_methods">
<title>Calling available JavaScript methods</title>
<para>
- Incomplete
+ Client-side JavaScript methods can be called using component events. These JavaScript methods are defined using the relevant event attribute for the component tag.
</para>
</section>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-17 18:52:56 UTC (rev 16164)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Containers.xml 2009-12-18 07:05:05 UTC (rev 16165)
@@ -7,7 +7,7 @@
<chapter id="chap-Component_Reference-Containers">
<title>Containers</title>
<para>
- Incomplete
+ This chapter details those components in the <classname>a4j</classname> tag library which define an area used as a container or wrapper for other components.
</para>
<section id="sect-Component_Reference-Containers-a4jform">
<title><a4j:form></title>
Modified: root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml
===================================================================
--- root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2009-12-17 18:52:56 UTC (rev 16164)
+++ root/docs/trunk/Component_Reference/en-US/chap-Component_Reference-Resources.xml 2009-12-18 07:05:05 UTC (rev 16165)
@@ -7,38 +7,196 @@
<chapter id="chap-Component_Reference-Resources">
<title>Resources</title>
<para>
- Incomplete
+ This chapter covers those components used to handle and manage resources and beans.
</para>
<section id="sect-Component_Reference-Resources-a4jloadBundle">
- <title>a4j:loadBundle</title>
+ <title><a4j:loadBundle></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Bundle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.Bundle</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxLoadBundle</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:loadBundle></sgmltag> component is used to load resource bundles to aid in localization of an application. The bundles are localized to the locale of the current view, and properties are stored as a map in the current request attributes.
</para>
+ <para>
+ The <sgmltag><a4j:loadBundle></sgmltag> component allows bundles to be accessed by Ajax requests working in their own address scopes. This solves the problem of using the <acronym>JSF</acronym> <sgmltag><h:loadBundle></sgmltag> component with Ajax, where bundle information loaded with the page was unavailable for later Ajax requests.
+ </para>
+ <para>
+ Resource bundles are registered in the Faces configuration file, <filename>faces-config.xml</filename>.
+ </para>
+ <example id="exam-Component_Reference-Resources-a4jloadBundle">
+ <title><sgmltag><a4j:loadBundle></sgmltag> example</title>
+ <para>
+ This example shows a simple application capable of switching between different localized languages.
+ </para>
+ <procedure>
+ <step>
+ <title>Create resource bundles</title>
+ <para>
+ String resource bundles are contained in files with a <filename class="extension">.properties</filename> extension. The files consist of a list of entries, each with a unique name and a corresponding value. A seperate file is required for each language. Append the filename with the locale identifier (<literal>en</literal> for English, for example).
+ </para>
+ </step>
+ <step>
+ <title>Register bundles in Faces configuration file</title>
+ <para>
+ The resource bundles need to be registered in the Faces configuration file, <filename>faces-config.xml</filename>. The filename is defined with the <sgmltag><message-bundle></sgmltag> tag, without the locale code and without the extension. The supported locale codes are listed with <sgmltag><supported-locale></sgmltag> tags.
+ </para>
+<programlisting language="XML" role="XML">
+<xi:include parse="text" href="extras/exam-Component_Reference-Resources-a4jloadBundle-0.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ <step>
+ <title>Create method to set locale</title>
+ <para>
+ The <acronym>JSF</acronym> <methodname>javax.faces.component.UIViewRoot.setLocale()</methodname> method can be used to update the locale through a Java class:
+ </para>
+<programlisting language="java" role="JAVA">
+<xi:include parse="text" href="extras/exam-Component_Reference-Resources-a4jloadBundle-1.js" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ <step>
+ <title>Add <sgmltag><a4j:loadBundle></sgmltag> to the <acronym>JSP</acronym> page</title>
+ <para>
+ The <sgmltag><a4j:loadBundle></sgmltag> component is added to the application, and links to change the locale will update the displayed text.
+ </para>
+<programlisting language="XML" role="XML">
+<xi:include parse="text" href="extras/exam-Component_Reference-Resources-a4jloadBundle-2.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</programlisting>
+ </step>
+ </procedure>
+ <para>
+ Clicking on the different links will render the localized string as appropriate.
+ </para>
+ </example>
</section>
<section id="sect-Component_Reference-Resources-a4jloadScript">
- <title>a4j:loadScript</title>
+ <title><a4j:loadScript></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.LoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.LoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.HtmlLoadScript</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.LoadScriptRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
- Incomplete
+ The <sgmltag><a4j:loadScript></sgmltag> component allows scripts to be loaded from external sources such as <filename>jar</filename> files.
</para>
+ <para>
+ The required <varname>src</varname> attribute defines the path to the script. A leading slash (<literal>/</literal>) represents the root of the web context. The <code>resource:///</code> prefix can be used to access a file in the RichFaces resource framework.
+ </para>
</section>
<section id="sect-Component_Reference-Resources-a4jloadStyle">
- <title>a4j:loadStyle</title>
+ <title><a4j:loadStyle></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Resources-a4jkeepAlive">
- <title>a4j:keepAlive</title>
+ <title><a4j:keepAlive></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Incomplete
</para>
</section>
<section id="sect-Component_Reference-Resources-a4jmediaOutput">
- <title>a4j:mediaOutput</title>
+ <title><a4j:mediaOutput></title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ component-type: <classname>org.ajax4jsf.Push</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-family: <classname>org.ajax4jsf.components.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ component-class: <classname>org.ajax4jsf.component.html.AjaxPush</classname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ renderer-type: <classname>org.ajax4jsf.components.AjaxPushRenderer</classname>
+ </para>
+ </listitem>
+ </itemizedlist>
<para>
Incomplete
</para>
Added: root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Resources-a4jloadBundle-0.xml_sample
===================================================================
--- root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Resources-a4jloadBundle-0.xml_sample (rev 0)
+++ root/docs/trunk/Component_Reference/en-US/extras/exam-Component_Reference-Resources-a4jloadBundle-0.xml_sample 2009-12-18 07:05:05 UTC (rev 16165)
@@ -0,0 +1,9 @@
+<application>
+ <locale-config>
+ <default-locale>en</default-locale>
+ <supported-locale>en</supported-locale>
+ <supported-locale>de</supported-locale>
+ <supported-locale>it</supported-locale>
+ </locale-config>
+ <message-bundle>demo.message</message-bundle>
+</application>
14 years, 4 months
JBoss Rich Faces SVN: r16164 - root/framework/trunk/impl.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-12-17 13:52:56 -0500 (Thu, 17 Dec 2009)
New Revision: 16164
Modified:
root/framework/trunk/impl/checkstyle-suppressions.xml
Log:
hot fix for checkstyle fail build
Modified: root/framework/trunk/impl/checkstyle-suppressions.xml
===================================================================
--- root/framework/trunk/impl/checkstyle-suppressions.xml 2009-12-17 15:30:49 UTC (rev 16163)
+++ root/framework/trunk/impl/checkstyle-suppressions.xml 2009-12-17 18:52:56 UTC (rev 16164)
@@ -20,4 +20,9 @@
<suppress checks="IllegalCatch" files="ResourceHandlerImpl.java" />
<suppress checks="IllegalThrows" files="AbstractThreadedTest.java" />
<suppress checks="ModifiedControlVariable" files="URLCodec.java" />
+
+ <!-- TODO it is hot fix for building process, this files belong to the test-base module,
+ and must be removed from here -->
+ <suppress checks="IllegalCatch" files="AbstractThreadedTest.java" />
+ <suppress checks="IllegalCatch" files="StagingServer.java" />
</suppressions>
14 years, 4 months
JBoss Rich Faces SVN: r16163 - branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-12-17 10:30:49 -0500 (Thu, 17 Dec 2009)
New Revision: 16163
Modified:
branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/ObjectValidator.java
Log:
Fix RF-8219
Modified: branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/ObjectValidator.java
===================================================================
--- branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/ObjectValidator.java 2009-12-17 12:08:58 UTC (rev 16162)
+++ branches/community/3.3.X/ui/beanValidator/src/main/java/org/richfaces/validator/ObjectValidator.java 2009-12-17 15:30:49 UTC (rev 16163)
@@ -52,13 +52,20 @@
ObjectValidator validator = null;
try {
validator = new BeanValidator();
- } catch (Exception e) {
+ } catch (Exception e){
try {
validator = new HibernateValidator();
} catch (Throwable e2) {
//Hibernate-validators not available
}
}
+ catch (LinkageError le){
+ try {
+ validator = new HibernateValidator();
+ } catch (Throwable e2) {
+ //Hibernate-validators not available
+ }
+ }
if(validator == null){
log.warn("Validator implementations not found at classpath, default NullValidator will be used.");
validator = new NullValidator();
14 years, 4 months
JBoss Rich Faces SVN: r16162 - branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2009-12-17 07:08:58 -0500 (Thu, 17 Dec 2009)
New Revision: 16162
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java
Log:
* DataFilterSlider
- waiting >3s for stabilizing output up to 15s (old delay was too small for slow tests in IE)
Modified: branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java
===================================================================
--- branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java 2009-12-17 10:40:49 UTC (rev 16161)
+++ branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java 2009-12-17 12:08:58 UTC (rev 16162)
@@ -179,7 +179,7 @@
waitTableTextStabilizes.until(conditionTableTextStabilizes);
}
- private Waiting waitTableTextStabilizes = Wait.interval(100).timeout(10000).failWith("Table text never got stabilized");
+ private Waiting waitTableTextStabilizes = Wait.interval(1000).timeout(15000).failWith("Table text never got stabilized");
private Condition conditionTableTextStabilizes = new Condition() {
String memory;
@@ -199,7 +199,7 @@
count = 0;
}
- if (count >= 10) {
+ if (count >= 3) {
return true;
}
14 years, 4 months