0 Replies Latest reply on Dec 10, 2007 7:36 PM by Scott Ryan

    Null pointer when reRendering a rich:calendar in a panelgrou

    Scott Ryan Newbie

      I have an application that turns on and off the rendering flags of various components and uses ajax to rerender the page with those components on them. For example I have two rich calendar objects wrapped in a panelgroup and when I click another button the rendered flag for the panel group is set to false and the output panel that contains just the calendar panel group is rerendered and the calendars disappear. The problem comes when I try to render them back by setting the rendered flag to true and rerendering the output panel again. All the objects are created using the java interface and not the rich tags. I am using facelets and myfaces. I get the following stack trace:

      2007-12-10 17:27:35,939|ERROR|[ut]|filters.ExceptionFilter|(ExceptionFilter.java
      :96)|Not an instance of Tracked Exception
      2007-12-10 17:27:35,939|ERROR|[ut]|exception.TopLevelErrorInterceptor|(TopLevelE
      rrorInterceptor.java:88)|java.lang.NullPointerException
      java.lang.NullPointerException
       at org.richfaces.renderkit.CalendarRendererBase.getSelectedDate(Calendar
      RendererBase.java:367)
       at org.richfaces.renderkit.html.CalendarRenderer.doEncodeEnd(CalendarRen
      derer.java:225)
       at org.richfaces.renderkit.html.CalendarRenderer.doEncodeEnd(CalendarRen
      derer.java:436)
       at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
      539)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(Re
      ndererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.re
      nderChildren(HtmlGridRendererBase.java:229)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.en
      codeEnd(HtmlGridRendererBase.java:101)
       at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
      539)
      


      I did not interact with the calendars yet so no data exists in the page or the backing bean and it does not look like it is my code that is null. Is there something I need to do when I unrender and rerender a panel that contains a rich:calendar. I can provide more of the stack trace if needed.