This content has been marked as final.
Show 3 replies
-
1. Re: how to display CalendarDataModelItem.getData() in calend
nbelaevski Aug 25, 2008 9:18 PM (in response to dipje)Hi Ron,
I've created the issue: https://jira.jboss.org/jira/browse/RF-4292 . Thank you for reporting the problem! -
2. Re: how to display CalendarDataModelItem.getData() in calend
nbelaevski Aug 25, 2008 9:19 PM (in response to dipje)"nbelaevski" wrote:
Hi Ron,
I've created the issue: https://jira.jboss.org/jira/browse/RF-4292 . Thank you for reporting the problem!
Sorry, that was intended to be posted to another thread -
3. Re: how to display CalendarDataModelItem.getData() in calend
nbelaevski Aug 25, 2008 9:26 PM (in response to dipje)Data returned from the model can be used in macrodefinitions, e.g. I have the following code:
<rich:calendar ...> <h:panelGrid> <h:outputText styleClass="smallText" value="{data.enLabel}" /> <h:outputText styleClass="smallText" value="{data.frLabel}" /> <h:outputText styleClass="smallText" value="{data.deLabel}" /> </h:panelGrid> </rich:calendar>
Model item is:Date date; Map data = new HashMap(); DateFormat enFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH); DateFormat frFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.FRENCH); DateFormat deFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.GERMAN); data.put("enLabel", enFormatter.format(date)); data.put("frLabel", frFormatter.format(date)); data.put("deLabel", deFormatter.format(date));
Calendar cells contain table with date formatted for three locales then.
Full demo source is here: http://anonsvn.jboss.org/repos/richfaces/trunk/samples/calendar-sample/