0 Replies Latest reply on Oct 13, 2009 2:41 AM by Emerson Araujo

    Anyone can help me?

    Emerson Araujo Newbie
      People , i am new on Seam and i am trying to use the calendar component of richfaces.

      When i select a cell of calendar i get of follow error.

      21:36:44,203 WARN  [lifecycle] /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: calendarDataModel
      java.lang.IllegalStateException: /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: calendarDataModel
           at javax.faces.component.MethodBindingValueChangeListener.processValueChange(MethodBindingValueChangeListener.java:107)
           at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
           at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
           at org.richfaces.component.UICalendar.broadcast(UICalendar.java:599)
           at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
           at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:294)
           at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
           at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
           at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
      21:36:44,203 ERROR [lifecycle] JSF1054: (Phase ID: PROCESS_VALIDATIONS 3, View ID: /calendario.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@12ebc6]
      21:36:48,265 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jboss-seam-excel.jar/META-INF/seam-excel.taglib.xml
      21:36:48,281 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jboss-seam-mail.jar/META-INF/seam-mail.taglib.xml
      21:36:48,281 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-core.taglib.xml
      21:36:48,281 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-html.taglib.xml
      21:36:48,281 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jsf-ui.taglib.xml
      21:36:48,296 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-core.taglib.xml
      21:36:48,296 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jsf-facelets.jar/META-INF/jstl-fn.taglib.xml
      21:36:48,296 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/richfaces-ui.jar/META-INF/a4j.taglib.xml
      21:36:48,296 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/richfaces-ui.jar/META-INF/ajax4jsf.taglib.xml
      21:36:48,312 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/richfaces-ui.jar/META-INF/jsp.taglib.xml
      21:36:48,312 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/richfaces-ui.jar/META-INF/rich.taglib.xml
      21:36:48,312 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/richfaces-ui.jar/META-INF/richfaces.taglib.xml
      21:36:48,328 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jboss-seam-ui.jar/META-INF/s.taglib.xml
      21:36:48,328 INFO  [compiler] Added Library from: vfszip:/E:/programas/jboss-5.0.0.GA/server/default/deploy/Money-ear.ear/Money.war/WEB-INF/lib/jboss-seam-pdf.jar/META-INF/seam-pdf.taglib.xml
      21:37:02,828 WARN  [lifecycle] /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": java.lang.NullPointerException
      java.lang.IllegalStateException: /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": java.lang.NullPointerException
           at javax.faces.component.MethodBindingValueChangeListener.processValueChange(MethodBindingValueChangeListener.java:107)
           at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
           at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
           at org.richfaces.component.UICalendar.broadcast(UICalendar.java:599)
           at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
           at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:294)
           at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
           at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
           at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
      21:37:02,828 ERROR [lifecycle] JSF1054: (Phase ID: PROCESS_VALIDATIONS 3, View ID: /calendario.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@12ebc6]
      21:37:29,109 INFO  [STDOUT] Wed Oct 21 00:00:00 BRST 2009selected
      21:37:30,234 WARN  [lifecycle] /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: calendarDataModel
      java.lang.IllegalStateException: /calendario.xhtml @28,220 valueChangeListener="#{calendarDataModel.valueChanged}": org.jboss.seam.core.LockTimeoutException: could not acquire lock on @Synchronized component: calendarDataModel
           at javax.faces.component.MethodBindingValueChangeListener.processValueChange(MethodBindingValueChangeListener.java:107)
           at javax.faces.event.ValueChangeEvent.processListener(ValueChangeEvent.java:134)
           at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:771)
           at org.richfaces.component.UICalendar.broadcast(UICalendar.java:599)
           at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
           at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:294)
           at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
           at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
           at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)

      My Classes

      package org.domain.money.session;

      import java.util.Calendar;

      import java.util.Date;
      import java.util.HashMap;
      import java.util.Map;

      import javax.faces.event.ValueChangeEvent;

      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.richfaces.model.CalendarDataModel;
      import org.richfaces.model.CalendarDataModelItem;

      /**
      * @author Ilya Shaikovsky
      *
      */
      @Name("calendarDataModel")
      @Scope(ScopeType.SESSION)
      public class CalendarDataModelImpl implements CalendarDataModel {

           /*
            * (non-Javadoc)
            *
            * @see org.richfaces.component.CalendarDataModel#getData(java.util.Date[])
            */
           @In(create= true,required = false)
           private CalendarDataModelItem[] items;
           private String currentDescription;
           private String currentShortDescription;
           private Date currentDate;
           private boolean currentDisabled;

           /*
            * (non-Javadoc)
            *
            * @see org.richfaces.model.CalendarDataModel#getData(java.util.Date[])
            */
           public CalendarDataModelItem[] getData(Date[] dateArray) {
                if (dateArray == null) {
                     return null;
                }
                if (items == null) {
                     items = new CalendarDataModelItem[dateArray.length];
                     for (int i = 0; i < dateArray.length; i++) {
                          items[i] = createDataModelItem(dateArray[i]);
                     }
                }
                return items;
           }

           /**
            * @param date
            * @return CalendarDataModelItem for date
            */
           protected CalendarDataModelItem createDataModelItem(Date date) {
                CalendarDataModelItemImpl item = new CalendarDataModelItemImpl();
                Map data = new HashMap();
                data.put("shortDescription", "Nothing planned");
                data.put("description", "");
                Calendar c = Calendar.getInstance();
                c.setTime(date);
                item.setDay(c.get(Calendar.DAY_OF_MONTH));
                item.setEnabled(true);
                item.setStyleClass("rel-hol");
                item.setData(data);
                return item;
           }

           /*
            * (non-Javadoc)
            *
            * @see org.richfaces.model.CalendarDataModel#getToolTip(java.util.Date)
            */
           public Object getToolTip(Date date) {

                // TODO Auto-generated method stub
                return null;
           }

           /**
            * @return items
            */
           public CalendarDataModelItem[] getItems() {
                return items;
           }

           /**
            * @param setter
            *            for items
            */
           public void setItems(CalendarDataModelItem[] items) {
                this.items = items;
           }

           /**
            * @param valueChangeEvent
            *            handling
            */
           public void valueChanged(ValueChangeEvent event) {
                System.out.println(event.getNewValue() + "selected");
                setCurrentDate((Date) event.getNewValue());
                Calendar calendar = Calendar.getInstance();
                calendar.setTime(getCurrentDate());
                if (((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1] != null)) {
                     if (((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1]
                               .getData()).get("description") != null) {
                          if ((String) ((HashMap) items[calendar
                                    .get(Calendar.DAY_OF_MONTH) - 1].getData())
                                    .get("description") != null)
                               setCurrentDescription((String) ((HashMap) items[calendar
                                         .get(Calendar.DAY_OF_MONTH) - 1].getData())
                                         .get("description"));
                     }
                }
                if (((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1] != null)) {
                     if (((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1]
                               .getData()).get("shortDescription") != null) {
                          if ((String) ((HashMap) items[calendar
                                    .get(Calendar.DAY_OF_MONTH) - 1].getData())
                                    .get("shortDescription") != null)
                               setCurrentShortDescription((String) ((HashMap) items[calendar
                                         .get(Calendar.DAY_OF_MONTH) - 1].getData())
                                         .get("shortDescription"));
                     }
                }
           }

           /**
            * Storing changes action
            */
           public void storeDayDetails() {
                Calendar calendar = Calendar.getInstance();
                calendar.setTime(getCurrentDate());
                ((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1].getData())
                          .put("shortDescription", getCurrentShortDescription());
                ((HashMap) items[calendar.get(Calendar.DAY_OF_MONTH) - 1].getData())
                          .put("description", getCurrentDescription());
           }

           /**
            * @return currentDescription
            */
           public String getCurrentDescription() {
                return currentDescription;
           }

           /**
            * @param currentDescription
            */
           public void setCurrentDescription(String currentDescription) {
                this.currentDescription = currentDescription;
           }

           /**
            * @return currentDisabled
            */
           public boolean isCurrentDisabled() {
                return currentDisabled;
           }

           /**
            * @param currentDisabled
            */
           public void setCurrentDisabled(boolean currentDisabled) {
                this.currentDisabled = currentDisabled;
           }

           /**
            * @return currentShortDescription
            */
           public String getCurrentShortDescription() {
                return currentShortDescription;
           }

           /**
            * @param currentShortDescription
            */
           public void setCurrentShortDescription(String currentShortDescription) {
                this.currentShortDescription = currentShortDescription;
           }

           /**
            * @return currentDate
            */
           public Date getCurrentDate() {
                return currentDate;
           }

           /**
            * @param currentDate
            */
           public void setCurrentDate(Date currentDate) {
                this.currentDate = currentDate;
           }

      }

      My page

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <ui:composition xmlns="http://www.w3.org/1999/xhtml"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:a4j="http://richfaces.org/a4j"
            xmlns:rich="http://richfaces.org/rich"
            template="layout/template.xhtml">

          <ui:define name="body">
          <style>
              .header{
                  font-weight:bold;
              }
              .rich-calendar-header{
                  text-align:center;
              }
          </style>

          <h:form id="form">
              <rich:messages/>
              <a4j:jsFunction name="ajaxSubmit" oncomplete="#{rich:component('panel')}.show()" reRender="editContent" />
              <rich:calendar value="#{calendarBean.selectedDate}"
                  popup="false" showApplyButton="false"
                  cellWidth="100px" cellHeight="100px"
                  boundaryDatesMode="none" showWeeksBar="false"
                  dataModel="#{calendarDataModel}" onchanged="if (event.rich.date) {ajaxSubmit();}" oncurrentdateselect="return false" id="organizer" valueChangeListener="#{calendarDataModel.valueChanged}" showFooter="false">
                  <f:facet name="header">
                      <h:panelGroup>
                          <h:outputText value="Current Month" styleClass="header"/>
                      </h:panelGroup>
                  </f:facet>
                  <a4j:outputPanel layout="block" id="cell" onclick="#{rich:component('organizer')}.resetSelectedDate()" style="height: 100%;">
                      <h:panelGrid columns="1">
                          <h:outputText value="{day}" style="align:center"/>
                          <h:outputText value="{data.shortDescription.escapeHTML()}"/>
                          <h:outputText value="{data.description.escapeHTML()}"/>
                      </h:panelGrid>
                  </a4j:outputPanel>
              </rich:calendar>
          </h:form>
          <rich:modalPanel id="panel" resizeable="false">
              <f:facet name="header">Edit Day:</f:facet>
              <f:facet name="controls">
                  <h:panelGroup>
                      <h:graphicImage value="/images/modal/close.png" id="hidelink" styleClass="hidelink"/>
                      <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
                  </h:panelGroup>
              </f:facet>
              <h:form>
                  <h:panelGrid columns="2" id="editContent">
                      <h:outputText value="Short Description:"/>
                      <h:inputText value="#{calendarDataModel.currentShortDescription}"/>
                      <h:outputText value="Day Notes:"/>
                      <h:inputTextarea value="#{calendarDataModel.currentDescription}"/>
                      <a4j:commandButton value="Store" action="#{calendarDataModel.storeDayDetails}" id="storebutton" oncomplete="#{rich:component('panel')}.hide()" reRender="organizer"/>
                      <button type="button" id="cancelbutton" onclick="#{rich:component('panel')}.hide()">Cancel</button>
                  </h:panelGrid>
              </h:form>
          </rich:modalPanel>
            </ui:define>
      </ui:composition>