Thread: af:messages - labels from boundle


Permlink Replies: 2 - Pages: 1 - Last Post: Nov 22, 2006 12:49 PM Last Post By: RadoK
user524807

Posts: 3
Registered: 08/11/06
af:messages - labels from boundle
Posted: Sep 21, 2006 7:52 AM
Click to report abuse...   Click to reply to this thread Reply
I'm facing the funy problem from http://forums.oracle.com/forums/thread.jspa?messageID=1462103&#1462103

input text labels not translated from messages bundle when displaing error on af:messages component.
I found that there is a global hole in jsf implementation so my question is:
How i can disable showing labels befor the error msg in af:messages tag??
Is it possible???

regard
Tomek
yvesg2

Posts: 38
Registered: 10/30/06
Re: af:messages - labels from boundle
Posted: Nov 22, 2006 12:33 PM   in response to: user524807 in response to: user524807
Click to report abuse...   Click to reply to this thread Reply
RadoK

Posts: 300
Registered: 06/05/06
Re: af:messages - labels from boundle
Posted: Nov 22, 2006 12:49 PM   in response to: user524807 in response to: user524807
Click to report abuse...   Click to reply to this thread Reply
Hello,
finally they helped me at metalink. You are true, this is hole in jsf.
You need to create a managed bean with get method for every message making you problems. The method looks like:
public String getMyMsg() {
  return ... get msg from bundle ...
}

Then you use the value from bean like yvesg wrote.

I had similar problem with setting processScope value to string from bundle with setActionListener:
<af:setActionListener from="#{res.msgFromBundle}" to="#{processScope.myParam}"/>

The processScope.myParam was always empty. I had to use managed bean again.

Rado
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums