incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r423685 - in /incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener: SetActionListener.java SetActionListenerTag.java
Date Thu, 20 Jul 2006 00:45:08 GMT
Author: matzew
Date: Wed Jul 19 17:45:08 2006
New Revision: 423685

URL: http://svn.apache.org/viewvc?rev=423685&view=rev
Log:
thx to Arjuna Wijeyekoon for ADFFACES-76 nd ADFFACES-77

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListener.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListenerTag.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListener.java?rev=423685&r1=423684&r2=423685&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListener.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListener.java
Wed Jul 19 17:45:08 2006
@@ -24,6 +24,7 @@
 import org.apache.myfaces.adf.bean.FacesBean;
 import org.apache.myfaces.adf.bean.FacesBeanImpl;
 import org.apache.myfaces.adf.bean.PropertyKey;
+import org.apache.myfaces.adf.logging.ADFLogger;
 
 /**
  * JavaServer Faces version 1.2 a <code>setPropertyActionListener</code>, which
provides the 
@@ -60,8 +61,25 @@
     ValueBinding to = getValueBinding(TO_KEY);
     if (to != null)
     {
-      to.setValue(FacesContext.getCurrentInstance(),
-                  getFrom());
+      Object from = getFrom();
+      try
+      {
+        to.setValue(FacesContext.getCurrentInstance(), from);
+      }
+      catch (RuntimeException e)
+      {
+        if (_LOG.isWarning())
+        {
+          ValueBinding fromBinding = getValueBinding(FROM_KEY);
+          String mes = "Error setting:'"+to.getExpressionString() +
+            "' to value:"+from;
+          if (fromBinding != null)
+            mes += " from:'"+fromBinding.getExpressionString()+"'";
+            
+          _LOG.warning(mes, e);
+        }
+        throw e;
+      }
     }
   }
 
@@ -91,4 +109,6 @@
   }
 
   // saveState() and restoreState() come from FacesBeanImpl
+  
+  private static final ADFLogger _LOG = ADFLogger.createADFLogger(SetActionListener.class);
 }

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListenerTag.java?rev=423685&r1=423684&r2=423685&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListenerTag.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/taglib/listener/SetActionListenerTag.java
Wed Jul 19 17:45:08 2006
@@ -88,7 +88,7 @@
       }
       else
       {
-        setFrom(_from);
+        listener.setFrom(_from);
       }
 
       if (TagUtils.isValueReference(_to))



Mime
View raw message