-
1. Re: facesMessages: Add a msg with param
damianharvey.damianharvey.gmail.com Apr 17, 2008 6:04 PM (in response to 6sic6)It doesn't like the single-quote. You can either:
- spell cannot instead of can't; or
- use 2 single-quotes eg can''t
Cheers,
Damian.
-
2. Re: facesMessages: Add a msg with param
mars1412 Apr 18, 2008 10:54 AM (in response to 6sic6)facesMessages.addFromResourceBundle()
AFAIK there are no problems with single quotes in properties files at all...
-
3. Re: facesMessages: Add a msg with param
damianharvey.damianharvey.gmail.com Apr 18, 2008 11:48 AM (in response to 6sic6)Oops. You're right. Single quotes in the properties file are only an issue when using MessageFormat.
-
4. Re: facesMessages: Add a msg with param
6sic6 Apr 18, 2008 11:53 AM (in response to 6sic6)
AFAIK there are no problems with single quotes in properties files at all...right! I've tried to remove the single-quote and it doesn't work.
I'm trying also with addFromResourceBundle() method but it doesn't work too. -
5. Re: facesMessages: Add a msg with param
mars1412 Apr 18, 2008 12:34 PM (in response to 6sic6)this works 4 me:
bundle: registration.success = user {0} {1} ({2}) has been registered successfully facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "registration.success", webUser .getFirstName(), webUser.getName(), webUser.getEmail());
try it - if it does not work post some code
-
6. Re: facesMessages: Add a msg with param
6sic6 Apr 18, 2008 1:21 PM (in response to 6sic6)Sorry I'm new with jsf and seam,
here in my existing classes I see that the msg were added with something likefacesMessages.add("#{messages.someOutput}");
In the messages.properties file I have
messages.someOutput=This is the output
my output is
This is the outputwith
facesMessages.add("#{messages.someOutput}", new Integer(999));
messages.someOutput=This is the output {0}
my output is :
This is the output {0}with
facesMessages.addFromResourceBundle("messages.someOutput", new Integer(999));
messages.someOutput=This is the output {0}
my output is :
messages.someOutputit's not evaluated, I don't know what kind of other code I need to solve this simple problem.. or.. I tought it was simple
-
7. Re: facesMessages: Add a msg with param
mars1412 Apr 18, 2008 1:37 PM (in response to 6sic6)try this:
facesMessages.addFromResourceBundle("someOutput", new Integer(999));
-
8. Re: facesMessages: Add a msg with param
6sic6 Apr 18, 2008 3:35 PM (in response to 6sic6)yeah! now it works. thanks boss! ;)