You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mb...@apache.org on 2007/03/16 14:24:21 UTC
svn commit: r518967 [4/20] - in /myfaces/core/branches/jsf12:
api/src/main/java-templates/javax/faces/component/
api/src/main/java/javax/faces/application/
api/src/main/java/javax/faces/component/
api/src/main/java/javax/faces/context/ api/src/main/jav...
Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java?view=diff&rev=518967&r1=518966&r2=518967
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java (original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java Fri Mar 16 06:24:10 2007
@@ -1,72 +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.event;
-
-import javax.el.ELContext;
-import javax.el.MethodExpression;
-import javax.faces.component.StateHolder;
-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 class MethodExpressionValueChangeListener implements ValueChangeListener, StateHolder {
-
- private MethodExpression methodExpression;
-
- private boolean isTransient = false;
-
- /** Creates a new instance of MethodExpressionValueChangeListener */
- public MethodExpressionValueChangeListener() {
- }
-
- public MethodExpressionValueChangeListener(MethodExpression methodExpression) {
- this.methodExpression = methodExpression;
- }
-
- public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
- try {
- Object[] params = new Object[]{event};
- methodExpression.invoke(elContext(), params);
- } catch (Exception e) {
- throw new AbortProcessingException(e);
- }
- }
-
- private ELContext elContext() {
- return FacesContext.getCurrentInstance().getELContext();
- }
-
- public void restoreState(FacesContext context, Object state) {
- methodExpression = (MethodExpression)state;
- }
-
- public Object saveState(FacesContext context) {
- return methodExpression;
- }
-
- public void setTransient(boolean newTransientValue) {
- isTransient = newTransientValue;
- }
-
- public boolean isTransient() {
- return isTransient;
- }
-
-}
+/*
+ * 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.event;
+
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.faces.component.StateHolder;
+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 class MethodExpressionValueChangeListener implements ValueChangeListener, StateHolder {
+
+ private MethodExpression methodExpression;
+
+ private boolean isTransient = false;
+
+ /** Creates a new instance of MethodExpressionValueChangeListener */
+ public MethodExpressionValueChangeListener() {
+ }
+
+ public MethodExpressionValueChangeListener(MethodExpression methodExpression) {
+ this.methodExpression = methodExpression;
+ }
+
+ public void processValueChange(ValueChangeEvent event) throws AbortProcessingException {
+ try {
+ Object[] params = new Object[]{event};
+ methodExpression.invoke(elContext(), params);
+ } catch (Exception e) {
+ throw new AbortProcessingException(e);
+ }
+ }
+
+ private ELContext elContext() {
+ return FacesContext.getCurrentInstance().getELContext();
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ methodExpression = (MethodExpression)state;
+ }
+
+ public Object saveState(FacesContext context) {
+ return methodExpression;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+}
Propchange: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java?view=diff&rev=518967&r1=518966&r2=518967
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java (original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java Fri Mar 16 06:24:10 2007
@@ -1,76 +1,76 @@
-/*
- * 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.validator;
-
-import javax.el.ELException;
-import javax.el.MethodExpression;
-import javax.faces.application.FacesMessage;
-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 MethodExpressionValidator implements Validator, StateHolder {
-
- private MethodExpression methodExpression;
-
- private boolean isTransient = false;
-
- /** Creates a new instance of MethodExpressionValidator */
- public MethodExpressionValidator() {
- }
-
- public MethodExpressionValidator(MethodExpression methodExpression) {
- if (methodExpression == null) throw new NullPointerException("methodExpression can not be null.");
-
- this.methodExpression = methodExpression;
- }
-
- public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
- Object[] params = new Object[3];
- params[0] = context;
- params[1] = component;
- params[2] = value;
-
- try {
- methodExpression.invoke(context.getELContext(), params);
- } catch (ELException e) {
- throw new ValidatorException(new FacesMessage(), e);
- }
- }
-
- public void restoreState(FacesContext context, Object state) {
- methodExpression = (MethodExpression)state;
- }
-
- public Object saveState(FacesContext context) {
- return methodExpression;
- }
-
- public void setTransient(boolean newTransientValue) {
- isTransient = newTransientValue;
- }
-
- public boolean isTransient() {
- return isTransient;
- }
-
-}
+/*
+ * 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.validator;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.faces.application.FacesMessage;
+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 MethodExpressionValidator implements Validator, StateHolder {
+
+ private MethodExpression methodExpression;
+
+ private boolean isTransient = false;
+
+ /** Creates a new instance of MethodExpressionValidator */
+ public MethodExpressionValidator() {
+ }
+
+ public MethodExpressionValidator(MethodExpression methodExpression) {
+ if (methodExpression == null) throw new NullPointerException("methodExpression can not be null.");
+
+ this.methodExpression = methodExpression;
+ }
+
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ Object[] params = new Object[3];
+ params[0] = context;
+ params[1] = component;
+ params[2] = value;
+
+ try {
+ methodExpression.invoke(context.getELContext(), params);
+ } catch (ELException e) {
+ throw new ValidatorException(new FacesMessage(), e);
+ }
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+ methodExpression = (MethodExpression)state;
+ }
+
+ public Object saveState(FacesContext context) {
+ return methodExpression;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ isTransient = newTransientValue;
+ }
+
+ public boolean isTransient() {
+ return isTransient;
+ }
+
+}
Propchange: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/validator/MethodExpressionValidator.java
------------------------------------------------------------------------------
svn:eol-style = native