Author: nbelaevski
Date: 2009-07-07 09:27:48 -0400 (Tue, 07 Jul 2009)
New Revision: 14809
Removed:
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/model/QueueImpl.java
Modified:
branches/jsf2.0/framework/api/pom.xml
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/application/StateHolder.java
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
Log:
Reintegrated community/3.3.x into JSF 2.0 branch
Modified: branches/jsf2.0/framework/api/pom.xml
===================================================================
--- branches/jsf2.0/framework/api/pom.xml 2009-07-07 13:08:56 UTC (rev 14808)
+++ branches/jsf2.0/framework/api/pom.xml 2009-07-07 13:27:48 UTC (rev 14809)
@@ -4,11 +4,12 @@
<groupId>org.richfaces</groupId>
<version>4.0.0-SNAPSHOT</version>
</parent>
+
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<name>Java Server Faces AJAX framework API</name>
- <version>4.0.0-SNAPSHOT</version>
+
<dependencies>
<dependency>
<groupId>commons-collections</groupId>
@@ -20,5 +21,17 @@
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>2.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.4</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified:
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/application/StateHolder.java
===================================================================
---
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/application/StateHolder.java 2009-07-07
13:08:56 UTC (rev 14808)
+++
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/application/StateHolder.java 2009-07-07
13:27:48 UTC (rev 14809)
@@ -1,9 +1,31 @@
+/**
+ * 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.ajax4jsf.application;
+import javax.faces.context.FacesContext;
+
public interface StateHolder {
- public Object[] getState(String viewId, String sequence);
+ public Object[] getState(FacesContext context, String viewId, String sequence);
- public void saveState(String viewId, String sequence, Object state[]);
+ public void saveState(FacesContext context, String viewId, String sequence, Object
state[]);
}
\ No newline at end of file
Modified:
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
---
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2009-07-07
13:08:56 UTC (rev 14808)
+++
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2009-07-07
13:27:48 UTC (rev 14809)
@@ -1,3 +1,23 @@
+/**
+ * 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.ajax4jsf.context;
import java.io.BufferedReader;
@@ -15,6 +35,8 @@
import org.ajax4jsf.resource.util.URLToStreamHelper;
public abstract class AjaxContext {
+
+ private boolean limitToList;
public static final String RESPONSE_DATA_KEY = "_ajax:data";
static final String SERVICE_RESOURCE = "META-INF/services/"
@@ -56,6 +78,12 @@
public abstract void addRegionsFromComponent(UIComponent component);
+ /**
+ * @param component
+ * @since 3.3.0
+ */
+ public abstract void addAreasToProcessFromComponent(FacesContext context, UIComponent
component);
+
public abstract Set<String> getAjaxAreasToRender();
public abstract Set<String> getAjaxAreasToProcess();
@@ -95,7 +123,16 @@
public abstract void setAjaxAreasToProcess(Set<String> ajaxAreasToProcess);
public abstract void setSubmittedRegionClientId(String submittedClientId);
+
+ public boolean isLimitToList() {
+ return limitToList;
+ }
+
+ public void setLimitToList(boolean limitToList) {
+ this.limitToList = limitToList;
+ }
+
/**
* Get instance of current AJAX Context. Instance get by
* variable {@link AjaxContext#AJAX_CONTEXT_KEY}
Deleted: branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/model/QueueImpl.java
===================================================================
---
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/model/QueueImpl.java 2009-07-07
13:08:56 UTC (rev 14808)
+++
branches/jsf2.0/framework/api/src/main/java/org/ajax4jsf/model/QueueImpl.java 2009-07-07
13:27:48 UTC (rev 14809)
@@ -1,96 +0,0 @@
-package org.ajax4jsf.model;
-
-import javax.el.ValueExpression;
-import javax.faces.context.FacesContext;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class QueueImpl implements Queue {
-
- private FacesContext context;
-
- private ValueExpression nameExpression;
-
- private ValueExpression requestDelayExpression;
-
- private ValueExpression timeoutExpression;
-
- private ValueExpression ignoreDupResponsesExpression;
-
- private ValueExpression limitToListExpression;
-
- public QueueImpl() {
- this(null);
- }
-
- public QueueImpl(FacesContext context) {
- if(context == null) {
- this.context = FacesContext.getCurrentInstance();
- } else {
- this.context = context;
- }
- }
-
- public String getName() {
- String name = null;
- if (nameExpression != null) {
- name = (String) nameExpression.getValue(context.getELContext());
- }
- return name;
- }
-
- public Integer getRequestDelay() {
- Integer requestDelay = null;
- if (requestDelayExpression != null) {
- requestDelay = (Integer) requestDelayExpression.getValue(context.getELContext());
- }
- return requestDelay;
- }
-
- public Integer getTimeout() {
- Integer timeout = null;
- if (timeoutExpression != null) {
- timeout = (Integer) timeoutExpression.getValue(context.getELContext());
- }
- return timeout;
- }
-
- public Boolean getIgnoreDupResponses() {
- Boolean ignoreDupResponses = null;
- if (ignoreDupResponsesExpression != null) {
- ignoreDupResponses = (Boolean)
ignoreDupResponsesExpression.getValue(context.getELContext());
- }
- return ignoreDupResponses;
- }
-
- public Boolean getLimitToList() {
- Boolean limitToList = null;
- if (limitToListExpression != null) {
- limitToList = (Boolean) limitToListExpression.getValue(context.getELContext());
- }
- return limitToList;
- }
-
- public void setNameExpression(ValueExpression nameExpression) {
- this.nameExpression = nameExpression;
- }
-
- public void setRequestDelayExpression(ValueExpression requestDelayExpression) {
- this.requestDelayExpression = requestDelayExpression;
- }
-
- public void setTimeoutExpression(ValueExpression timeoutExpression) {
- this.timeoutExpression = timeoutExpression;
- }
-
- public void setIgnoreDupResponsesExpression(
- ValueExpression ignoreDupResponsesExpression) {
- this.ignoreDupResponsesExpression = ignoreDupResponsesExpression;
- }
-
- public void setLimitToListExpression(ValueExpression limitToListExpression) {
- this.limitToListExpression = limitToListExpression;
- }
-}