Revision history [back]

click to hide/show revision 1
initial version

answered 2010-09-30 22:52:34 +0800

jimmyshiau gravatar image jimmyshiau

http://www.zkoss.org/ ZK Team

Hi Stephan

I have created a sample

<zscript><![CDATA[
DateFormatter df = new SimpleDateFormatter(){
    public String getCaptionByPopup(Date date, Locale locale, TimeZone timezone) {
        SimpleDateFormat df = new SimpleDateFormat("EEE, MMM/d", locale);
        df.setTimeZone(timezone);
        return "my " + df.format(date);
    }
};

]]></zscript>

<calendars ...ignore.. dateFormatter="${df}">

You have to change to month view, and create event until "more" appear, then click on "more", you will see the title of the popup has been changed


I can see that the getCaptionByPopup() method is triggered automatically for every day by going in the month mold.*

It just send the all of text to client side, and reuse when the text be used If you update the return value, you have to create a new instant of DateFormatter due to

public void setDateFormatter(DateFormatter dfmater) {
        if (_dfmter != dfmater) {

maybe I can improve the part of process in further future.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More