Author: nbelaevski
Date: 2010-12-23 12:16:54 -0500 (Thu, 23 Dec 2010)
New Revision: 20786
Removed:
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java
trunk/core/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java
trunk/core/api/src/main/java/org/ajax4jsf/event/
trunk/core/api/src/main/java/org/ajax4jsf/model/KeepAlive.java
trunk/core/api/src/main/java/org/ajax4jsf/renderkit/
trunk/core/impl/src/main/java/org/ajax4jsf/el/
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxChildrenRenderer.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxComponentRendererBase.java
Modified:
trunk/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
trunk/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
trunk/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java
Log:
Legacy 3.x code removal
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java
===================================================================
---
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxChildrenEncoder.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,56 +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.ajax4jsf.component;
-
-import java.io.IOException;
-
-import java.util.Set;
-
-import javax.faces.context.FacesContext;
-
-/**
- * Marker interface for components, have ability to manipulate rendering in case of Ajax
responses.
- * Such as ajax-enabled iterator, menus etc
- * @author shura
- *
- */
-public interface AjaxChildrenEncoder {
-
- /**
- * Iterate over all childs of components. If component id contains in list ,
- * or, if list is empty, compotents is submitted form - render it.
- * TODO - Instead of calculate full path for every component, build current Path
- * for componet and send as parameter.
- *
- * @param context -
- * current context
- * @param component -
- * curent faces component.
- * @param ids -
- * list of Id to render.
- * @throws IOException
- */
- public void encodeAjaxChild(FacesContext context, String path, Set<String> ids,
Set<String> renderedAreas)
- throws IOException;
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxComponent.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,228 +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.ajax4jsf.component;
-
-/**
- * Base Interface for Ajax-enabled acting components.
- * TODO - extend <code>ActionSource</code>???
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/01/23 20:01:01 $
- *
- */
-public interface AjaxComponent {
- public static final String AJAX_COMPONETT_PARAMETER = AjaxComponent.class.getName() +
".parameter";
-
- /**
- * setter method for property
- * @param new value of String, <code>Collection</code> or array of
component's Id , updated in case of Ajax request by parent component. to set
- */
- public abstract void setReRender(Object targetId);
-
- /**
- * @return value or result of valueBinding of String,
<code>Collection</code> or array of component's Id , updated in case of
Ajax request by parent component.
- */
- public abstract Object getReRender();
-
- /**
- * setter method for property
- * @param new value of String, <code>Collection</code> or array of
component's Id , processed at the phases 2-5
- * in the case of Ajax request by parent component. to set
- */
- public abstract void setProcess(Object targetId);
-
- /**
- * @return value or result of valueBinding of String,
<code>Collection</code> or array of component's Id , processed at the
phases 2-5 in case of Ajax request by parent component.
- */
- public abstract Object getProcess();
-
- /**
- * setter method for property
- * @param new value of ajaxType of control component - link or input to set
- */
-
-// public abstract void setAjaxType(String ajaxType);
-
- /**
- * @return value or result of valueBinding of ajaxType of control component - link or
input
- */
-// public abstract String getAjaxType();
-
- /**
- * setter method for property
- * @param new value of Id ( in format of UIComponent.findComponent() call ) of
request status indicator to set
- */
- public abstract void setStatus(String status);
-
- /**
- * @return value or result of valueBinding of Id ( in format of
UIComponent.findComponent() call ) of request status indicator
- */
- public abstract String getStatus();
-
- /**
- * setter method for property
- * @param new value of Name of JavaScript function, called on complete Ajax request
to set
- */
- public abstract void setOncomplete(String oncomplete);
-
- /**
- * @return value or result of valueBinding of Name of JavaScript function, called on
complete Ajax request
- */
- public abstract String getOncomplete();
-
- /**
- * @return value or result of valueBinding of Name of JavaScript function, called
before updating DOM
- */
- public abstract String getOnbeforedomupdate();
-
- /**
- * setter method for property
- * @param new value of Name of JavaScript function, called before updating DOM to
set
- */
- public abstract void setOnbeforedomupdate(String beforeUpdate);
-
- public abstract String getOnbegin();
-
- public abstract void setOnbegin(String onbegin);
-
- /**
- * setter method for property
- * @param new value of custom data translated to oncomplete function by AJAX
- */
- public abstract void setData(Object data);
-
- /**
- * @return value of custom data for translate to oncomplete function by AJAX
- */
- public abstract Object getData();
-
- /**
- * setter method for property
- * @param new value of Submit ( or not ) full form on Ajax action. to set
- */
- public abstract void setLimitRender(boolean submitForm);
-
- /**
- * @return value or result of valueBinding of Submit ( or not ) full form on Ajax
action.
- */
- public abstract boolean isLimitRender();
-
- /**
- * setter method for property
- * @param new value of Submit ( or not ) full form on Ajax action. to set
- */
- public abstract void setAjaxSingle(boolean single);
-
- /**
- * @return value or result of valueBinding of Submit ( or not ) full form on Ajax
action.
- */
- public abstract boolean isAjaxSingle();
-
- /**
- * Getter for bypassUpdates bean property. Indicate that component must invoke
listeners after Process Validators phase
- * and force render response after it - since no values of components will be
updated. Can be used to perform validation of client input
- * using server-side validators.
- * @return true if component must force render after validation phase.
- */
- public abstract boolean isBypassUpdates();
-
- /**
- * Setter for bypassUpdates bean property.
- * @param bypass true if component must force render after validation phase.
- */
- public abstract void setBypassUpdates(boolean bypass);
-
- /**
- * Getter for property name of events queue on client side - for avoid to send
requests too frequnly ( on key events, for example ), implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract String getEventsQueue();
-
- /**
- * Setter for flag indicated aborting unfinished ajax requests in queue.
- * @param newvalue - new property value. If true, unfinished request in queue will be
aborted on new events.
- */
- public abstract void setIgnoreDupResponses(boolean newvalue);
-
- /**
- * Getter for property flag indicated aborting unfinished ajax requests in queue.
- * componnents-generator
- * @return property value
- */
- public abstract boolean isIgnoreDupResponses();
-
- /**
- * Setter for property name of events queue on client side - for avoid to send
requests too frequnly ( on key events, for example ), implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setEventsQueue(String newvalue);
-
- /**
- * Getter for property Delay ( in ms. ) for send ajax request on JavaScript event. In
conjunction with events queue can reduce number of requests on keyboard or mouse move
events., implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract int getRequestDelay();
-
- /**
- * Setter for property Delay ( in ms. ) for send ajax request on JavaScript event. In
conjunction with events queue can reduce number of requests on keyboard or mouse move
events., implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setRequestDelay(int newvalue);
-
- /**
- * Getter for request timeout
- * @return timeout in ms.
- */
- public abstract int getTimeout();
-
- /**
- * Setter for request timeout
- * @param timeout new value in ms.
- */
- public abstract void setTimeout(int timeout);
-
- /**
- * Setter for a 'focus' bean property - id of component( or of DOM element ),
to set focus after AJAX request.
- * @param focus
- */
- public abstract void setFocus(String focus);
-
- /**
- * @return
- */
- public abstract String getFocus();
-
- /**
- *
- */
- public abstract void setSimilarityGroupingId(String similarityGroupingId);
-
- /**
- *
- */
- public abstract String getSimilarityGroupingId();
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxContainerBase.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,87 +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.ajax4jsf.component;
-
-import javax.el.MethodExpression;
-
-/**
- * Base interface for controller component, managed AJAX Requests.
- * Component, implemented this interface, must always return
<code>true</code> for
- * <code>javax.faces.component.UIComponent#getRendersChildren()</code>
method.
- * in common, set of components, rendered of current request, maintain by it.
- * TODO - add capabilites for components, rendered in
<code>PhaseListener</code>
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.2 $ $Date: 2007/02/06 16:23:20 $
- *
- */
-public interface AjaxContainerBase {
-
- /**
- * getter for AjaxListener method. Same as for <code>ActionSource</code>
- *
- * @see javax.faces.component.ActionSource#getActionListener()
- */
- public MethodExpression getAjaxListener();
-
- /**
- * setter for AjaxListener <code>MethodBinding</code>
- * in case on AjaxRequest, component must call this method in
- * <code>PhaseId.APPLY_REQUEST_VALUES</code> or
- * <code>PhaseId.INVOKE_APPLICATION</code> phases, depend on immediate
flag.
- *
- * @see
javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
- */
- public void setAjaxListener(MethodExpression ajaxListener);
-
- /**
- * getter for flag immediate call Listener's on PhaseId.APPLY_REQUEST_VALUES
phase.
- *
- * @see javax.faces.component.ActionSource#isImmediate()
- */
- public boolean isImmediate();
-
- /**
- * getter for render method flag of subview. If true, on AJAX-request component
render it children
- * after {@link com.sun.faces.lifecycle.Phase.INVOKE_APPLICATION }
- * @return value of selfRendered flag
- */
- public boolean isSelfRendered();
-
- /**
- * setter for self-render flag.
- * @param selfRendered
- */
- public void setSelfRendered(boolean selfRendered);
-
- /**
- * setter for immediate flag.
- *
- * @see javax.faces.component.ActionSource#setImmediate(boolean)
- */
- public void setImmediate(boolean immediate);
-
- public boolean isSubmitted();
-
- public void setSubmitted(boolean submitted);
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxDataEncoder.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,42 +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.ajax4jsf.component;
-
-import java.util.Set;
-
-/**
- * Interface for iterable component, allowed for render given set of rows in ajax
response.
- * @author shura
- *
- */
-public interface AjaxDataEncoder extends AjaxChildrenEncoder {
-
- /**
- * @return Set for values of {@link org.ajax4jsf.model.ExtendedDataModel} keys,
encoded in ajax response by
- * this component.
- */
- public Set<Object> getAjaxKeys();
-
- public void setAjaxKeys(Set<Object> ajaxKeys);
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/component/AjaxSupport.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,88 +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.ajax4jsf.component;
-
-import javax.faces.component.UIComponent;
-
-/**
- * Version of {@link org.ajax4jsf.component.AjaxComponent} for append
- * Ajax functions for non-ajax components
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:34 $
- *
- */
-public interface AjaxSupport {
-
- /**
- * @return JavaScript eventString. Rebuild on every call, since
- * can be in loop ( as in dataTable ) with different parameters.
- */
- public String getEventString();
-
- /**
- * setter method for property
- * @param new value of Name of event property of parent component for build
JavaScript AJAX.Submit call to set
- */
- public abstract void setEvent(String event);
-
- /**
- * @return value or result of valueBinding of Name of event property of parent
component for build JavaScript AJAX.Submit call
- */
- public abstract String getEvent();
-
- /**
- * Name of JavaScript function, called before submit Ajax request
- * description
- *
- * @parameter
- * @return the acceptClass
- */
- public abstract String getOnsubmit();
-
- /**
- * @param newOnsubmit
- * the value to set
- */
- public abstract void setOnsubmit(String newOnsubmit);
-
- /**
- * Getter for property If true, disable default action for target event ( encode
'return false' to JavaScript ), implementation will be generated by
- * componnents-generator
- * @return property value
- */
- public abstract boolean isDisableDefault();
-
- /**
- * Setter for property If true, disable default action for target event ( encode
'return false' to JavaScript ), implementation will be generated by
- * componnents-generator
- * @param newvalue - new property value
- */
- public abstract void setDisableDefault(boolean newvalue);
-
- /**
- * Set property for JavaScrept event generated by this component.
- * @param parent
- */
- public void setParentProperties(UIComponent parent);
-}
Modified: trunk/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2010-12-23 17:08:07
UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2010-12-23 17:16:54
UTC (rev 20786)
@@ -69,10 +69,6 @@
public abstract Object getOnbeforedomupdate();
- public abstract void setViewIdHolder(ViewIdHolder viewIdHolder);
-
- public abstract ViewIdHolder getViewIdHolder();
-
public abstract boolean removeRenderedArea(String id);
public abstract void addRenderedArea(String id);
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/context/ViewIdHolder.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,37 +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.ajax4jsf.context;
-
-/**
- * Interface to skip navigation cases in ViewHandler and , instead, store new ViewId.
- * @author shura
- *
- */
-public interface ViewIdHolder {
- public boolean skipNavigation(String viewId);
-
- public String getViewId();
-
- public void setViewId(String newViewId);
-}
Deleted: trunk/core/api/src/main/java/org/ajax4jsf/model/KeepAlive.java
===================================================================
--- trunk/core/api/src/main/java/org/ajax4jsf/model/KeepAlive.java 2010-12-23 17:08:07 UTC
(rev 20785)
+++ trunk/core/api/src/main/java/org/ajax4jsf/model/KeepAlive.java 2010-12-23 17:16:54 UTC
(rev 20786)
@@ -1,49 +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.ajax4jsf.model;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Marker annotation, to keep request-scope beans between requests in the view state.
- * @author asmirnov
- *
- */
-(a)Target(ElementType.TYPE)
-(a)Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface KeepAlive {
-
- /**
- * Boolean attribute indicating whether kept beans are accessible for all requests or
AJAX-only.
- *
- * @return
- * @since 3.2.2
- */
- boolean ajaxOnly() default false;
-}
Modified:
trunk/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
===================================================================
---
trunk/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -34,7 +34,6 @@
import javax.faces.context.FacesContext;
import javax.faces.context.PartialResponseWriter;
-import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
import org.richfaces.application.ServiceTracker;
import org.richfaces.renderkit.AjaxDataSerializer;
@@ -181,14 +180,7 @@
* @return List of areas Id's , updated by this component.
*/
public static Set<String> getAjaxAreas(UIComponent uiComponent) {
- Object areas;
-
- if (uiComponent instanceof AjaxComponent) {
- areas = ((AjaxComponent) uiComponent).getReRender();
- } else {
- areas = uiComponent.getAttributes().get(AJAX_REGIONS_ATTRIBUTE);
- }
-
+ Object areas = uiComponent.getAttributes().get(AJAX_REGIONS_ATTRIBUTE);
return asIdsSet(areas);
}
@@ -200,14 +192,8 @@
* @since 3.3.0
*/
public static Set<String> getAjaxAreasToProcess(UIComponent component) {
- Object areas;
+ Object areas = component.getAttributes().get(AJAX_PROCESS_ATTRIBUTE);
- if (component instanceof AjaxComponent) {
- areas = ((AjaxComponent) component).getProcess();
- } else {
- areas = component.getAttributes().get(AJAX_PROCESS_ATTRIBUTE);
- }
-
return asIdsSet(areas);
}
@@ -277,15 +263,11 @@
public static boolean isAjaxLimitRender(UIComponent component) {
boolean result = false;
- if (component instanceof AjaxComponent) {
- result = ((AjaxComponent) component).isLimitRender();
+ Object limitRenderObject = component.getAttributes().get(LIMITRENDER_ATTR_NAME);
+ if (limitRenderObject instanceof Boolean) {
+ result = ((Boolean) limitRenderObject).booleanValue();
} else {
- Object limitRenderObject =
component.getAttributes().get(LIMITRENDER_ATTR_NAME);
- if (limitRenderObject instanceof Boolean) {
- result = ((Boolean) limitRenderObject).booleanValue();
- } else {
- result = Boolean.valueOf(String.valueOf(limitRenderObject));
- }
+ result = Boolean.valueOf(String.valueOf(limitRenderObject));
}
return result;
@@ -300,10 +282,6 @@
*/
//TODO nick - refactor - remove this method?
public static String getAjaxOncomplete(UIComponent component) {
- if (component instanceof AjaxComponent) {
- return ((AjaxComponent) component).getOncomplete();
- }
-
return (String) component.getAttributes().get(ONCOMPLETE_ATTR_NAME);
}
@@ -315,10 +293,6 @@
*/
//TODO nick - refactor - remove this method?
public static String getAjaxOnBeforeDomUpdate(UIComponent component) {
- if (component instanceof AjaxComponent) {
- return ((AjaxComponent) component).getOnbeforedomupdate();
- }
-
return (String) component.getAttributes().get(ONBEFOREDOMUPDATE_ATTR_NAME);
}
@@ -328,10 +302,6 @@
* @since 4.0
*/
public static Object getAjaxData(UIComponent component) {
- if (component instanceof AjaxComponent) {
- return ((AjaxComponent) component).getData();
- }
-
return component.getAttributes().get(DATA_ATTR_NAME);
}
Modified: trunk/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- trunk/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2010-12-23
17:08:07 UTC (rev 20785)
+++ trunk/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -76,7 +76,6 @@
Object onbeforedomupdate = null;
boolean selfRender = false;
String submittedRegionClientId = null;
- ViewIdHolder viewIdHolder = null;
Integer viewSequence = new Integer(1);
Map<String, Object> responseComponentDataMap = new HashMap<String,
Object>();
Map<String, Object> commonAjaxParameters = new HashMap<String,
Object>();
@@ -90,7 +89,6 @@
selfRender = false;
viewSequence = new Integer(1);
submittedRegionClientId = null;
- viewIdHolder = null;
responseComponentDataMap = new HashMap<String, Object>();
commonAjaxParameters = new HashMap<String, Object>();
responseData = null;
@@ -388,20 +386,6 @@
}
/**
- * @return the vievIdHolder
- */
- public ViewIdHolder getViewIdHolder() {
- return viewIdHolder;
- }
-
- /**
- * @param viewIdHolder the vievIdHolder to set
- */
- public void setViewIdHolder(ViewIdHolder viewIdHolder) {
- this.viewIdHolder = viewIdHolder;
- }
-
- /**
* @return the responseData
*/
public Object getResponseData() {
Deleted:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxChildrenRenderer.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxChildrenRenderer.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxChildrenRenderer.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,222 +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.renderkit;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.faces.component.NamingContainer;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.Messages;
-import org.ajax4jsf.component.AjaxChildrenEncoder;
-import org.ajax4jsf.component.AjaxOutput;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.renderkit.AjaxRenderer;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
-
-/**
- * @author shura
- */
-public abstract class AjaxChildrenRenderer extends AjaxComponentRendererBase implements
AjaxRenderer {
- public static final String[] SPECIAL_COMPONENTS_TYPES =
{"org.ajax4jsf.Bundle" /* UILoadBundle.COMPONENT_TYPE */,
- "org.apache.myfaces.AliasBean",
"org.apache.myfaces.AliasBeansScope"};
-
- private static final String SPECIAL_TYPES_PARAMETER =
"org.ajax4jsf.CONTROL_COMPONENTS";
- private static final Logger LOG = RichfacesLogger.RENDERKIT.getLogger();
-
- private Set<String> specialComponentTypes = null;
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.ajax4jsf.renderkit.AjaxRenderer#encodeAjaxChildren(javax.faces.context
- * .FacesContext, javax.faces.component.UIComponent, java.lang.String,
- * java.util.Set, java.util.Set)
- */
- public void encodeAjaxChildren(FacesContext context, UIComponent component, String
path, Set<String> ids,
- Set<String> renderedAreas) throws IOException {
-
- if (LOG.isDebugEnabled()) {
- LOG.debug(Messages.getMessage(Messages.ENCODE_CHILD_AJAX_INFO, path,
component.getId()));
- }
-
- String currentPath = path;
-
- if (component instanceof NamingContainer) {
- currentPath += component.getId() + NamingContainer.SEPARATOR_CHAR;
-
- // Do not check children if we have no id to render under naming
- // container.
- if (AjaxContext.getCurrentInstance(context).isLimitRender() &&
noIdUnderPath(path, ids)) {
- return;
- }
- }
-
- for (Iterator<UIComponent> it = component.getFacetsAndChildren();
it.hasNext();) {
- UIComponent element = (UIComponent) it.next();
-
- encodeAjaxComponent(context, element, currentPath, ids, renderedAreas);
- }
- }
-
- private boolean noIdUnderPath(String path, Set<String> ids) {
-
- // Do we have an any component for the rendering under that container ?
- boolean noSuchId = true;
-
- for (String id : ids) {
- if ((null != id) && id.startsWith(path)) {
- noSuchId = false;
-
- break;
- }
- }
-
- return noSuchId;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.ajax4jsf.renderkit.AjaxRenderer#encodeAjaxComponent(javax.faces.context
- * .FacesContext, javax.faces.component.UIComponent, java.lang.String,
- * java.util.Set, java.util.Set)
- */
- public void encodeAjaxComponent(FacesContext context, UIComponent component, String
currentPath, Set<String> ids,
- Set<String> renderedAreas) throws IOException
{
-
- if (component.isRendered()) { // skip not-rendered components.
- boolean found = false;
- boolean limitRender =
AjaxContext.getCurrentInstance(context).isLimitRender();
- String elementId = component.getId();
- String absoluteId = currentPath + elementId;
-
- if (!ids.isEmpty()) {
-
- // list for rendering may contains absolute id ( best ),
- // component Id or client ID
- // String clientId = element.getClientId(context);
- if (ids.contains(absoluteId) || ids.contains(elementId)) {
- if (LOG.isDebugEnabled()) {
- LOG.debug(Messages.getMessage(Messages.RENDER_AJAX_AREA_INFO,
absoluteId));
- }
-
- // renderChild(context, element);
- found = true;
- }
- }
-
- //
- if (!found && limitRender && (component instanceof
NamingContainer)
- && noIdUnderPath(absoluteId + NamingContainer.SEPARATOR_CHAR,
ids)) {
- return;
- }
-
- if (!found && !limitRender && (component instanceof
AjaxOutput)) {
- if (((AjaxOutput) component).isAjaxRendered()) {
-
- // renderChild(context, element);
- found = true;
- }
- }
-
- if (!found) {
- if (component instanceof AjaxChildrenEncoder) {
- ((AjaxChildrenEncoder) component).encodeAjaxChild(context,
currentPath, ids, renderedAreas);
- } else {
-
- // Special case - for control components, not produced
- // html code - such as message bundles loaders,
- // MyFaces aliases etc. we call encodeBegin/end methods
- // even if components not in rendered areas.
- boolean special = isSpecialElement(context, component);
-
- if (special) {
- component.encodeBegin(context);
- }
-
- encodeAjaxChildren(context, component, currentPath, ids,
renderedAreas);
-
- if (special) {
- component.encodeEnd(context);
- }
- }
- } else {
- renderedAreas.add(component.getClientId(context));
- component.encodeAll(context);
- }
- }
- }
-
- /**
- * Detect component as special control case - such as messages bundle
- * loader, alias bean components etc. Type of component get by reflection
- * from static field COMPONENT_TYPE
- *
- * @param context
- * @param component
- * @return true if encode methods must be called for this component even in
- * not-rendered parts.
- */
- private boolean isSpecialElement(FacesContext context, UIComponent component) {
- if (specialComponentTypes == null) {
- specialComponentTypes = new HashSet<String>(10);
-
- for (int i = 0; i < SPECIAL_COMPONENTS_TYPES.length; i++) {
- specialComponentTypes.add(SPECIAL_COMPONENTS_TYPES[i]);
- }
-
- String special =
context.getExternalContext().getInitParameter(SPECIAL_TYPES_PARAMETER);
-
- if (null != special) {
- String[] split = special.split(",");
-
- for (int i = 0; i < split.length; i++) {
- specialComponentTypes.add(split[i]);
- }
- }
- }
-
- boolean result;
-
- try {
- String componentType = (String)
component.getClass().getField("COMPONENT_TYPE").get(null);
-
- result = specialComponentTypes.contains(componentType);
- } catch (Exception e) {
-
- // exception occurs if component not have accesible COMPONENT_TYPE
- // constant
- // we assume that component not in special types.
- result = false;
- }
-
- return result;
- }
-}
Deleted:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxComponentRendererBase.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxComponentRendererBase.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/AjaxComponentRendererBase.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -1,33 +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.renderkit;
-
-
-/**
- * Base class for all Ajax enabled components. Perform common task -
- * output javasript for component.
- *
- * @author shura (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:49 $
- */
-public abstract class AjaxComponentRendererBase extends RendererBase {
-}
Modified:
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
===================================================================
---
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -28,7 +28,6 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.component.AjaxClientBehavior;
-import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
@@ -564,30 +563,7 @@
* @return clientId of status area, or <code>null</code>
*/
public static String getAjaxStatus(UIComponent component) {
- String statusId;
-
- if (component instanceof AjaxComponent) {
- statusId = ((AjaxComponent) component).getStatus();
- } else {
- statusId = (String) component.getAttributes().get(STATUS_ATTR_NAME);
- }
-
- return statusId;
-
-// if (null != statusId) {
-// UIComponent status = RendererUtils.getInstance().
-// findComponentFor(component, statusId);
-//
-// if (null != status) {
-// statusId = status
-// .getClientId(FacesContext.getCurrentInstance());
-// } else {
-// LOG.warn(Messages.getMessage(
-// Messages.AJAX_STATUS_COMPONENT_NOT_FOWND_WARNING,
-// component.getId()));
-// }
-// }
-// return statusId;
+ return (String) component.getAttributes().get(STATUS_ATTR_NAME);
}
public static String getQueueId(UIComponent component) {
@@ -612,10 +588,6 @@
//TODO nick - refactor - remove this method?
public static String getAjaxOnBegin(UIComponent component) {
- if (component instanceof AjaxComponent) {
- return ((AjaxComponent) component).getOnbegin();
- }
-
return (String) component.getAttributes().get(ONBEGIN_ATTR_NAME);
}
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java 2010-12-23
17:08:07 UTC (rev 20785)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/InputRendererBase.java 2010-12-23
17:16:54 UTC (rev 20786)
@@ -22,20 +22,21 @@
package org.richfaces.renderkit;
-import org.richfaces.component.util.SelectUtils;
+import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
-import java.util.Map;
+import org.richfaces.component.util.SelectUtils;
+
/**
* @author Nick Belaevski - nbelaevski(a)exadel.com
* created 23.01.2007
*/
-public class InputRendererBase extends AjaxComponentRendererBase {
+public class InputRendererBase extends RendererBase {
protected void doDecode(FacesContext context, UIComponent component) {
String clientId = component.getClientId(context);