messages shows value-binding instead of label of component
----------------------------------------------------------

                 Key: ADFFACES-192
                 URL: http://issues.apache.org/jira/browse/ADFFACES-192
             Project: MyFaces ADF-Faces
          Issue Type: Bug
         Environment: last adf from oracle, myFaces 1.1.3
            Reporter: Peter Büttner
            Priority: Minor


A <af:messages/> doesn't resolve a el expression, 
e.g. with 

   <af:inputText 
   label="#{labels[ 'Label_Foo_Bar' ]}"
   value="#{ctrl.data.foo.bar}" 
   required="true"/>

I see  something in my Browser like
     #{labels[ 'Label_Foo_Bar' ]} needs to be entered

the bug is most probably in
   org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.MessageWrapper
--------------------------------------------------------------------------
if (_msg instanceof LabeledFacesMessage)
    {
      Object label = ((LabeledFacesMessage) _msg).getLabel();
      if (label != null)
      {
        _label = label.toString();
        return _label;
      }
    }
--------------------------------------------------------------------------
Fix:
add the value resolving code
--------------------------------------------------------------------------
if (_msg instanceof LabeledFacesMessage)
    {
      Object label = ((LabeledFacesMessage) _msg).getLabel();
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
      if(label instanceof ValueBinding){// PEB
          label = 
((ValueBinding)label).getValue(FacesContext.getCurrentInstance());
        }
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      if (label != null)
      {
        _label = label.toString();
        return _label;
      }
    }
--------------------------------------------------------------------------
maybe 
   ((LabeledFacesMessage) _msg).getLabel();
should deliver the already resolved value, but i don't
know enough about the architecture of adf (trinidad).


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to