incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r487631 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java
Date Fri, 15 Dec 2006 19:30:39 GMT
Author: awiner
Date: Fri Dec 15 11:30:39 2006
New Revision: 487631

URL: http://svn.apache.org/viewvc?view=rev&rev=487631
Log:
ADFFACES-333:  Label EL not supported for required validation messages

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java?view=diff&rev=487631&r1=487630&r2=487631
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/laf/base/desktop/MessageWrapper.java
Fri Dec 15 11:30:39 2006
@@ -16,6 +16,8 @@
 package org.apache.myfaces.trinidadinternal.ui.laf.base.desktop;
 
 import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
 
 import org.apache.myfaces.trinidad.util.LabeledFacesMessage;
 
@@ -70,6 +72,13 @@
       Object label = ((LabeledFacesMessage) _msg).getLabel();
       if (label != null)
       {
+        // TODO: change to ValueExpression in JSF 1.2
+        if (label instanceof ValueBinding)
+        {
+          FacesContext context = FacesContext.getCurrentInstance();
+          label = ((ValueBinding) label).getValue(context);
+        }
+
         _label = label.toString();
         return _label;
       }



Mime
View raw message