This content has been marked as final.
Show 5 replies
-
1. Re: Help with messages.properties!
michaelcourcy Aug 19, 2008 10:52 PM (in response to benmoore)Did you try this ?
newmails=You have #{user.newMails.count} new mails.
http://docs.jboss.com/seam/2.1.0.A1/reference/en/html/i18n.html#d0e9302
Maybe not what you really want.
You also have this option
<h:outputFormat value="#{messages.newmails}}"> <f:param value=""#{user.newMails.count}"/> </h:outputFormat>
Cheers
-
2. Re: Help with messages.properties!
tony.herstell1 Aug 19, 2008 11:29 PM (in response to benmoore)booking_in_past=Cannot book resource #0 in the past. facesMessages.addToControlFromResourceBundle( "bookingResourceAttempt", FacesMessage.SEVERITY_ERROR, "booking_in_past", messages.get(eachBookingResource.getResource().getKind().getInlLabel()));
-
3. Re: Help with messages.properties!
benmoore Aug 20, 2008 4:20 PM (in response to benmoore)
Michael Courcy wrote on Aug 19, 2008 22:52:
Did you try this ?newmails=You have #{user.newMails.count} new mails.
Maybe not what you really want.Right. Not what I want.
Michael Courcy wrote on Aug 19, 2008 22:52:
You also have this option<h:outputFormat value="#{messages.newmails}}"> <f:param value=""#{user.newMails.count}"/> </h:outputFormat>
That doesn't work in Seam, and that's precisely the problem. See the bug I linked to above. It works in a plain JSF application, but not Seam apps.
-
4. Re: Help with messages.properties!
michaelcourcy Aug 20, 2008 10:45 PM (in response to benmoore)Hi Ben
I've been testing this myself
newmails=You have {0} new mails.
<h:outputFormat value="#{messages.newmails}"> <f:param value="#{user.newMails.count}"/> </h:outputFormat>
It just works.
My version of seam is 2.0.2.SP1 and I use jboss-4.2.3.GA
Cheers
-
5. Re: Help with messages.properties!
djn Aug 21, 2008 1:53 PM (in response to benmoore)Hi.
We have used the following:
our_message=Foo #0 Bar
<h:outputText value="#{interpolator.interpolate(messages.our_message, myBean.value}" />
Which then displays the message with the data we want. #{interpolator} is a builtin seam component.