You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Peter Büttner (JIRA)" <ad...@incubator.apache.org> on 2006/09/23 23:53:22 UTC
[jira] Created: (ADFFACES-192) messages shows value-binding instead
of label of component
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
[jira] Updated: (ADFFACES-192) messages shows value-binding instead
of label of component
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ 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.