[jboss-user] [JBoss Seam] - Re: JBoss EL date formatting
damianharvey
do-not-reply at jboss.com
Tue Nov 27 10:12:53 EST 2007
There are a plethora of options open to you here.
1. If the messages.properties message is just 'My date is'. Then you just print out your date eg:#{messages['message']}<h:outputText value="#{myDate}"><s:convertDateTime dateStyle="yyyy-MM-dd"/></h:outputText>
2. If the messages.properties message is 'My Date is {0}' then you could create the message in your Bean using MessageFormat eg:@In Map<String, String> messages;
| ..
| public String getMyMessage() {
| return MessageFormat.format(messages.get("message"), new SimpleDateFormat("yyyy-MM-dd").format(this.myDate));
| }
I'm sure that there are several other ways of doing it.
Cheers,
Damian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108110#4108110
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108110
More information about the jboss-user
mailing list