JBoss Rich Faces SVN: r17734 - root/core/trunk/impl/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-06 08:29:02 -0400 (Tue, 06 Jul 2010)
New Revision: 17734
Modified:
root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
Log:
getRelativeRowIndex() method fixed
Modified: root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-07-06 10:20:12 UTC (rev 17733)
+++ root/core/trunk/impl/src/main/java/org/richfaces/component/UISequence.java 2010-07-06 12:29:02 UTC (rev 17734)
@@ -274,15 +274,14 @@
}
public int getRelativeRowIndex() {
+ int rowIndex = getRowIndex();
int rows = getRows();
- if(rows == 0) {
- rows = getRowCount();
+
+ if (rows > 0) {
+ return rowIndex % rows;
}
- int rowIndex = getRowIndex();
- rows = (rows == 0) ? rowIndex : (rowIndex % rows);
-
- return (rows);
+ return rowIndex;
}
public String getRelativeClientId(FacesContext facesContext) {
14 years, 6 months
JBoss Rich Faces SVN: r17733 - root/core/trunk/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-06 06:20:12 -0400 (Tue, 06 Jul 2010)
New Revision: 17733
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-event.js
Log:
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-event.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-event.js 2010-07-06 10:01:07 UTC (rev 17732)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-event.js 2010-07-06 10:20:12 UTC (rev 17733)
@@ -76,16 +76,16 @@
* @name RichFaces.Event.bind
*
* @param {string|DOMElement|jQuery} selector - jQuery elements selector
- * @param {string} type - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} eventType - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} fn - event handler
* @param {Object} [data] - component or object with additional data
* It is a context for an event handler
* @return {function} function that binded to the element's event
* */
- bind : function(selector, type, fn, component, data) {
- // type: namespace can be used, like onclick.rf.conponentName
+ bind : function(selector, eventType, fn, component, data) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
var f = getHandlerWrapper(component, fn);
- getEventElement(selector).bind(type, data, f);
+ getEventElement(selector).bind(eventType, data, f);
return f;
},
@@ -95,20 +95,20 @@
* @name RichFaces.Event.bindById
*
* @param {string} id - DOM element id
- * @param {string} type - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} eventType - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} fn - event handler
* @param {Object} [data] - component or object with additional data
* It is a context for an event handler
* @return {function} function that binded to the element's event
* */
- bindById : function(id, type, fn, component, data) {
- // type: namespace can be used, like onclick.rf.conponentName
- if (typeof type == "object") {
+ bindById : function(id, eventType, fn, component, data) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
+ if (typeof eventType == "object") {
// in this case fn == component object
- $(document.getElementById(id)).bind(getMultipleHandlerWrapper(type, fn), data);
+ $(document.getElementById(id)).bind(getMultipleHandlerWrapper(eventType, fn), data);
} else {
var f = getHandlerWrapper(component, fn);
- $(document.getElementById(id)).bind(type, data, f);
+ $(document.getElementById(id)).bind(eventType, data, f);
}
return f;
},
@@ -120,16 +120,16 @@
* @name RichFaces.Event.bindOne
*
* @param {string|DOMElement|jQuery} selector - jQuery elements selector
- * @param {string} type - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} eventType - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} fn - event handler
* @param {Object} [data] - component or object with additional data
* It is a context for an event handler
* @return {function} function that binded to the element's event
* */
- bindOne: function(selector, type, fn, component, data) {
- // type: namespace can be used, like onclick.rf.conponentName
+ bindOne: function(selector, eventType, fn, component, data) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
var f = getHandlerWrapper(component, fn);
- getEventElement(selector).one(type, data, f);
+ getEventElement(selector).one(eventType, data, f);
return f;
},
@@ -140,16 +140,16 @@
* @name RichFaces.Event.bindOneById
*
* @param {string} id - DOM element id
- * @param {string} type - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} eventType - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} fn - event handler
* @param {Object} [data] - component or object with additional data
* It is a context for an event handler
* @return {function} function that binded to the element's event
* */
- bindOneById: function(id, type, fn, component, data) {
- // type: namespace can be used, like onclick.rf.conponentName
+ bindOneById: function(id, eventType, fn, component, data) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
var f = getHandlerWrapper(component, fn);
- $(document.getElementById(id)).one(type, data, f);
+ $(document.getElementById(id)).one(eventType, data, f);
return f;
},
@@ -159,13 +159,13 @@
* @name RichFaces.Event.unbind
*
* @param {string|DOMElement|jQuery} selector - jQuery elements selector
- * @param {string} [type] - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} [eventType] - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} [fn] - event handler
* @return {jQuery} element wrapped by jQuery
* */
- unbind : function(selector, type, fn) {
- // type: namespace can be used, like onclick.rf.conponentName
- return getEventElement(selector).unbind(type, fn);
+ unbind : function(selector, eventType, fn) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
+ return getEventElement(selector).unbind(eventType, fn);
},
/**
@@ -175,13 +175,13 @@
* @name RichFaces.Event.unbindById
*
* @param {string} id - DOM element id
- * @param {string} [type] - one or more JavaScript event types, such as "click" or "submit," or custom event names
+ * @param {string} [eventType] - one or more JavaScript event types, such as "click" or "submit," or custom event names
* @param {function} [fn] - event handler
* @return {jQuery} element wrapped by jQuery
* */
- unbindById : function(id, type, fn) {
- // type: namespace can be used, like onclick.rf.conponentName
- return $(document.getElementById(id)).unbind(type, fn);
+ unbindById : function(id, eventType, fn) {
+ // eventType: namespace can be used, like onclick.rf.conponentName
+ return $(document.getElementById(id)).unbind(eventType, fn);
},
/**
@@ -190,12 +190,14 @@
* @name RichFaces.Event.fire
*
* @param {string|DOMElement|jQuery} selector - jQuery elements selector
- * @param {string} event - event name
+ * @param {string} eventType - event type
* @param {Object} [data] - a object of additional parameters to pass to the event handler
* @return {jQuery} element wrapped by jQuery
* */
- fire : function(selector, event, data) {
- return getEventElement(selector).trigger(event, data);
+ fire : function(selector, eventType, data) {
+ var event = $.Event(eventType);
+ getEventElement(selector).trigger(eventType, data);
+ return !event.isDefaultPrevented();
},
/**
@@ -204,12 +206,14 @@
* @name RichFaces.Event.fireById
*
* @param {string} id - DOM element id
- * @param {string} event - event name
+ * @param {string} eventType - event type
* @param {Object} [data] - a object of additional parameters to pass to the event handler
* @return {jQuery} element wrapped by jQuery
* */
- fireById : function(id, event, data) {
- return $(document.getElementById(id)).trigger(event, data);
+ fireById : function(id, eventType, data) {
+ var event = $.Event(eventType);
+ $(document.getElementById(id)).trigger(event, data);
+ return !event.isDefaultPrevented();
},
/**
@@ -222,12 +226,12 @@
* @name RichFaces.Event.callHandler
*
* @param {string|DOMElement|jQuery} selector - jQuery elements selector
- * @param {string} event - event name
+ * @param {string} eventType - event type
* @param {Object} [data] - a object of additional parameters to pass to the event handler
* @return value that was returned by the handler
* */
- callHandler : function(selector, event, data) {
- return getEventElement(selector).triggerHandler(event, data);
+ callHandler : function(selector, eventType, data) {
+ return getEventElement(selector).triggerHandler(eventType, data);
},
/**
@@ -236,12 +240,12 @@
* @name RichFaces.Event.callHandlerById
*
* @param {string} id - DOM element id
- * @param {string} event - event name
+ * @param {string} eventType - event type
* @param {Object} [data] - a object of additional parameters to pass to the event handler
* @return value that was returned by the handler
* */
- callHandlerById : function(id, event, data) {
- return $(document.getElementById(id)).triggerHandler(event, data);
+ callHandlerById : function(id, eventType, data) {
+ return $(document.getElementById(id)).triggerHandler(eventType, data);
},
/**
14 years, 6 months
JBoss Rich Faces SVN: r17732 - in root: ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-06 06:01:07 -0400 (Tue, 06 Jul 2010)
New Revision: 17732
Added:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-selection.js
Removed:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/richfaces-selection.js
Modified:
root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/1.html
Log:
move richfaces-selection.js to impl
Copied: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-selection.js (from rev 17731, root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/richfaces-selection.js)
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-selection.js (rev 0)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-selection.js 2010-07-06 10:01:07 UTC (rev 17732)
@@ -0,0 +1,45 @@
+(function (richfaces) {
+
+ richfaces.Selection = richfaces.Selection || {};
+
+ richfaces.Selection.set = function (field, start, end) {
+ if(field.setSelectionRange) {
+ field.focus();
+ field.setSelectionRange(start, end);
+ } else if (field.createTextRange){
+ var range = field.createTextRange();
+ range.collapse(true);
+ range.moveEnd('character', end);
+ range.moveStart('character', start);
+ range.select();
+ }
+ }
+
+ richfaces.Selection.getStart = function(field)
+ {
+ if (field.setSelectionRange) {
+ return field.selectionStart;
+ } else if (document.selection && document.selection.createRange) {
+ var r = document.selection.createRange().duplicate();
+ r.moveEnd('character', field.value.length);
+ if (r.text == '') return field.value.length;
+ return field.value.lastIndexOf(r.text);
+ }
+ }
+
+ richfaces.Selection.getEnd = function(field)
+ {
+ if (field.setSelectionRange) {
+ return field.selectionEnd;
+ } else if (document.selection && document.selection.createRange) {
+ var r = document.selection.createRange().duplicate();
+ r.moveStart('character', -field.value.length);
+ return r.text.length;
+ }
+ }
+
+ richfaces.Selection.setCaretTo = function (field, pos)
+ {
+ richfaces.Selection.set(field, pos, pos);
+ }
+})(window.RichFaces || (window.RichFaces={}));
\ No newline at end of file
Modified: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/1.html
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/1.html 2010-07-06 05:25:33 UTC (rev 17731)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/1.html 2010-07-06 10:01:07 UTC (rev 17732)
@@ -9,7 +9,7 @@
<script type="text/javascript" src="..\..\..\..\..\..\..\..\..\..\core\trunk\impl\src\main\resources\META-INF\resources\richfaces.js "></script>
<script type="text/javascript" src="..\..\..\..\..\..\..\..\..\..\core\trunk\impl\src\main\resources\META-INF\resources\richfaces-event.js "></script>
<script type="text/javascript" src="..\..\..\..\..\..\..\..\..\..\core\trunk\impl\src\main\resources\META-INF\resources\richfaces-base-component.js "></script>
- <script type="text/javascript" src="richfaces-selection.js"></script>
+ <script type="text/javascript" src="..\..\..\..\..\..\..\..\..\..\core\trunk\impl\src\main\resources\META-INF\resources\richfaces-selection.js"></script>
<script type="text/javascript" src="SelectBase.js"></script>
<script type="text/javascript" src="ComboBox.js"></script>
<style>
Deleted: root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/richfaces-selection.js
===================================================================
--- root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/richfaces-selection.js 2010-07-06 05:25:33 UTC (rev 17731)
+++ root/ui-sandbox/inputs/trunk/combobox/src/main/resources/META-INF/resources/script/richfaces-selection.js 2010-07-06 10:01:07 UTC (rev 17732)
@@ -1,45 +0,0 @@
-(function (richfaces) {
-
- richfaces.Selection = richfaces.Selection || {};
-
- richfaces.Selection.set = function (field, start, end) {
- if(field.setSelectionRange) {
- field.focus();
- field.setSelectionRange(start, end);
- } else if (field.createTextRange){
- var range = field.createTextRange();
- range.collapse(true);
- range.moveEnd('character', end);
- range.moveStart('character', start);
- range.select();
- }
- }
-
- richfaces.Selection.getStart = function(field)
- {
- if (field.setSelectionRange) {
- return field.selectionStart;
- } else if (document.selection && document.selection.createRange) {
- var r = document.selection.createRange().duplicate();
- r.moveEnd('character', field.value.length);
- if (r.text == '') return field.value.length;
- return field.value.lastIndexOf(r.text);
- }
- }
-
- richfaces.Selection.getEnd = function(field)
- {
- if (field.setSelectionRange) {
- return field.selectionEnd;
- } else if (document.selection && document.selection.createRange) {
- var r = document.selection.createRange().duplicate();
- r.moveStart('character', -field.value.length);
- return r.text.length;
- }
- }
-
- richfaces.Selection.setCaretTo = function (field, pos)
- {
- richfaces.Selection.set(field, pos, pos);
- }
-})(window.RichFaces || (window.RichFaces={}));
\ No newline at end of file
14 years, 6 months
JBoss Rich Faces SVN: r17731 - root/ui/iteration/trunk/dist.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-07-06 01:25:33 -0400 (Tue, 06 Jul 2010)
New Revision: 17731
Modified:
root/ui/iteration/trunk/dist/pom.xml
Log:
remove cdk plugin from dist project
Modified: root/ui/iteration/trunk/dist/pom.xml
===================================================================
--- root/ui/iteration/trunk/dist/pom.xml 2010-07-06 04:25:01 UTC (rev 17730)
+++ root/ui/iteration/trunk/dist/pom.xml 2010-07-06 05:25:33 UTC (rev 17731)
@@ -44,11 +44,12 @@
<build>
<plugins>
<!-- We need to disable the cdk plugin for the dist modules -->
- <plugin>
+ <!-- <plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
<inherited>false</inherited>
</plugin>
+ -->
</plugins>
</build>
@@ -57,4 +58,4 @@
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/ui/iteration/trunk/dist</developerConnection>
<url>http://fisheye.jboss.org/browse/richfaces</url>
</scm>
-</project>
\ No newline at end of file
+</project>
14 years, 6 months
JBoss Rich Faces SVN: r17730 - in root/docs/trunk: Developer_Guide and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-07-06 00:25:01 -0400 (Tue, 06 Jul 2010)
New Revision: 17730
Modified:
root/docs/trunk/Component_Reference/pom.xml
root/docs/trunk/Developer_Guide/pom.xml
root/docs/trunk/Migration_Guide/pom.xml
Log:
Updated docs poms to new structure
Modified: root/docs/trunk/Component_Reference/pom.xml
===================================================================
--- root/docs/trunk/Component_Reference/pom.xml 2010-07-06 04:22:20 UTC (rev 17729)
+++ root/docs/trunk/Component_Reference/pom.xml 2010-07-06 04:25:01 UTC (rev 17730)
@@ -1,34 +1,111 @@
<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>Component_Reference</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>jdocbook</packaging>
- <name>Component Reference</name>
+ <groupId>org.richfaces.component-reference</groupId>
+ <artifactId>richfaces-component-reference</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>RichFaces Component Reference</name>
+ <url>http://www.jboss.org/richfaces</url>
- <properties>
- <translation>en-US</translation>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <properties>
<docname>Component_Reference</docname>
<bookname>Component Reference</bookname>
- </properties>
+ </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <defaultGoal>process-classes</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ </plugin>
+ <!--
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/target/docbook/publish/en-US/pdf/${pdf.name}" todir="${basedir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-zip</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.outputDirectory}/${project.artifactId}-${project.version}.war</file>
+ <type>war</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+ <profiles>
+
+ <profile>
+ <id>translations</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <configuration>
+ <translations>
+ <translation>it-IT</translation>
+ <translation>zh-CN</translation>
+ <translation>zh-TW</translation>
+ <translation>es-ES</translation>
+ <translation>ko-KR</translation>
+ <translation>de-DE</translation>
+ <translation>pt-BR</translation>
+ </translations>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/docs/trunk/Componen...</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/docs/trunk/Component_R...</developerConnection>
@@ -36,4 +113,3 @@
</scm>
</project>
-
Modified: root/docs/trunk/Developer_Guide/pom.xml
===================================================================
--- root/docs/trunk/Developer_Guide/pom.xml 2010-07-06 04:22:20 UTC (rev 17729)
+++ root/docs/trunk/Developer_Guide/pom.xml 2010-07-06 04:25:01 UTC (rev 17730)
@@ -1,34 +1,111 @@
<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>Developer_Guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>jdocbook</packaging>
- <name>Developer Guide</name>
+ <groupId>org.richfaces.developer-guide</groupId>
+ <artifactId>richfaces-developer-guide</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>RichFaces Developer Guide</name>
+ <url>http://www.jboss.org/richfaces</url>
- <properties>
- <translation>en-US</translation>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <properties>
<docname>Developer_Guide</docname>
<bookname>Developer Guide</bookname>
- </properties>
+ </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <defaultGoal>process-classes</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ </plugin>
+ <!--
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/target/docbook/publish/en-US/pdf/${pdf.name}" todir="${basedir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-zip</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.outputDirectory}/${project.artifactId}-${project.version}.war</file>
+ <type>war</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+ <profiles>
+
+ <profile>
+ <id>translations</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <configuration>
+ <translations>
+ <translation>it-IT</translation>
+ <translation>zh-CN</translation>
+ <translation>zh-TW</translation>
+ <translation>es-ES</translation>
+ <translation>ko-KR</translation>
+ <translation>de-DE</translation>
+ <translation>pt-BR</translation>
+ </translations>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/docs/trunk/Develope...</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/docs/trunk/Developer_G...</developerConnection>
Modified: root/docs/trunk/Migration_Guide/pom.xml
===================================================================
--- root/docs/trunk/Migration_Guide/pom.xml 2010-07-06 04:22:20 UTC (rev 17729)
+++ root/docs/trunk/Migration_Guide/pom.xml 2010-07-06 04:25:01 UTC (rev 17730)
@@ -1,34 +1,111 @@
<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>docs-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.docs</groupId>
- <artifactId>Migration_Guide</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>jdocbook</packaging>
- <name>Migration Guide</name>
+ <groupId>org.richfaces.migration-guide</groupId>
+ <artifactId>richfaces-migration-guide</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>jdocbook</packaging>
+ <name>RichFaces Migration Guide</name>
+ <url>http://www.jboss.org/richfaces</url>
- <properties>
- <translation>en-US</translation>
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <properties>
<docname>Migration_Guide</docname>
<bookname>Migration Guide</bookname>
- </properties>
+ </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jdocbook-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <defaultGoal>process-classes</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ </plugin>
+ <!--
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/target/docbook/publish/en-US/pdf/${pdf.name}" todir="${basedir}" />
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-zip</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.outputDirectory}/${project.artifactId}-${project.version}.war</file>
+ <type>war</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+ </build>
+ <profiles>
+
+ <profile>
+ <id>translations</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>translate</goal>
+ </goals>
+ </execution>
+ </executions>
+
+ <configuration>
+ <translations>
+ <translation>it-IT</translation>
+ <translation>zh-CN</translation>
+ <translation>zh-TW</translation>
+ <translation>es-ES</translation>
+ <translation>ko-KR</translation>
+ <translation>de-DE</translation>
+ <translation>pt-BR</translation>
+ </translations>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
<scm>
<connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/docs/trunk/Migratio...</connection>
<developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/docs/trunk/Migration_G...</developerConnection>
14 years, 6 months
JBoss Rich Faces SVN: r17729 - root/build/parent/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-07-06 00:22:20 -0400 (Tue, 06 Jul 2010)
New Revision: 17729
Modified:
root/build/parent/trunk/pom.xml
Log:
Added docs plugin to parent pom
Modified: root/build/parent/trunk/pom.xml
===================================================================
--- root/build/parent/trunk/pom.xml 2010-07-06 04:19:02 UTC (rev 17728)
+++ root/build/parent/trunk/pom.xml 2010-07-06 04:22:20 UTC (rev 17729)
@@ -256,6 +256,59 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.2</version>
</plugin>
+ <plugin>
+ <groupId>org.jboss.maven.plugins</groupId>
+ <artifactId>maven-jdocbook-plugin</artifactId>
+ <version>2.2.3</version>
+ <extensions>true</extensions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-xslt</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossorg-jdocbook-style</artifactId>
+ <version>1.1.0</version>
+ <type>jdocbook-style</type>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <sourceDirectory>${project.basedir}/src/main/docbook</sourceDirectory>
+ <sourceDocumentName>${docname}.xml</sourceDocumentName>
+ <masterTranslation>en-US</masterTranslation>
+ <imageResource>
+ <directory>${project.basedir}/src/main/docbook/en-US</directory>
+ <includes>
+ <include>images/*.png</include>
+ </includes>
+ </imageResource>
+ <formats>
+ <format>
+ <formatName>pdf</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/pdf.xsl</stylesheetResource>
+ <finalName>${pdf.name}</finalName>
+ </format>
+ <format>
+ <formatName>html</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ <format>
+ <formatName>html_single</formatName>
+ <stylesheetResource>classpath:/xslt/org/jboss/xhtml-single.xsl</stylesheetResource>
+ <finalName>index.html</finalName>
+ </format>
+ </formats>
+ <options>
+ <xincludeSupported>true</xincludeSupported>
+ <xmlTransformerType>saxon</xmlTransformerType>
+ <docbookVersion>1.72.0</docbookVersion>
+ <localeSeparator>-</localeSeparator>
+ </options>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
14 years, 6 months
JBoss Rich Faces SVN: r17728 - root.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-07-06 00:19:02 -0400 (Tue, 06 Jul 2010)
New Revision: 17728
Modified:
root/pom.xml
Log:
Removed old docs reference from root pom
Modified: root/pom.xml
===================================================================
--- root/pom.xml 2010-07-06 03:03:19 UTC (rev 17727)
+++ root/pom.xml 2010-07-06 04:19:02 UTC (rev 17728)
@@ -49,7 +49,7 @@
<module>archetypes/richfaces-archetype-simpleapp/${richfaces.archetype.simpleapp.path}</module>
<module>examples/core-demo/${richfaces.examples.core-demo.path}</module>
<module>examples/richfaces-showcase/${richfaces.examples.showcase.path}</module>
- <module>docs/${richfaces.docs.path}</module>
+ <!--<module>docs/${richfaces.docs.path}</module>-->
</modules>
<profiles>
14 years, 6 months
JBoss Rich Faces SVN: r17727 - in root/docs/trunk: Component_Reference and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-07-05 23:03:19 -0400 (Mon, 05 Jul 2010)
New Revision: 17727
Added:
root/docs/trunk/Component_Reference/src/
root/docs/trunk/Component_Reference/src/main/
root/docs/trunk/Component_Reference/src/main/docbook/
root/docs/trunk/Component_Reference/src/main/docbook/en-US/
root/docs/trunk/Component_Reference/src/main/docbook/publican.cfg
root/docs/trunk/Developer_Guide/src/
root/docs/trunk/Developer_Guide/src/main/
root/docs/trunk/Developer_Guide/src/main/docbook/
root/docs/trunk/Developer_Guide/src/main/docbook/en-US/
root/docs/trunk/Developer_Guide/src/main/docbook/publican.cfg
root/docs/trunk/Migration_Guide/src/
root/docs/trunk/Migration_Guide/src/main/
root/docs/trunk/Migration_Guide/src/main/docbook/
root/docs/trunk/Migration_Guide/src/main/docbook/en-US/
root/docs/trunk/Migration_Guide/src/main/docbook/publican.cfg
Removed:
root/docs/trunk/Component_Reference/en-US/
root/docs/trunk/Component_Reference/publican.cfg
root/docs/trunk/Developer_Guide/en-US/
root/docs/trunk/Developer_Guide/publican.cfg
root/docs/trunk/Migration_Guide/en-US/
root/docs/trunk/Migration_Guide/publican.cfg
root/docs/trunk/parent/
root/docs/trunk/pom.xml
Log:
Restructured docs directories
Deleted: root/docs/trunk/Component_Reference/publican.cfg
===================================================================
--- root/docs/trunk/Component_Reference/publican.cfg 2010-07-06 02:56:52 UTC (rev 17726)
+++ root/docs/trunk/Component_Reference/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -1,7 +0,0 @@
-# Config::Simple 4.59
-# Fri Nov 20 15:18:32 2009
-
-show_remarks: 1
-debug: 1
-xml_lang: en-US
-#brand: jboss-community-richfaces
Copied: root/docs/trunk/Component_Reference/src/main/docbook/en-US (from rev 17725, root/docs/trunk/Component_Reference/en-US)
Copied: root/docs/trunk/Component_Reference/src/main/docbook/publican.cfg (from rev 17725, root/docs/trunk/Component_Reference/publican.cfg)
===================================================================
--- root/docs/trunk/Component_Reference/src/main/docbook/publican.cfg (rev 0)
+++ root/docs/trunk/Component_Reference/src/main/docbook/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 15:18:32 2009
+
+show_remarks: 1
+debug: 1
+xml_lang: en-US
+#brand: jboss-community-richfaces
Deleted: root/docs/trunk/Developer_Guide/publican.cfg
===================================================================
--- root/docs/trunk/Developer_Guide/publican.cfg 2010-07-06 02:56:52 UTC (rev 17726)
+++ root/docs/trunk/Developer_Guide/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -1,7 +0,0 @@
-# Config::Simple 4.59
-# Fri Nov 20 15:18:45 2009
-
-show_remarks: 1
-debug: 1
-xml_lang: en-US
-#brand: jboss-community-richfaces
Copied: root/docs/trunk/Developer_Guide/src/main/docbook/en-US (from rev 17725, root/docs/trunk/Developer_Guide/en-US)
Copied: root/docs/trunk/Developer_Guide/src/main/docbook/publican.cfg (from rev 17725, root/docs/trunk/Developer_Guide/publican.cfg)
===================================================================
--- root/docs/trunk/Developer_Guide/src/main/docbook/publican.cfg (rev 0)
+++ root/docs/trunk/Developer_Guide/src/main/docbook/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 15:18:45 2009
+
+show_remarks: 1
+debug: 1
+xml_lang: en-US
+#brand: jboss-community-richfaces
Deleted: root/docs/trunk/Migration_Guide/publican.cfg
===================================================================
--- root/docs/trunk/Migration_Guide/publican.cfg 2010-07-06 02:56:52 UTC (rev 17726)
+++ root/docs/trunk/Migration_Guide/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -1,7 +0,0 @@
-# Config::Simple 4.59
-# Fri Nov 20 15:18:57 2009
-
-show_remarks: 1
-debug: 1
-xml_lang: en-US
-#brand: jboss-community-richfaces
Copied: root/docs/trunk/Migration_Guide/src/main/docbook/en-US (from rev 17725, root/docs/trunk/Migration_Guide/en-US)
Copied: root/docs/trunk/Migration_Guide/src/main/docbook/publican.cfg (from rev 17725, root/docs/trunk/Migration_Guide/publican.cfg)
===================================================================
--- root/docs/trunk/Migration_Guide/src/main/docbook/publican.cfg (rev 0)
+++ root/docs/trunk/Migration_Guide/src/main/docbook/publican.cfg 2010-07-06 03:03:19 UTC (rev 17727)
@@ -0,0 +1,7 @@
+# Config::Simple 4.59
+# Fri Nov 20 15:18:57 2009
+
+show_remarks: 1
+debug: 1
+xml_lang: en-US
+#brand: jboss-community-richfaces
Deleted: root/docs/trunk/pom.xml
===================================================================
--- root/docs/trunk/pom.xml 2010-07-06 02:56:52 UTC (rev 17726)
+++ root/docs/trunk/pom.xml 2010-07-06 03:03:19 UTC (rev 17727)
@@ -1,29 +0,0 @@
-<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/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.richfaces</groupId>
- <artifactId>richfaces-parent</artifactId>
- <version>7</version>
- </parent>
-
- <groupId>org.richfaces.docs</groupId>
- <artifactId>docs-aggregator</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>RichFaces Document Aggregator</name>
-
- <modules>
- <module>parent</module>
- <module>Component_Reference</module>
- <module>Developer_Guide</module>
- <module>Migration_Guide</module>
- </modules>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/root/docs/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/root/docs/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/richfaces/</url>
- </scm>
-</project>
-
14 years, 6 months
JBoss Rich Faces SVN: r17726 - in root/docs/trunk: Developer_Guide and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2010-07-05 22:56:52 -0400 (Mon, 05 Jul 2010)
New Revision: 17726
Removed:
root/docs/trunk/Component_Reference/Makefile
root/docs/trunk/Developer_Guide/Makefile
root/docs/trunk/Migration_Guide/Makefile
Log:
Removing legacy Makefiles for docs
Deleted: root/docs/trunk/Component_Reference/Makefile
===================================================================
--- root/docs/trunk/Component_Reference/Makefile 2010-07-05 22:37:01 UTC (rev 17725)
+++ root/docs/trunk/Component_Reference/Makefile 2010-07-06 02:56:52 UTC (rev 17726)
@@ -1,14 +0,0 @@
-#Makefile for Component_Reference
-
-XML_LANG = en-US
-DOCNAME = Component_Reference
-PRODUCT = RichFaces
-
-#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
-
-# Extra Parameters start here
-SHOW_REMARKS = 1
-# Extra Parameters stop here
-COMMON_CONFIG = /usr/share/publican
-include $(COMMON_CONFIG)/make/Makefile.common
-
Deleted: root/docs/trunk/Developer_Guide/Makefile
===================================================================
--- root/docs/trunk/Developer_Guide/Makefile 2010-07-05 22:37:01 UTC (rev 17725)
+++ root/docs/trunk/Developer_Guide/Makefile 2010-07-06 02:56:52 UTC (rev 17726)
@@ -1,14 +0,0 @@
-#Makefile for Developer_Guide
-
-XML_LANG = en-US
-DOCNAME = Developer_Guide
-PRODUCT = RichFaces
-
-#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
-
-# Extra Parameters start here
-SHOW_REMARKS = 1
-# Extra Parameters stop here
-COMMON_CONFIG = /usr/share/publican
-include $(COMMON_CONFIG)/make/Makefile.common
-
Deleted: root/docs/trunk/Migration_Guide/Makefile
===================================================================
--- root/docs/trunk/Migration_Guide/Makefile 2010-07-05 22:37:01 UTC (rev 17725)
+++ root/docs/trunk/Migration_Guide/Makefile 2010-07-06 02:56:52 UTC (rev 17726)
@@ -1,14 +0,0 @@
-#Makefile for Migration_Guide
-
-XML_LANG = en-US
-DOCNAME = Migration_Guide
-PRODUCT = RichFaces
-
-#OTHER_LANGS = as-IN bn-IN de-DE es-ES fr-FR gu-IN hi-IN it-IT ja-JP kn-IN ko-KR ml-IN mr-IN or-IN pa-IN pt-BR ru-RU si-LK ta-IN te-IN zh-CN zh-TW
-
-# Extra Parameters start here
-SHOW_REMARKS = 1
-# Extra Parameters stop here
-COMMON_CONFIG = /usr/share/publican
-include $(COMMON_CONFIG)/make/Makefile.common
-
14 years, 6 months
JBoss Rich Faces SVN: r17725 - in root/core/trunk: impl/src/main/java/org/richfaces/resource and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-07-05 18:37:01 -0400 (Mon, 05 Jul 2010)
New Revision: 17725
Removed:
root/core/trunk/impl/src/main/java/org/richfaces/resource/LegacyResourceCodec.java
Modified:
root/core/trunk/api/src/main/java/org/richfaces/resource/ResourceCodec.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java
root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
Log:
Added libraryName support for dynamic resources
Modified: root/core/trunk/api/src/main/java/org/richfaces/resource/ResourceCodec.java
===================================================================
--- root/core/trunk/api/src/main/java/org/richfaces/resource/ResourceCodec.java 2010-07-05 18:38:30 UTC (rev 17724)
+++ root/core/trunk/api/src/main/java/org/richfaces/resource/ResourceCodec.java 2010-07-05 22:37:01 UTC (rev 17725)
@@ -11,12 +11,15 @@
*/
public interface ResourceCodec {
- public String encodeResourceRequestPath(FacesContext context, String resourceName, Object resourceData, String resourceVersion);
+ public String encodeResourceRequestPath(FacesContext context, String libraryName, String resourceName,
+ Object resourceData, String resourceVersion);
public String encodeJSFMapping(FacesContext context, String resourcePath);
public String decodeResourceName(FacesContext context, String requestPath);
+ public String decodeLibraryName(FacesContext context, String requestPath);
+
public Object decodeResourceData(FacesContext context, String requestPath);
public String decodeResourceVersion(FacesContext context, String requestPath);
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-07-05 18:38:30 UTC (rev 17724)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/AbstractBaseResource.java 2010-07-05 22:37:01 UTC (rev 17725)
@@ -155,10 +155,12 @@
// TODO - cache resource request path in request scope
FacesContext context = FacesContext.getCurrentInstance();
ResourceCodec resourceCodec = ServiceTracker.getService(context, ResourceCodec.class);
+ String libraryName = getLibraryName();
String resourceName = getResourceName();
Object resourceData = Util.saveResourceState(context, this);
String resourceVersion = getResourceVersion();
- String resourceUri = resourceCodec.encodeResourceRequestPath(context, resourceName, resourceData, resourceVersion);
+ String resourceUri = resourceCodec.encodeResourceRequestPath(context, libraryName, resourceName,
+ resourceData, resourceVersion);
resourceUri = Util.encodeJSFURL(context, resourceUri);
Modified: root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java 2010-07-05 18:38:30 UTC (rev 17724)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/DefaultResourceCodec.java 2010-07-05 22:37:01 UTC (rev 17725)
@@ -35,10 +35,17 @@
private static final String RESOURCE_DATA_OBJECT_PARAM = "do";
+ private static final String LIBRARY_NAME_PARAM = "ln";
+
public String decodeResourceName(FacesContext context, String requestPath) {
return requestPath;
}
+ public String decodeLibraryName(FacesContext context, String requestPath) {
+ Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();
+ return paramMap.get(LIBRARY_NAME_PARAM);
+ }
+
public Object decodeResourceData(FacesContext context, String requestPath) {
Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();
@@ -59,8 +66,8 @@
return context.getExternalContext().getRequestParameterMap().get(RESOURCE_VERSION_PARAM);
}
- private String encodeResource(FacesContext context, String resourceName, String encodedResourceData,
- boolean dataIsBytesArray, String resourceVersion) {
+ private String encodeResource(FacesContext context, String libraryName, String resourceName,
+ String encodedResourceData, boolean dataIsBytesArray, String resourceVersion) {
boolean parameterAppended = false;
@@ -94,7 +101,7 @@
return sb.toString();
}
- public String encodeResourceRequestPath(FacesContext context, String resourceName, Object resourceData, String resourceVersion) {
+ public String encodeResourceRequestPath(FacesContext context, String libraryName, String resourceName, Object resourceData, String resourceVersion) {
String encodedDataString = null;
boolean isBytesArray = false;
if (resourceData != null) {
@@ -107,7 +114,7 @@
}
return ResourceHandlerImpl.RICHFACES_RESOURCE_IDENTIFIER
- + encodeResource(context, resourceName, encodedDataString, isBytesArray, resourceVersion);
+ + encodeResource(context, libraryName, resourceName, encodedDataString, isBytesArray, resourceVersion);
}
public String encodeJSFMapping(FacesContext context, String resourcePath) {
@@ -126,7 +133,8 @@
String resourceVersionString = paramMap.get(RESOURCE_VERSION_PARAM);
- return encodeResource(context, decodeResourceName(context, requestPath),
+ return encodeResource(context, decodeLibraryName(context, requestPath),
+ decodeResourceName(context, requestPath),
resourceDataString, isBytesArray, resourceVersionString);
}
}
Deleted: root/core/trunk/impl/src/main/java/org/richfaces/resource/LegacyResourceCodec.java
===================================================================
--- root/core/trunk/impl/src/main/java/org/richfaces/resource/LegacyResourceCodec.java 2010-07-05 18:38:30 UTC (rev 17724)
+++ root/core/trunk/impl/src/main/java/org/richfaces/resource/LegacyResourceCodec.java 2010-07-05 22:37:01 UTC (rev 17725)
@@ -1,55 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.resource;
-
-import javax.faces.context.FacesContext;
-
-import org.richfaces.util.Util;
-
-public final class LegacyResourceCodec implements ResourceCodec {
-
- public String decodeResourceName(FacesContext context, String requestPath) {
- return Util.legacyDecodeResourceName(requestPath);
- }
-
- public Object decodeResourceData(FacesContext context, String requestPath) {
- return Util.legacyDecodeResourceData(requestPath);
- }
-
- public String decodeResourceVersion(FacesContext context, String requestPath) {
- return Util.legacyDecodeResourceVersion(requestPath);
- }
-
- public String encodeResourceRequestPath(FacesContext context, String resourceName, Object resourceData, String resourceVersion) {
- return ResourceHandlerImpl.RICHFACES_RESOURCE_IDENTIFIER
- + Util.legacyEncodeResourceData(resourceName, resourceData, resourceVersion);
- }
-
- public String encodeJSFMapping(FacesContext context, String resourcePath) {
- return Util.encodeJSFURL(context, resourcePath);
- }
-
- public String getResourceKey(FacesContext context, String requestPath) {
- return requestPath;
- }
-}
-
Modified: root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java
===================================================================
--- root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2010-07-05 18:38:30 UTC (rev 17724)
+++ root/core/trunk/impl/src/test/java/org/richfaces/resource/AbstractBaseResourceTest.java 2010-07-05 22:37:01 UTC (rev 17725)
@@ -133,12 +133,15 @@
final ResourceCodec resourceCodec = EasyMock.createMock(ResourceCodec.class);
EasyMock.expect(resourceCodec.encodeResourceRequestPath(EasyMock.same(facesContext),
+ EasyMock.eq("custom.library"),
EasyMock.eq("org.richfaces.resource.MockStateAwareResource"),
- EasyMock.aryEq(resourceState.getBytes()), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource0/4_0_alpha/data");
+ EasyMock.aryEq(resourceState.getBytes()), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource0/4_0_alpha/data?l=custom.library");
EasyMock.expect(resourceCodec.encodeResourceRequestPath(EasyMock.same(facesContext),
+ EasyMock.eq("custom.library"),
EasyMock.eq("org.richfaces.resource.MockStateAwareResource"),
- EasyMock.eq(null), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource1/4_0_alpha");
+ EasyMock.eq(null), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource1/4_0_alpha?l=custom.library");
EasyMock.expect(resourceCodec.encodeResourceRequestPath(EasyMock.same(facesContext),
+ EasyMock.<String>isNull(),
EasyMock.eq("org.richfaces.resource.MockResource"),
EasyMock.eq(null), EasyMock.eq("4_0_alpha"))).andReturn("/rfRes/Resource2/4_0_alpha");
EasyMock.replay(resourceCodec);
@@ -153,13 +156,13 @@
ServiceTracker.setInjector(injector);
MockStateAwareResourceImpl stateAwareResourceImpl = new MockStateAwareResourceImpl();
-
+ stateAwareResourceImpl.setLibraryName("custom.library");
stateAwareResourceImpl.setVersion("4_0_alpha");
stateAwareResourceImpl.setState(resourceState);
assertEquals("org.richfaces.resource.MockStateAwareResource", stateAwareResourceImpl.getResourceName());
- assertEquals("/rfRes/Resource0/4_0_alpha/data.jsf", stateAwareResourceImpl.getRequestPath());
+ assertEquals("/rfRes/Resource0/4_0_alpha/data.jsf?l=custom.library", stateAwareResourceImpl.getRequestPath());
stateAwareResourceImpl.setTransient(true);
- assertEquals("/rfRes/Resource1/4_0_alpha.jsf", stateAwareResourceImpl.getRequestPath());
+ assertEquals("/rfRes/Resource1/4_0_alpha.jsf?l=custom.library", stateAwareResourceImpl.getRequestPath());
MockResourceImpl resourceImpl = new MockResourceImpl();
14 years, 6 months