Author: alexsmirnov
Date: 2008-04-10 18:45:54 -0400 (Thu, 10 Apr 2008)
New Revision: 7745
Modified:
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/seamEAR/pom.xml
trunk/ui/assembly/pom.xml
trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
fix
http://jira.jboss.com/jira/browse/RF-3031
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-04-10
18:11:42 UTC (rev 7744)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-04-10
22:45:54 UTC (rev 7745)
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
-
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
-<faces-config>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
<converter>
<converter-id>listShuttleconverter</converter-id>
<converter-class>org.richfaces.demo.listShuttle.Converter</converter-class>
Modified: trunk/samples/seamEAR/pom.xml
===================================================================
--- trunk/samples/seamEAR/pom.xml 2008-04-10 18:11:42 UTC (rev 7744)
+++ trunk/samples/seamEAR/pom.xml 2008-04-10 22:45:54 UTC (rev 7745)
@@ -13,7 +13,7 @@
<packaging>pom</packaging>
<name>seam EAR project</name>
<properties>
- <seam>2.0.1.GA</seam>
+ <seam>2.0.2-SNAPSHOT</seam>
</properties>
<modules>
<module>projects</module>
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2008-04-10 18:11:42 UTC (rev 7744)
+++ trunk/ui/assembly/pom.xml 2008-04-10 22:45:54 UTC (rev 7745)
@@ -94,121 +94,6 @@
</executions>
</plugin>
<plugin>
- <groupId>net.sourceforge.maven-taglib</groupId>
- <artifactId>maven-taglib-plugin</artifactId>
- <configuration>
- <taglib.src.dir>
- ${project.build.outputDirectory}/META-INF
- </taglib.src.dir>
- <tldDocDir>
- ${project.build.directory}/tlddoc
- </tldDocDir>
- </configuration>
-
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <phase>process-resources</phase>
- <goals>
- <goal>taglibdocjar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.2</version>
- <executions>
- <execution>
- <id>attach-javadoc</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <javadocVersion>1.5</javadocVersion>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>
- org.richfaces.docs.userguide
- </groupId>
- <artifactId>en</artifactId>
- <version>
- ${project.version}
- </version>
- <type>war</type>
- <classifier>pdf</classifier>
- <outputDirectory>
- ${project.build.directory}/docs/userguide/en
- </outputDirectory>
- </artifactItem>
- <artifactItem>
- <groupId>
- org.richfaces.docs.faq
- </groupId>
- <artifactId>en</artifactId>
- <version>
- ${project.version}
- </version>
- <type>war</type>
- <classifier>pdf</classifier>
- <outputDirectory>
- ${project.build.directory}/docs/faq/en
- </outputDirectory>
- </artifactItem>
- </artifactItems>
- <outputDirectory>
- ${project.build.directory}/docs
- </outputDirectory>
- <overWriteReleases>false</overWriteReleases>
- <overWriteSnapshots>
- true
- </overWriteSnapshots>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <outputDirectory>
- ${project.build.directory}/dist
- </outputDirectory>
- <descriptors>
- <descriptor>
- ${basedir}/src/main/assembly/richfaces.xml
- </descriptor>
- <descriptor>
- ${basedir}/src/main/assembly/src.xml
- </descriptor>
- </descriptors>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<outputDirectory>
@@ -339,5 +224,132 @@
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>net.sourceforge.maven-taglib</groupId>
+ <artifactId>maven-taglib-plugin</artifactId>
+ <configuration>
+ <taglib.src.dir>
+ ${project.build.outputDirectory}/META-INF
+ </taglib.src.dir>
+ <tldDocDir>
+ ${project.build.directory}/tlddoc
+ </tldDocDir>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>taglibdocjar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>attach-javadoc</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <javadocVersion>1.5</javadocVersion>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>
+ org.richfaces.docs.userguide
+ </groupId>
+ <artifactId>en</artifactId>
+ <version>
+ ${project.version}
+ </version>
+ <type>war</type>
+ <classifier>pdf</classifier>
+ <outputDirectory>
+ ${project.build.directory}/docs/userguide/en
+ </outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>
+ org.richfaces.docs.faq
+ </groupId>
+ <artifactId>en</artifactId>
+ <version>
+ ${project.version}
+ </version>
+ <type>war</type>
+ <classifier>pdf</classifier>
+ <outputDirectory>
+ ${project.build.directory}/docs/faq/en
+ </outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>
+ ${project.build.directory}/docs
+ </outputDirectory>
+ <overWriteReleases>
+ false
+ </overWriteReleases>
+ <overWriteSnapshots>
+ true
+ </overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <outputDirectory>
+ ${project.build.directory}/dist
+ </outputDirectory>
+ <descriptors>
+ <descriptor>
+ ${basedir}/src/main/assembly/richfaces.xml
+ </descriptor>
+ <descriptor>
+ ${basedir}/src/main/assembly/src.xml
+ </descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attached</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<dependencies />
</project>
\ No newline at end of file
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-04-10
18:11:42 UTC (rev 7744)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-04-10
22:45:54 UTC (rev 7745)
@@ -14,7 +14,6 @@
import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;
import javax.faces.event.FacesEvent;
-import javax.servlet.http.HttpServletRequest;
import org.ajax4jsf.Filter;
import org.ajax4jsf.context.AjaxContext;
@@ -162,12 +161,12 @@
} else {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
- HttpServletRequest request = (HttpServletRequest)
externalContext.getRequest();
- if ("progress".equals(request.getParameter("action"))
- && request.getParameterMap().containsKey(
+ Map<String, String> requestParameterMap =
externalContext.getRequestParameterMap();
+ if ("progress".equals(requestParameterMap.get("action"))
+ && requestParameterMap.containsKey(
this.getClientId(facesContext))) {
AjaxContext ajaxContext =
AjaxContextImpl.getCurrentInstance(facesContext);
- String uid = request.getParameter(Filter.UPLOAD_FILES_ID);
+ String uid = requestParameterMap.get(Filter.UPLOAD_FILES_ID);
Map<String, Object> sessionMap = externalContext.getSessionMap();
Modified:
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-04-10
18:11:42 UTC (rev 7744)
+++
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-04-10
22:45:54 UTC (rev 7745)
@@ -14,13 +14,11 @@
import javax.faces.FactoryFinder;
import javax.faces.component.UIComponent;
import javax.faces.component.UIParameter;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
-import javax.servlet.ServletRequest;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
import org.ajax4jsf.Filter;
import org.ajax4jsf.context.AjaxContext;
@@ -91,23 +89,21 @@
@Override
@SuppressWarnings("unchecked")
protected void doDecode(FacesContext context, UIComponent component) {
- ServletRequest request = (ServletRequest) context.getExternalContext()
- .getRequest();
new AjaxEvent(component).queue();
- String fileUploadIndicator = request.getParameter(Filter.FILE_UPLOAD_INDICATOR);
+ ExternalContext externalContext = context.getExternalContext();
+ Map<String, String> requestParameterMap =
externalContext.getRequestParameterMap();
+ String fileUploadIndicator = requestParameterMap.get(Filter.FILE_UPLOAD_INDICATOR);
if (fileUploadIndicator != null &&
Boolean.TRUE.toString().equals(fileUploadIndicator)) {
String clientId = component.getClientId(context);
UIFileUpload fileUpload = (UIFileUpload) component;
- HttpSession session = (HttpSession) context.getExternalContext()
- .getSession(false);
- String uid = request.getParameter(Filter.UPLOAD_FILES_ID);
- String id = request.getParameter("id");
- decreaseFileCounter(session, id);
- Map<String, MultipartRequest> map = (Map<String, MultipartRequest>)
session
- .getAttribute(Filter.REQUESTS_SESSIONS_BEAN_NAME);
+ String uid = requestParameterMap.get(Filter.UPLOAD_FILES_ID);
+ String id = requestParameterMap.get("id");
+ decreaseFileCounter(context, id);
+ Map<String, MultipartRequest> map = (Map<String, MultipartRequest>)
externalContext.getSessionMap()
+ .get(Filter.REQUESTS_SESSIONS_BEAN_NAME);
MultipartRequest multipartRequest = map.get(uid);
@@ -133,11 +129,10 @@
UIComponent component, String clientId) {
Integer max = (Integer) component.getAttributes().get(
"maxFilesQuantity");
- HttpSession session = (HttpSession) context.getExternalContext()
+ Object session = context.getExternalContext()
.getSession(false);
synchronized (session) {
- Map<String, Integer> map = (Map<String, Integer>) session
- .getAttribute(Filter.UPLOADED_COUNTER);
+ Map<String, Integer> map = (Map<String, Integer>)
context.getExternalContext().getSessionMap().get(Filter.UPLOADED_COUNTER);
if (map == null) {
map = Collections
.synchronizedMap(new HashMap<String, Integer>());
@@ -215,9 +210,7 @@
String messageBundle = context.getApplication().getMessageBundle();
Object locale = fileUpload.getLocale();
if (locale == null) {
- HttpServletRequest request = (HttpServletRequest) context
- .getExternalContext().getRequest();
- locale = request.getLocale();
+ locale = context.getExternalContext().getRequestLocale();
}
if (null != messageBundle) {
bundle1 = ResourceBundle.getBundle(messageBundle, fileUpload
@@ -315,13 +308,13 @@
/**
* Method decrease file counter
*
- * @param session
+ * @param context
* @param id
*/
@SuppressWarnings("unchecked")
- private void decreaseFileCounter(HttpSession session, String id) {
- Map<String, Integer> map = (Map<String, Integer>) session
- .getAttribute(Filter.UPLOADED_COUNTER);
+ private void decreaseFileCounter(FacesContext context, String id) {
+ Map<String, Integer> map = (Map<String, Integer>)
context.getExternalContext().getSessionMap()
+ .get(Filter.UPLOADED_COUNTER);
if (map != null) {
Integer i = map.get(id);
if (i == null) {
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-04-10
18:11:42 UTC (rev 7744)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-04-10
22:45:54 UTC (rev 7745)
@@ -18,7 +18,6 @@
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;
import javax.faces.event.FacesEvent;
-import javax.servlet.http.HttpServletRequest;
import org.ajax4jsf.component.UIPoll;
import org.ajax4jsf.context.AjaxContext;
@@ -94,9 +93,7 @@
FacesContext facesContext = FacesContext.getCurrentInstance();
AjaxContext ajaxContext = AjaxContextImpl
.getCurrentInstance(facesContext);
- HttpServletRequest request = (HttpServletRequest) facesContext
- .getExternalContext().getRequest();
- Map params = request.getParameterMap();
+ Map<String, String> params =
facesContext.getExternalContext().getRequestParameterMap();
String clientId = this.getClientId(facesContext);
if (!params.containsKey(clientId)) {
@@ -125,7 +122,7 @@
+ this.getClientId(facesContext));
}
ajaxContext.addComponentToAjaxRender(this);
- String forcedState = request.getParameter(FORCE_PERCENT_PARAM);
+ String forcedState = params.get(FORCE_PERCENT_PARAM);
if ("complete".equals(forcedState)) {
Object reRender = this.getAttributes().get("reRenderAfterComplete");
Set<String> ajaxRegions = AjaxRendererUtils.asSet(reRender);
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-04-10
18:11:42 UTC (rev 7744)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-04-10
22:45:54 UTC (rev 7745)
@@ -19,7 +19,6 @@
import javax.faces.event.ActionEvent;
import javax.faces.render.RenderKit;
import javax.faces.render.RenderKitFactory;
-import javax.servlet.http.HttpServletRequest;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
@@ -85,9 +84,7 @@
*/
public String getForcedState(FacesContext context, UIComponent component) {
String forcedState = null;
- HttpServletRequest request = (HttpServletRequest) context
- .getExternalContext().getRequest();
- Map params = request.getParameterMap();
+ Map params = context.getExternalContext().getRequestParameterMap();
if (params.containsKey(UIProgressBar.FORCE_PERCENT_PARAM)) {
String[] str = (String[]) params
.get(UIProgressBar.FORCE_PERCENT_PARAM);