myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r900268 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java
Date Mon, 18 Jan 2010 01:55:41 GMT
Author: lu4242
Date: Mon Jan 18 01:55:41 2010
New Revision: 900268

URL: http://svn.apache.org/viewvc?rev=900268&view=rev
Log:
MYFACES-2491 _ErrorPageWriter does not print component properties

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java?rev=900268&r1=900267&r2=900268&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/ErrorPageWriter.java
Mon Jan 18 01:55:41 2010
@@ -54,6 +54,8 @@
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
@@ -643,7 +645,7 @@
                     m = pd[i].getReadMethod();
                     try
                     {
-                        v = m.invoke(c, (Object[])null);
+                        v = m.invoke(c, null);
                         if (v != null)
                         {
                             if (v instanceof Collection || v instanceof Map || v instanceof
Iterator)
@@ -657,6 +659,18 @@
                             {
                                 str = ((Expression)v).getExpressionString();
                             }
+                            else if (v instanceof ValueBinding)
+                            {
+                                str = ((ValueBinding) v).getExpressionString();
+                            }
+                            else if (v instanceof MethodBinding)
+                            {
+                                str = ((MethodBinding) v).getExpressionString();
+                            }
+                            else
+                            {
+                                str = v.toString();
+                            }
                             writer.write(str.replaceAll("<", TS));
                             writer.write("\"");
                         }



Mime
View raw message