[ 
https://issues.apache.org/jira/browse/ADFFACES-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthias Weßendorf updated ADFFACES-192:
----------------------------------------

    Affects Version/s: 1.0.1-incubating-core-SNAPSHOT

> messages shows value-binding instead of label of component
> ----------------------------------------------------------
>
>                 Key: ADFFACES-192
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-192
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>         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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to