You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ss...@apache.org on 2006/05/29 05:59:49 UTC
svn commit: r410018 [1/4] - in /myfaces/core/trunk:
api/src/main/java/javax/faces/application/
api/src/main/java/javax/faces/component/
api/src/main/java/javax/faces/context/
api/src/main/java/javax/faces/convert/ api/src/main/java/javax/faces/el/
api/...
Author: ssilvert
Date: Sun May 28 20:59:46 2006
New Revision: 410018
URL: http://svn.apache.org/viewvc?rev=410018&view=rev
Log:
MyFaces 1.2 Code
Added:
myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManagerWrapper.java
myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewExpiredException.java
myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewHandlerWrapper.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource2.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/ContextCallback.java
myfaces/core/trunk/api/src/main/java/javax/faces/context/ResponseWriterWrapper.java
myfaces/core/trunk/api/src/main/java/javax/faces/convert/EnumConverter.java
myfaces/core/trunk/api/src/main/java/javax/faces/event/MethodExpressionActionListener.java
myfaces/core/trunk/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java
myfaces/core/trunk/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/NullPropertyResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/NullVariableResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToPropertyResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToVariableResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/MethodBindingToActionListener.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/MethodBindingToListener.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/MethodBindingToMethodExpression.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/MethodBindingToValueChangeListener.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/MethodExpressionToMethodBinding.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/PropertyResolverToELResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueExpressionToValueBinding.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/VariableResolverToELResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/FacesELContext.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResolverForFaces.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResolverForJSP.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ResourceBundleResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ScopedAttributeResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationScopeImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CookieImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/FacesContextImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderValuesImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObjectResolver.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/InitParamImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamValuesImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestScopeImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionScopeImplicitObject.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java
myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManager.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/EditableValueHolder.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.xml
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIGraphic.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.xml
myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.xml
myfaces/core/trunk/api/src/main/java/javax/faces/context/ExternalContext.java
myfaces/core/trunk/api/src/main/java/javax/faces/context/FacesContext.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/EvaluationException.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodBinding.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodNotFoundException.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyNotFoundException.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyResolver.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/ReferenceSyntaxException.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/ValueBinding.java
myfaces/core/trunk/api/src/main/java/javax/faces/el/VariableResolver.java
myfaces/core/trunk/api/src/main/java/javax/faces/render/ResponseStateManager.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationFactoryImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/element/ManagedBean.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/DigesterFacesConfigUnmarshallerImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/digester/elements/ManagedBean.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/FacesContextWrapper.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/portlet/PortletExternalContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/portlet/SessionMap.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletFacesContextImpl.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/SessionMap.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/portlet/MyFacesGenericPortlet.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/StartupServletContextListener.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java Sun May 28 20:59:46 2006
@@ -15,7 +15,15 @@
*/
package javax.faces.application;
+import java.util.ResourceBundle;
+import javax.el.ELContextListener;
+import javax.el.ELException;
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+import javax.el.ValueExpression;
import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
import javax.faces.el.ReferenceSyntaxException;
import java.util.Collection;
import java.util.Iterator;
@@ -30,13 +38,62 @@
* In particular, this provides a factory for UIComponent objects.
* It also provides convenience methods for creating ValueBinding objects.
*
- * See Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
+ * See Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
*
* @author Manfred Geiler (latest modification by $Author$)
+ * @author Stan Silvert
* @version $Revision$ $Date$
*/
public abstract class Application
{
+
+ // The following concrete methods were added for JSF 1.2. They supply default
+ // implementations that throw UnsupportedOperationException.
+ // This allows old Application implementations to still work.
+ public void addELResolver(ELResolver resolver) {
+ throw new UnsupportedOperationException();
+ }
+
+ public ELResolver getELResolver() {
+ throw new UnsupportedOperationException();
+ }
+
+ public ResourceBundle getResourceBundle(FacesContext ctx, String name)
+ throws FacesException, NullPointerException {
+ throw new UnsupportedOperationException();
+ }
+
+ public UIComponent createComponent(ValueExpression componentExpression,
+ FacesContext facesContext,
+ String componentType)
+ throws FacesException, NullPointerException {
+ throw new UnsupportedOperationException();
+ }
+
+ public ExpressionFactory getExpressionFactory() {
+ throw new UnsupportedOperationException();
+ }
+
+ public void addELContextListener(ELContextListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void removeELContextListener(ELContextListener listener) {
+ throw new UnsupportedOperationException();
+ }
+
+ public ELContextListener[] getELContextListeners() {
+ throw new UnsupportedOperationException();
+ }
+
+ public Object evaluateExpressionGet(FacesContext context,
+ String expression,
+ Class expectedType)
+ throws ELException {
+ throw new UnsupportedOperationException();
+ }
+
+ // -------- abstract methods -------------------
public abstract javax.faces.event.ActionListener getActionListener();
public abstract void setActionListener(javax.faces.event.ActionListener listener);
@@ -65,18 +122,28 @@
* Get the object used by the VariableResolver to read and write named properties
* on java beans, Arrays, Lists and Maps. This object is used by the ValueBinding
* implementation, and during the process of configuring "managed bean" properties.
+ *
+ * @deprecated
*/
public abstract javax.faces.el.PropertyResolver getPropertyResolver();
+ /**
+ * @deprecated
+ */
public abstract void setPropertyResolver(javax.faces.el.PropertyResolver resolver);
/**
* Get the object used to resolve expressions of form "#{...}".
+ *
+ * @deprecated
*/
public abstract javax.faces.el.VariableResolver getVariableResolver();
+ /**
+ * @deprecated
+ */
public abstract void setVariableResolver(javax.faces.el.VariableResolver resolver);
-
+
public abstract javax.faces.application.ViewHandler getViewHandler();
public abstract void setViewHandler(javax.faces.application.ViewHandler handler);
@@ -122,13 +189,15 @@
* <p>
* Otherwise a new UIComponent instance is created using the specified componentType,
* and the new object stored via the provided value-binding before being returned.
+ *
+ * @deprecated
*/
public abstract javax.faces.component.UIComponent createComponent(
javax.faces.el.ValueBinding componentBinding,
javax.faces.context.FacesContext context,
String componentType)
throws FacesException;
-
+
public abstract Iterator getComponentTypes();
public abstract void addConverter(String converterId,
@@ -153,6 +222,8 @@
* <p>
* This is used to invoke ActionListener method, and ValueChangeListener
* methods.
+ *
+ * @deprecated
*/
public abstract javax.faces.el.MethodBinding createMethodBinding(
String ref, Class[] params)
@@ -178,6 +249,8 @@
* <p>
* This is used to invoke ActionListener method, and ValueChangeListener
* methods.
+ *
+ * @deprecated
*/
public abstract javax.faces.el.ValueBinding createValueBinding(String ref)
throws ReferenceSyntaxException;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManager.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManager.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManager.java Sun May 28 20:59:46 2006
@@ -15,6 +15,9 @@
*/
package javax.faces.application;
+import java.io.IOException;
+import javax.faces.context.FacesContext;
+
@@ -22,6 +25,7 @@
* see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
*
* @author Manfred Geiler (latest modification by $Author$)
+ * @author Stan Silvert
* @version $Revision$ $Date$
*/
public abstract class StateManager
@@ -31,27 +35,86 @@
public static final String STATE_SAVING_METHOD_SERVER = "server";
private Boolean _savingStateInClient = null;
- public abstract StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext context);
-
- protected abstract Object getTreeStructureToSave(javax.faces.context.FacesContext context);
+ public StateManager() {
+
+ }
+
+ /**
+ * @deprecated
+ */
+ public StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext context) {
+ return null;
+ }
+
+ /**
+ * @since 1.2
+ */
+ public Object saveView(FacesContext context) {
+ StateManager.SerializedView serializedView = saveSerializedView(context);
+ if (serializedView == null) return null;
+
+ Object[] structureAndState = new Object[2];
+ structureAndState[0] = serializedView.getStructure();
+ structureAndState[1] = serializedView.getState();
+
+ return structureAndState;
+ }
+
+ /**
+ * @deprecated
+ */
+ protected Object getTreeStructureToSave(javax.faces.context.FacesContext context) {
+ return null;
+ }
- protected abstract Object getComponentStateToSave(javax.faces.context.FacesContext context);
+ /**
+ * @deprecated
+ */
+ protected Object getComponentStateToSave(javax.faces.context.FacesContext context) {
+ return null;
+ }
- public abstract void writeState(javax.faces.context.FacesContext context,
+ /**
+ * @deprecated
+ */
+ public void writeState(javax.faces.context.FacesContext context,
StateManager.SerializedView state)
- throws java.io.IOException;
+ throws java.io.IOException {
+ // default impl does nothing as per JSF 1.2 javadoc
+ }
+
+ /**
+ * @since 1.2
+ */
+ public void writeState(FacesContext context, Object state) throws IOException {
+ if (!(state instanceof Object[])) return;
+ Object[] structureAndState = (Object[])state;
+ if (structureAndState.length < 2) return;
+
+ writeState(context, new StateManager.SerializedView(structureAndState[0], structureAndState[1]));
+ }
public abstract javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
String viewId,
String renderKitId);
- protected abstract javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext context,
- String viewId,
- String renderKitId);
-
- protected abstract void restoreComponentState(javax.faces.context.FacesContext context,
- javax.faces.component.UIViewRoot viewRoot,
- String renderKitId);
+ /**
+ * @deprecated
+ */
+ protected javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext context,
+ String viewId,
+ String renderKitId) {
+ return null;
+ }
+
+ /**
+ * @deprecated
+ */
+ protected void restoreComponentState(javax.faces.context.FacesContext context,
+ javax.faces.component.UIViewRoot viewRoot,
+ String renderKitId) {
+ // default impl does nothing as per JSF 1.2 javadoc
+ }
public boolean isSavingStateInClient(javax.faces.context.FacesContext context)
{
@@ -80,22 +143,34 @@
}
+ /**
+ * @deprecated
+ */
public class SerializedView
{
private Object _structure;
private Object _state;
+ /**
+ * @deprecated
+ */
public SerializedView(Object structure, Object state)
{
_structure = structure;
_state = state;
}
+ /**
+ * @deprecated
+ */
public Object getStructure()
{
return _structure;
}
+ /**
+ * @deprecated
+ */
public Object getState()
{
return _state;
Added: myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManagerWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManagerWrapper.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManagerWrapper.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/StateManagerWrapper.java Sun May 28 20:59:46 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.application;
+
+import java.io.IOException;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+/**
+ * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public abstract class StateManagerWrapper extends StateManager {
+
+ protected abstract StateManager getWrapped();
+
+ public StateManager.SerializedView saveSerializedView(FacesContext context) {
+ return getWrapped().saveSerializedView(context);
+ }
+
+ public Object saveView(FacesContext context) {
+ return getWrapped().saveView(context);
+ }
+
+ public boolean isSavingStateInClient(FacesContext context) {
+ return getWrapped().isSavingStateInClient(context);
+ }
+
+ protected Object getTreeStructureToSave(FacesContext context) {
+ return getWrapped().getTreeStructureToSave(context);
+ }
+
+ protected Object getComponentStateToSave(FacesContext context) {
+ return getWrapped().getComponentStateToSave(context);
+ }
+
+ public void writeState(FacesContext context, StateManager.SerializedView state) throws IOException {
+ getWrapped().writeState(context, state);
+ }
+
+ public void writeState(FacesContext context, Object state) throws IOException {
+ getWrapped().writeState(context, state);
+ }
+
+ public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId) {
+ return getWrapped().restoreView(context, viewId, renderKitId);
+ }
+
+ protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId) {
+ return getWrapped().restoreTreeStructure(context, viewId, renderKitId);
+ }
+
+ protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) {
+ getWrapped().restoreComponentState(context, viewRoot, renderKitId);
+ }
+
+}
Added: myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewExpiredException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewExpiredException.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewExpiredException.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewExpiredException.java Sun May 28 20:59:46 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.application;
+
+import javax.faces.FacesException;
+
+/**
+ * See Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public class ViewExpiredException extends FacesException {
+
+ private String viewId;
+
+ public ViewExpiredException() {
+ }
+
+ public ViewExpiredException(String viewId) {
+ this.viewId = viewId;
+ }
+
+ public ViewExpiredException(String message, String viewId) {
+ super(message);
+ this.viewId = viewId;
+ }
+
+ public ViewExpiredException(String message, Throwable cause, String viewId) {
+ super(message, cause);
+ this.viewId = viewId;
+ }
+
+ public ViewExpiredException(Throwable cause, String viewId) {
+ super(cause);
+ this.viewId = viewId;
+ }
+
+ public String getViewId() {
+ return viewId;
+ }
+
+ public String getMessage() {
+ if (viewId != null) {
+ return viewId + super.getMessage();
+ }
+
+ return super.getMessage();
+ }
+}
Added: myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewHandlerWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewHandlerWrapper.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewHandlerWrapper.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/ViewHandlerWrapper.java Sun May 28 20:59:46 2006
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.application;
+
+import java.io.IOException;
+import java.util.Locale;
+import javax.faces.FacesException;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.FacesContext;
+
+/**
+ * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public abstract class ViewHandlerWrapper extends ViewHandler {
+
+ public abstract ViewHandler getWrapped();
+
+ public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException {
+ getWrapped().renderView(context, viewToRender);
+ }
+
+ public void writeState(FacesContext context) throws IOException {
+ getWrapped().writeState(context);
+ }
+
+ public String calculateRenderKitId(FacesContext context) {
+ return getWrapped().calculateRenderKitId(context);
+ }
+
+ public Locale calculateLocale(FacesContext context) {
+ return getWrapped().calculateLocale(context);
+ }
+
+ public UIViewRoot restoreView(FacesContext context, String viewId) {
+ return getWrapped().restoreView(context, viewId);
+ }
+
+ public String getResourceURL(FacesContext context, String path) {
+ return getWrapped().getResourceURL(context, path);
+ }
+
+ public String getActionURL(FacesContext context, String viewId) {
+ return getWrapped().getActionURL(context, viewId);
+ }
+
+ public UIViewRoot createView(FacesContext context, String viewId) {
+ return getWrapped().createView(context, viewId);
+ }
+
+}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource.java Sun May 28 20:59:46 2006
@@ -23,10 +23,19 @@
*/
public interface ActionSource
{
+ /**
+ * @deprecated Replaced by ActionSource2.getActionExpression
+ */
public javax.faces.el.MethodBinding getAction();
+ /**
+ * @deprecated Replaced by ActionSource2.setActionExpression
+ */
public void setAction(javax.faces.el.MethodBinding action);
+ /**
+ * @deprecated Replaced by getActionListeners
+ */
public javax.faces.el.MethodBinding getActionListener();
public void setActionListener(javax.faces.el.MethodBinding actionListener);
Added: myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource2.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource2.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource2.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/ActionSource2.java Sun May 28 20:59:46 2006
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.component;
+
+import javax.el.MethodExpression;
+
+/**
+ * See Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public interface ActionSource2 extends ActionSource {
+
+ public MethodExpression getActionExpression();
+
+ public void setActionExpression(MethodExpression action);
+}
Added: myfaces/core/trunk/api/src/main/java/javax/faces/component/ContextCallback.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/ContextCallback.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/ContextCallback.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/ContextCallback.java Sun May 28 20:59:46 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.component;
+
+import javax.faces.context.FacesContext;
+
+/**
+ * See Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public interface ContextCallback {
+
+ public void invokeContextCallback(FacesContext context, UIComponent target);
+}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/EditableValueHolder.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/EditableValueHolder.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/EditableValueHolder.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/EditableValueHolder.java Sun May 28 20:59:46 2006
@@ -164,9 +164,14 @@
* associated with this component.
* <p>
* This validator is executed after all validators in the validator list.
+ *
+ * @deprecated Use getValidators() instead.
*/
public MethodBinding getValidator();
+ /**
+ * @deprecated Use addValidator(MethodExpressionValidaotr) instead.
+ */
public void setValidator(javax.faces.el.MethodBinding validatorBinding);
/**
@@ -176,9 +181,14 @@
* associated with this component.
* <p>
* This listeners is executed after all listeners in the list.
+ *
+ * @deprecated Use getValueChangeLIsteners() instead.
*/
public MethodBinding getValueChangeListener();
+ /**
+ * @deprecated use addValueChangeListener(MethodExpressionValueChangeListener) instead.
+ */
public void setValueChangeListener(MethodBinding valueChangeMethod);
public void addValidator(Validator validator);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.java Sun May 28 20:59:46 2006
@@ -15,11 +15,15 @@
*/
package javax.faces.component;
+import javax.el.MethodExpression;
import javax.faces.context.FacesContext;
import javax.faces.el.EvaluationException;
import javax.faces.el.MethodBinding;
import javax.faces.el.ValueBinding;
import javax.faces.event.*;
+import org.apache.myfaces.el.convert.MethodBindingToActionListener;
+import org.apache.myfaces.el.convert.MethodBindingToMethodExpression;
+import org.apache.myfaces.el.convert.MethodExpressionToMethodBinding;
/**
* see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
@@ -29,29 +33,54 @@
*/
public class UICommand
extends UIComponentBase
- implements ActionSource
+ implements ActionSource2
{
- private MethodBinding _action = null;
- private MethodBinding _actionListener = null;
+ private MethodBindingToActionListener _actionListener = null;
+ private MethodExpression _action = null;
+ /**
+ * @deprecated Use setActionExpression instead.
+ */
public void setAction(MethodBinding action)
{
- _action = action;
+ setActionExpression(new MethodBindingToMethodExpression(action));
}
+ /**
+ * @deprecated Use getActionExpression() instead.
+ */
public MethodBinding getAction()
{
- return _action;
+ MethodExpression actionExpression = getActionExpression();
+ if (actionExpression instanceof MethodBindingToMethodExpression) {
+ return ((MethodBindingToMethodExpression)actionExpression).getMethodBinding();
+ }
+
+ return new MethodExpressionToMethodBinding(actionExpression);
}
+ /**
+ * @deprecated Use addActionListener() instead.
+ */
public void setActionListener(MethodBinding actionListener)
{
- _actionListener = actionListener;
+ // remove previous listener
+ if (_actionListener != null) {
+ removeActionListener(_actionListener);
+ }
+
+ _actionListener = new MethodBindingToActionListener(actionListener);
+ addActionListener(_actionListener);
}
+ /**
+ * @deprecated Use getActionListeners() instead.
+ */
public MethodBinding getActionListener()
{
- return _actionListener;
+ if (_actionListener == null) return null;
+
+ return _actionListener.getMethodBinding();
}
public void addActionListener(ActionListener listener)
@@ -68,6 +97,16 @@
{
removeFacesListener(listener);
}
+
+// ----- ActionSource2 methods ----
+ public void setActionExpression(MethodExpression action) {
+ _action = action;
+ }
+
+ public MethodExpression getActionExpression() {
+ return _action;
+ }
+// ---------------------------------
public void broadcast(FacesEvent event)
throws AbortProcessingException
@@ -78,25 +117,9 @@
{
FacesContext context = getFacesContext();
- MethodBinding actionListenerBinding = getActionListener();
- if (actionListenerBinding != null)
+ for (ActionListener listener : getActionListeners())
{
- try
- {
- actionListenerBinding.invoke(context, new Object[] {event});
- }
- catch (EvaluationException e)
- {
- Throwable cause = e.getCause();
- if (cause != null && cause instanceof AbortProcessingException)
- {
- throw (AbortProcessingException)cause;
- }
- else
- {
- throw e;
- }
- }
+ listener.processAction((ActionEvent)event);
}
ActionListener defaultActionListener
@@ -171,7 +194,6 @@
}
-
public Object saveState(FacesContext context)
{
Object values[] = new Object[5];
@@ -187,10 +209,11 @@
{
Object values[] = (Object[])state;
super.restoreState(context, values[0]);
- _action = (MethodBinding)restoreAttachedState(context, values[1]);
- _actionListener = (MethodBinding)restoreAttachedState(context, values[2]);
+ _action = (MethodExpression)restoreAttachedState(context, values[1]); // changed this line - TODO: fix src generator
+ _actionListener = (MethodBindingToActionListener)restoreAttachedState(context, values[2]); // changed this line - TODO: fix src generator
_immediate = (Boolean)values[3];
_value = (Object)values[4];
}
//------------------ GENERATED CODE END ---------------------------------------
+
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.xml?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.xml (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UICommand.xml Sun May 28 20:59:46 2006
@@ -12,11 +12,11 @@
<renderer-type>javax.faces.Button</renderer-type>
<field generateProperty="false">
<name>action</name>
- <type>javax.faces.el.MethodBinding</type>
+ <type>javax.el.MethodExpression</type>
</field>
<field generateProperty="false">
<name>actionListener</name>
- <type>javax.faces.el.MethodBinding</type>
+ <type>org.apache.myfaces.el.convert.MethodBindingToActionListener</type>
</field>
<field>
<name>immediate</name>
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponent.java Sun May 28 20:59:46 2006
@@ -15,6 +15,7 @@
*/
package javax.faces.component;
+import javax.el.ValueExpression;
import javax.faces.event.AbortProcessingException;
/**
@@ -32,11 +33,21 @@
public abstract java.util.Map getAttributes();
+ /**
+ * @deprecated Replaced by getValueExpression
+ */
public abstract javax.faces.el.ValueBinding getValueBinding(java.lang.String name);
+ public abstract ValueExpression getValueExpression(String name);
+
+ /**
+ * @deprecated Replaced by setValueExpression
+ */
public abstract void setValueBinding(java.lang.String name,
javax.faces.el.ValueBinding binding);
+ public abstract void setValueExpression(String name, ValueExpression binding);
+
public abstract java.lang.String getClientId(javax.faces.context.FacesContext context);
public abstract java.lang.String getFamily();
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIComponentBase.java Sun May 28 20:59:46 2006
@@ -23,6 +23,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
import javax.faces.FactoryFinder;
import javax.faces.context.FacesContext;
@@ -36,6 +38,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.el.convert.ValueBindingToValueExpression;
+import org.apache.myfaces.el.convert.ValueExpressionToValueBinding;
/**
@@ -59,7 +63,7 @@
private static Log log = LogFactory.getLog(UIComponentBase.class);
private _ComponentAttributesMap _attributesMap = null;
- private Map _valueBindingMap = null;
+ private Map<String, ValueExpression> _valueExpressionMap = null;
private List _childrenList = null;
private Map _facetMap = null;
private List _facesListeners = null;
@@ -135,33 +139,69 @@
* though there is commonly a property (setter/getter methods)
* of the same name defined on the component itself which
* evaluates the value-binding when called.
+ *
+ * @deprecated Replaced by getValueExpression
*/
public ValueBinding getValueBinding(String name)
{
- if (name == null) throw new NullPointerException("name");
- if (_valueBindingMap == null)
- {
- return null;
- }
- else
- {
- return (ValueBinding)_valueBindingMap.get(name);
- }
+ if (name == null) throw new NullPointerException("name can not be null");
+
+ if (_valueExpressionMap == null) {
+ _valueExpressionMap = new HashMap<String, ValueExpression>();
+ }
+
+ ValueExpression expression = _valueExpressionMap.get(name);
+ if (expression == null) return null;
+
+ if (expression instanceof ValueBindingToValueExpression) {
+ ValueBindingToValueExpression bindingToExpression = (ValueBindingToValueExpression)expression;
+ return bindingToExpression.getValueBinding();
+ }
+
+ return new ValueExpressionToValueBinding(expression);
+ }
+
+ public ValueExpression getValueExpression(String name) {
+ if (name == null) throw new NullPointerException("name can not be null");
+
+ if (_valueExpressionMap == null) return null;
+
+ return _valueExpressionMap.get(name);
}
/**
* Put the provided value-binding into a map of value-bindings
* associated with this component.
+ *
+ * @deprecated Replaced by setValueExpression
*/
public void setValueBinding(String name,
ValueBinding binding)
{
+ setValueExpression(name, new ValueBindingToValueExpression(binding));
+ }
+
+ public void setValueExpression(String name, ValueExpression binding) {
if (name == null) throw new NullPointerException("name");
- if (_valueBindingMap == null)
- {
- _valueBindingMap = new HashMap();
+ if (name.equals("id")) throw new IllegalArgumentException("Can't set a ValueExpression for the 'id' property.");
+ if (name.equals("parent")) throw new IllegalArgumentException("Can't set a ValueExpression for the 'parent' property.");
+
+ if (binding.isLiteralText()) {
+ try {
+ Object value = binding.getValue(getFacesContext().getELContext());
+ this.getAttributes().put(name, value);
+ return;
+ } catch (Exception e) {
+ throw new FacesException(e);
+ }
+
+ }
+
+ if (_valueExpressionMap == null) {
+ _valueExpressionMap = new HashMap<String, ValueExpression>();
}
- _valueBindingMap.put(name, binding);
+
+ _valueExpressionMap.put(name, binding);
}
/**
@@ -231,6 +271,7 @@
if (idWasNull)
{
+ System.out.println("Component: " + getPathToComponent(this));
context.getExternalContext().log("WARNING: Component " + _clientId + " just got an automatic id, because there was no id assigned yet. " +
"If this component was created dynamically (i.e. not by a JSP tag) you should assign it an " +
"explicit static id or assign it the id you get from the createUniqueId from the current UIViewRoot " +
@@ -927,7 +968,7 @@
values[3] = _clientId;
values[4] = saveAttributesMap();
values[5] = saveAttachedState(context, _facesListeners);
- values[6] = saveValueBindingMap(context);
+ values[6] = saveValueExpressionMap(context);
return values;
}
@@ -948,7 +989,7 @@
_clientId = (String)values[3];
restoreAttributesMap(values[4]);
_facesListeners = (List)restoreAttachedState(context, values[5]);
- restoreValueBindingMap(context, values[6]);
+ restoreValueExpressionMap(context, values[6]);
}
@@ -976,13 +1017,13 @@
}
}
- private Object saveValueBindingMap(FacesContext context)
+ private Object saveValueExpressionMap(FacesContext context)
{
- if (_valueBindingMap != null)
+ if (_valueExpressionMap != null)
{
- int initCapacity = (_valueBindingMap.size() * 4 + 3) / 3;
+ int initCapacity = (_valueExpressionMap.size() * 4 + 3) / 3;
HashMap stateMap = new HashMap(initCapacity);
- for (Iterator it = _valueBindingMap.entrySet().iterator(); it.hasNext(); )
+ for (Iterator it = _valueExpressionMap.entrySet().iterator(); it.hasNext(); )
{
Map.Entry entry = (Map.Entry)it.next();
stateMap.put(entry.getKey(),
@@ -996,23 +1037,23 @@
}
}
- private void restoreValueBindingMap(FacesContext context, Object stateObj)
+ private void restoreValueExpressionMap(FacesContext context, Object stateObj)
{
if (stateObj != null)
{
Map stateMap = (Map)stateObj;
int initCapacity = (stateMap.size() * 4 + 3) / 3;
- _valueBindingMap = new HashMap(initCapacity);
+ _valueExpressionMap = new HashMap<String, ValueExpression>(initCapacity);
for (Iterator it = stateMap.entrySet().iterator(); it.hasNext(); )
{
Map.Entry entry = (Map.Entry)it.next();
- _valueBindingMap.put(entry.getKey(),
- restoreAttachedState(context, entry.getValue()));
+ _valueExpressionMap.put((String)entry.getKey(),
+ (ValueExpression)restoreAttachedState(context, entry.getValue()));
}
}
else
{
- _valueBindingMap = null;
+ _valueExpressionMap = null;
}
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIData.java Sun May 28 20:59:46 2006
@@ -23,6 +23,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import javax.el.ValueExpression;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
@@ -441,6 +442,9 @@
return _var;
}
+ /**
+ * @deprecated Use setValueExpression instead
+ */
public void setValueBinding(String name, ValueBinding binding)
{
if (name == null)
@@ -456,6 +460,22 @@
throw new IllegalArgumentException("name " + name);
}
super.setValueBinding(name, binding);
+ }
+
+ public void setValueExpression(String name, ValueExpression binding) {
+ if (name == null)
+ {
+ throw new NullPointerException("name");
+ }
+ else if (name.equals("value"))
+ {
+ _dataModelMap.clear();
+ }
+ else if (name.equals("var") || name.equals("rowIndex"))
+ {
+ throw new IllegalArgumentException("name " + name);
+ }
+ super.setValueExpression(name, binding);
}
public String getClientId(FacesContext context)
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIGraphic.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIGraphic.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIGraphic.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIGraphic.java Sun May 28 20:59:46 2006
@@ -15,11 +15,12 @@
*/
package javax.faces.component;
+import javax.el.ValueExpression;
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
/**
- * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
+ * see Javadoc of <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
*
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
@@ -40,6 +41,9 @@
setValue(url);
}
+ /**
+ * @deprecated Use getValueExpression instead
+ */
public ValueBinding getValueBinding(String name)
{
if (URL_PROPERTY.equals(name))
@@ -52,6 +56,9 @@
}
}
+ /**
+ * @deprecated Use setValueExpression instead
+ */
public void setValueBinding(String name,
ValueBinding binding)
{
@@ -62,6 +69,31 @@
else
{
super.setValueBinding(name, binding);
+ }
+ }
+
+ public ValueExpression getValueExpression(String name)
+ {
+ if (URL_PROPERTY.equals(name))
+ {
+ return super.getValueExpression(VALUE_PROPERTY);
+ }
+ else
+ {
+ return super.getValueExpression(name);
+ }
+ }
+
+ public void setValueExpression(String name,
+ ValueExpression binding)
+ {
+ if (URL_PROPERTY.equals(name))
+ {
+ super.setValueExpression(VALUE_PROPERTY, binding);
+ }
+ else
+ {
+ super.setValueExpression(name, binding);
}
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.java Sun May 28 20:59:46 2006
@@ -30,6 +30,7 @@
import javax.faces.validator.Validator;
import java.util.ArrayList;
import java.util.List;
+import org.apache.myfaces.el.convert.MethodBindingToValueChangeListener;
/**
* see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
@@ -52,7 +53,7 @@
private boolean _localValueSet = false;
private boolean _valid = true;
private MethodBinding _validator = null;
- private MethodBinding _valueChangeListener = null;
+ private MethodBindingToValueChangeListener _valueChangeListener = null;
private List _validatorList = null;
// use javadoc inherited from EditableValueHolder
@@ -106,32 +107,54 @@
}
// use javadoc inherited from EditableValueHolder
+ /**
+ * @deprecated
+ */
public MethodBinding getValidator()
{
return _validator;
}
// use javadoc inherited from EditableValueHolder
+ /**
+ * @deprecated
+ */
public void setValidator(MethodBinding validator)
{
_validator = validator;
}
// use javadoc inherited from EditableValueHolder
+ /**
+ * @deprecated
+ */
public MethodBinding getValueChangeListener()
{
- return _valueChangeListener;
+ if (_valueChangeListener != null) {
+ return _valueChangeListener.getMethodBinding();
+ }
+
+ return null;
}
// use javadoc inherited from EditableValueHolder
+ /**
+ * @deprecated
+ */
public void setValueChangeListener(MethodBinding valueChangeListener)
{
- _valueChangeListener = valueChangeListener;
+ if (_valueChangeListener != null) {
+ removeValueChangeListener(_valueChangeListener);
+ }
+
+ _valueChangeListener = new MethodBindingToValueChangeListener(valueChangeListener);
+
+ addValueChangeListener(_valueChangeListener);
}
/**
* Set the "submitted value" of this component from the relevant data
- * in the current servlet request object.
+ * in the current servet request object.
* <p>
* If this component is not rendered, then do nothing; no output would
* have been sent to the client so no input is expected.
@@ -282,8 +305,6 @@
{
_MessageUtils.addErrorMessage(context, this, ee);
}
-
- setValid(false);
}
catch (RuntimeException e)
{
@@ -493,7 +514,7 @@
_submittedValue = (Object)values[4];
_valid = ((Boolean)values[5]).booleanValue();
_validator = (MethodBinding)restoreAttachedState(context, values[6]);
- _valueChangeListener = (MethodBinding)restoreAttachedState(context, values[7]);
+ _valueChangeListener = (MethodBindingToValueChangeListener)restoreAttachedState(context, values[7]); // changed line - TODO: fix w/ src gen
_validatorList = (List)restoreAttachedState(context, values[8]);
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.xml?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.xml (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIInput.xml Sun May 28 20:59:46 2006
@@ -38,6 +38,6 @@
</field>
<field generateProperty="false" >
<name>valueChangeListener</name>
- <type>javax.faces.el.MethodBinding</type>
+ <type>org.apache.myfaces.el.convert.MethodBindingToValueChangeListener</type>
</field>
</component>
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectBoolean.java Sun May 28 20:59:46 2006
@@ -15,6 +15,7 @@
*/
package javax.faces.component;
+import javax.el.ValueExpression;
import javax.faces.el.ValueBinding;
@@ -42,6 +43,9 @@
return value != null ? value.booleanValue() : false;
}
+ /**
+ * @deprecated Use getValueExpression instead
+ */
public ValueBinding getValueBinding(String name)
{
if (name == null) throw new NullPointerException("name");
@@ -55,6 +59,9 @@
}
}
+ /**
+ * @deprecated Use setValueExpression instead
+ */
public void setValueBinding(String name,
ValueBinding binding)
{
@@ -66,6 +73,33 @@
else
{
super.setValueBinding(name, binding);
+ }
+ }
+
+ public ValueExpression getValueExpression(String name)
+ {
+ if (name == null) throw new NullPointerException("name");
+ if (name.equals("selected"))
+ {
+ return super.getValueExpression("value");
+ }
+ else
+ {
+ return super.getValueExpression(name);
+ }
+ }
+
+ public void setValueExpression(String name,
+ ValueExpression binding)
+ {
+ if (name == null) throw new NullPointerException("name");
+ if (name.equals("selected"))
+ {
+ super.setValueExpression("value", binding);
+ }
+ else
+ {
+ super.setValueExpression(name, binding);
}
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UISelectMany.java Sun May 28 20:59:46 2006
@@ -22,6 +22,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import javax.el.ValueExpression;
import javax.faces.application.FacesMessage;
import javax.faces.component._SelectItemsUtil._ValueConverter;
@@ -50,6 +51,9 @@
setValue(selectedValues);
}
+ /**
+ * @deprecated Use getValueExpression instead
+ */
public ValueBinding getValueBinding(String name)
{
if (name == null)
@@ -64,6 +68,9 @@
}
}
+ /**
+ * @deprecated Use setValueExpression instead
+ */
public void setValueBinding(String name, ValueBinding binding)
{
if (name == null)
@@ -75,6 +82,34 @@
else
{
super.setValueBinding(name, binding);
+ }
+ }
+
+ public ValueExpression getValueExpression(String name)
+ {
+ if (name == null)
+ throw new NullPointerException("name");
+ if (name.equals("selectedValues"))
+ {
+ return super.getValueExpression("value");
+ }
+ else
+ {
+ return super.getValueExpression(name);
+ }
+ }
+
+ public void setValueExpression(String name, ValueExpression binding)
+ {
+ if (name == null)
+ throw new NullPointerException("name");
+ if (name.equals("selectedValues"))
+ {
+ super.setValueExpression("value", binding);
+ }
+ else
+ {
+ super.setValueExpression(name, binding);
}
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java Sun May 28 20:59:46 2006
@@ -20,6 +20,7 @@
import java.util.List;
import java.util.ListIterator;
import java.util.Locale;
+import javax.el.MethodExpression;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
@@ -51,6 +52,8 @@
private String _viewId = null;
private Locale _locale = null;
private List _events = null;
+ private MethodExpression _afterPhaseListener = null;
+ private MethodExpression _beforePhaseListener = null;
public String getViewId()
{
@@ -63,6 +66,25 @@
// if (viewId == null) throw new NullPointerException("viewId");
_viewId = viewId;
}
+
+ public void setAfterPhaseListener(MethodExpression methodExpression)
+ {
+ _afterPhaseListener = methodExpression;
+ }
+
+ public MethodExpression getAfterPhaseListener() {
+ return _afterPhaseListener;
+ }
+
+ public void setBeforePhaseListener(MethodExpression methodExpression)
+ {
+ _beforePhaseListener = methodExpression;
+ }
+
+ public MethodExpression getBeforePhaseListener()
+ {
+ return _beforePhaseListener;
+ }
public void queueEvent(FacesEvent event)
{
@@ -296,12 +318,14 @@
public Object saveState(FacesContext context)
{
- Object values[] = new Object[5];
+ Object values[] = new Object[7]; // changed line - TODO: run src gen
values[0] = super.saveState(context);
values[1] = _locale;
values[2] = _renderKitId;
values[3] = _viewId;
values[4] = new Long(_uniqueIdCounter);
+ values[5] = _beforePhaseListener;
+ values[6] = _afterPhaseListener;
return values;
}
@@ -313,6 +337,8 @@
_renderKitId = (String)values[2];
_viewId = (String)values[3];
_uniqueIdCounter = values[4]==null?0:((Long)values[4]).longValue();
+ _beforePhaseListener = (MethodExpression)values[5]; // added line - TODO: run src gen
+ _afterPhaseListener = (MethodExpression)values[6]; // added line - TODO: run src gen
}
//------------------ GENERATED CODE END ---------------------------------------
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.xml?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.xml (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.xml Sun May 28 20:59:46 2006
@@ -21,4 +21,12 @@
<name>viewId</name>
<type>java.lang.String</type>
</field>
+ <field generateProperty="false" saveState="true" >
+ <name>beforePhaseListener</name>
+ <type>javax.el.MethodExpression</type>
+ </field>
+ <field generateProperty="false" saveState="true" >
+ <name>afterPhaseListener</name>
+ <type>javax.el.MethodExpression</type>
+ </field>
</component>
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/context/ExternalContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/context/ExternalContext.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/context/ExternalContext.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/context/ExternalContext.java Sun May 28 20:59:46 2006
@@ -55,6 +55,8 @@
public abstract String getRemoteUser();
public abstract Object getRequest();
+
+ public abstract String getRequestContentType();
public abstract String getRequestContextPath();
@@ -88,6 +90,8 @@
public abstract Set getResourcePaths(String path);
public abstract Object getResponse();
+
+ public abstract String getResponseContentType();
public abstract Object getSession(boolean create);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/context/FacesContext.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/context/FacesContext.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/context/FacesContext.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/context/FacesContext.java Sun May 28 20:59:46 2006
@@ -15,6 +15,7 @@
*/
package javax.faces.context;
+import javax.el.ELContext;
import javax.faces.application.FacesMessage;
import java.util.Iterator;
@@ -26,6 +27,13 @@
*/
public abstract class FacesContext
{
+ // The following concrete method was added for JSF 1.2. It supplies a default
+ // implementation that throws UnsupportedOperationException.
+ // This allows old FacesContext implementations to still work.
+ public ELContext getELContext() {
+ throw new UnsupportedOperationException();
+ }
+
public abstract javax.faces.application.Application getApplication();
public abstract Iterator getClientIdsWithMessages();
Added: myfaces/core/trunk/api/src/main/java/javax/faces/context/ResponseWriterWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/context/ResponseWriterWrapper.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/context/ResponseWriterWrapper.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/context/ResponseWriterWrapper.java Sun May 28 20:59:46 2006
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.context;
+
+import java.io.IOException;
+import java.io.Writer;
+import javax.faces.component.UIComponent;
+
+/**
+ * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public abstract class ResponseWriterWrapper extends ResponseWriter {
+
+ protected abstract ResponseWriter getWrapped();
+
+ public void endElement(String name) throws IOException {
+ getWrapped().endElement(name);
+ }
+
+ public void writeComment(Object comment) throws IOException {
+ getWrapped().writeComment(comment);
+ }
+
+ public void startElement(String name, UIComponent component) throws IOException {
+ getWrapped().startElement(name, component);
+ }
+
+ public void writeText(Object text, String property) throws IOException {
+ getWrapped().writeText(text, property);
+ }
+
+ public void writeText(char[] text, int off, int len) throws IOException {
+ getWrapped().writeText(text, off, len);
+ }
+
+ public void write(char[] cbuf, int off, int len) throws IOException {
+ getWrapped().write(cbuf, off, len);
+ }
+
+ public ResponseWriter cloneWithWriter(Writer writer) {
+ return getWrapped().cloneWithWriter(writer);
+ }
+
+ public void writeURIAttribute(String name, Object value, String property) throws IOException {
+ getWrapped().writeURIAttribute(name, value,property);
+ }
+
+ public void close() throws IOException {
+ getWrapped().close();
+ }
+
+ public void endDocument() throws IOException {
+ getWrapped().endDocument();
+ }
+
+ public void flush() throws IOException {
+ getWrapped().flush();
+ }
+
+ public String getCharacterEncoding() {
+ return getWrapped().getCharacterEncoding();
+ }
+
+ public String getContentType() {
+ return getWrapped().getContentType();
+ }
+
+ public void startDocument() throws IOException {
+ getWrapped().startDocument();
+ }
+
+ public void writeAttribute(String name, Object value, String property) throws IOException {
+ getWrapped().writeAttribute(name, value, property);
+ }
+
+}
Added: myfaces/core/trunk/api/src/main/java/javax/faces/convert/EnumConverter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/convert/EnumConverter.java?rev=410018&view=auto
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/convert/EnumConverter.java (added)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/convert/EnumConverter.java Sun May 28 20:59:46 2006
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.faces.convert;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
+/**
+ * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
+ *
+ * @author Stan Silvert
+ */
+public class EnumConverter implements Converter, StateHolder {
+
+ public static final String CONVERTER_ID = "javax.faces.Enum";
+ public static final String ENUM_ID = "javax.faces.converter.EnumConverter.ENUM";
+ public static final String ENUM_NO_CLASS_ID = "javax.faces.converter.EnumConverter.ENUM_NO_CLASS";
+
+ private Class targetClass;
+
+ private boolean isTransient = false;
+
+ /** Creates a new instance of EnumConverter */
+ public EnumConverter() {
+ }
+
+ public EnumConverter(Class targetClass) {
+ if (!targetClass.isEnum()) throw new IllegalArgumentException("targetClass for EnumConverter must be an Enum");
+ this.targetClass = targetClass;
+ }
+
+ public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value) throws ConverterException {
+ if (facesContext == null) throw new NullPointerException("facesContext can not be null");
+ if (uiComponent == null) throw new NullPointerException("uiComponent can not be null");
+ if (value == null) return "";
+
+
+ for (Object enumConstant : targetClass.getEnumConstants()) {
+ if (enumConstant == value) return enumConstant.toString();
+ }
+
+ return value.toString();
+ }
+
+ public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value) throws ConverterException {
+ if (facesContext == null) throw new NullPointerException("facesContext");
+ if (uiComponent == null) throw new NullPointerException("uiComponent");
+ if (value == null) return null;
+ if (targetClass == null) {
+ // TODO: instead of client id, use the label for input components as specified in issue #6 and javadocs
+ Object[] params = new Object[]{value, uiComponent.getClientId(facesContext)};
+ throw new ConverterException(_MessageUtils.getErrorMessage(facesContext,
+ ENUM_NO_CLASS_ID,
+ params));
+ }
+
+ value = value.trim();
+ if (value.length() == 0) return null;
+
+ // we know targetClass and value can't be null, so we can use Enum.valueOf
+ // instead of the hokey looping called for in the javadoc
+ try {
+ return Enum.valueOf(targetClass, value);
+ } catch (IllegalArgumentException e) {
+ // TODO: instead of getClientId(), use the label for input components as specified in issue #6 and javadocs
+ Object[] params = new Object[]{value,
+ firstConstantOfEnum(),
+ uiComponent.getClientId(facesContext)};
+
+ throw new ConverterException(_MessageUtils.getErrorMessage(facesContext,
+ ENUM_ID,
+ params));
+ }
+ }
+
+ // find the first constant value of the targetClass and return as a String
+ private String firstConstantOfEnum() {
+ Object[] enumConstants= targetClass.getEnumConstants();
+
+ if (enumConstants.length != 0 ) return enumConstants[0].toString();
+
+ return ""; // if empty Enum
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ targetClass = (Class)state;
+ }
+
+ public Object saveState(FacesContext context) {
+ return targetClass;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/EvaluationException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/EvaluationException.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/EvaluationException.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/EvaluationException.java Sun May 28 20:59:46 2006
@@ -22,6 +22,7 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public class EvaluationException extends FacesException
{
@@ -29,21 +30,33 @@
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public EvaluationException()
{
super();
}
+ /**
+ * @deprecated
+ */
public EvaluationException(String message)
{
super(message);
}
+ /**
+ * @deprecated
+ */
public EvaluationException(String message, Throwable cause)
{
super(message, cause);
}
+ /**
+ * @deprecated
+ */
public EvaluationException(Throwable cause)
{
super(cause);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodBinding.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodBinding.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodBinding.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodBinding.java Sun May 28 20:59:46 2006
@@ -22,6 +22,7 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public abstract class MethodBinding
{
@@ -29,6 +30,9 @@
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public MethodBinding()
{
}
@@ -37,14 +41,21 @@
/**
* returns the <code>String</code> of your expression like <code>#{bean.foo}</code>.
+ * @deprecated
*/
public String getExpressionString()
{
return null;
}
+ /**
+ * @deprecated
+ */
public abstract Class getType(FacesContext facescontext) throws MethodNotFoundException;
+ /**
+ * @deprecated
+ */
public abstract Object invoke(FacesContext facescontext, Object aobj[])
throws EvaluationException, MethodNotFoundException;
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodNotFoundException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodNotFoundException.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodNotFoundException.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/MethodNotFoundException.java Sun May 28 20:59:46 2006
@@ -20,6 +20,7 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public class MethodNotFoundException extends EvaluationException
{
@@ -27,21 +28,33 @@
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public MethodNotFoundException()
{
super();
}
+ /**
+ * @deprecated
+ */
public MethodNotFoundException(String message)
{
super(message);
}
+ /**
+ * @deprecated
+ */
public MethodNotFoundException(String message, Throwable cause)
{
super(message, cause);
}
+ /**
+ * @deprecated
+ */
public MethodNotFoundException(Throwable cause)
{
super(cause);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyNotFoundException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyNotFoundException.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyNotFoundException.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyNotFoundException.java Sun May 28 20:59:46 2006
@@ -20,6 +20,7 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public class PropertyNotFoundException extends EvaluationException
{
@@ -28,21 +29,33 @@
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public PropertyNotFoundException()
{
super();
}
+ /**
+ * @deprecated
+ */
public PropertyNotFoundException(String message)
{
super(message);
}
+ /**
+ * @deprecated
+ */
public PropertyNotFoundException(String message, Throwable cause)
{
super(message, cause);
}
+ /**
+ * @deprecated
+ */
public PropertyNotFoundException(Throwable cause)
{
super(cause);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyResolver.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyResolver.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/PropertyResolver.java Sun May 28 20:59:46 2006
@@ -25,10 +25,14 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public abstract class PropertyResolver
{
+ /**
+ * @deprecated
+ */
public PropertyResolver()
{
}
@@ -37,6 +41,8 @@
* Returns the datatype of the specified element within a list or array.
* <p>
* Param base must be of type Array or List.
+ *
+ * @deprecated
*/
public abstract Class getType(Object base, int index)
throws EvaluationException, PropertyNotFoundException;
@@ -57,6 +63,7 @@
* @param base must not be null.
* @param property must be of type String, must not be null and
* must not be an empty string.
+ * @deprecated
*/
public abstract Class getType(Object base, java.lang.Object property)
throws EvaluationException, PropertyNotFoundException;
@@ -72,6 +79,7 @@
*
* @throws ReferenceSyntaxException if the base object is not an Array
* or List.
+ * @deprecated
*/
public abstract Object getValue(Object base, int index)
throws EvaluationException, PropertyNotFoundException;
@@ -89,13 +97,20 @@
*
* @throws PropertyNotFoundException if the provided object does
* not have the specified property.
+ * @deprecated
*/
public abstract Object getValue(Object base, java.lang.Object property)
throws EvaluationException, PropertyNotFoundException;
+ /**
+ * @deprecated
+ */
public abstract boolean isReadOnly(Object base, int index)
throws EvaluationException, PropertyNotFoundException;
+ /**
+ * @deprecated
+ */
public abstract boolean isReadOnly(Object base, java.lang.Object property)
throws EvaluationException, PropertyNotFoundException;
@@ -107,12 +122,16 @@
*
* @throws EvaluationException if the base object is not an Array or List.
* @throws PropertyNotFoundException if the index is "out of bounds".
+ *
+ * @deprecated
*/
public abstract void setValue(Object base, int index, java.lang.Object value)
throws EvaluationException, PropertyNotFoundException;
/**
* Set the named property on the base object to the provided value.
+ *
+ * @deprecated
*/
public abstract void setValue(Object base, Object property, java.lang.Object value)
throws EvaluationException, PropertyNotFoundException;
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/ReferenceSyntaxException.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/ReferenceSyntaxException.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/ReferenceSyntaxException.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/ReferenceSyntaxException.java Sun May 28 20:59:46 2006
@@ -20,6 +20,7 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public class ReferenceSyntaxException extends EvaluationException
{
@@ -28,21 +29,33 @@
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public ReferenceSyntaxException()
{
super();
}
+ /**
+ * @deprecated
+ */
public ReferenceSyntaxException(String message)
{
super(message);
}
+ /**
+ * @deprecated
+ */
public ReferenceSyntaxException(String message, Throwable cause)
{
super(message, cause);
}
+ /**
+ * @deprecated
+ */
public ReferenceSyntaxException(Throwable cause)
{
super(cause);
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/ValueBinding.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/ValueBinding.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/ValueBinding.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/ValueBinding.java Sun May 28 20:59:46 2006
@@ -22,25 +22,40 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ * @deprecated
*/
public abstract class ValueBinding
{
private String _expressionString = null;
+ /**
+ * @deprecated
+ */
public String getExpressionString()
{
return _expressionString;
}
+ /**
+ * @deprecated
+ */
abstract public Class getType(FacesContext facesContext)
throws EvaluationException, PropertyNotFoundException;
+ /**
+ * @deprecated
+ */
public abstract Object getValue(FacesContext facesContext)
throws EvaluationException, PropertyNotFoundException;
-
+ /**
+ * @deprecated
+ */
public abstract boolean isReadOnly(FacesContext facesContext)
throws EvaluationException, PropertyNotFoundException;
+ /**
+ * @deprecated
+ */
public abstract void setValue(FacesContext facesContext, Object value)
throws EvaluationException, PropertyNotFoundException;
}
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/el/VariableResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/el/VariableResolver.java?rev=410018&r1=410017&r2=410018&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/el/VariableResolver.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/el/VariableResolver.java Sun May 28 20:59:46 2006
@@ -22,17 +22,25 @@
*
* @author Thomas Spiegl (latest modification by $Author$)
* @version $Revision$ $Date$
+ *
+ * @deprecated
*/
public abstract class VariableResolver
{
// FIELDS
// CONSTRUCTORS
+ /**
+ * @deprecated
+ */
public VariableResolver()
{
}
// METHODS
+ /**
+ * @deprecated
+ */
public abstract Object resolveVariable(FacesContext facesContext, String name)
throws EvaluationException;
}