1 Reply Latest reply on Apr 30, 2009 1:37 AM by nbelaevski

    Calendar became unclickable after rerender

    ariefzj

      Hi Guys,

      We're having some problem while using RichFaces calendar together with some other 3rd party component (i.e. Quipukit). The problem is, after rerender, the calendar component is not clickable anymore. It will return "component" is null or not an object javascript error as a result of this function call.

      $('j_id10').component.doSwitch();


      We're not sure what's wrong with it. We have tried creating a simple jsp with both components in it. And the page works fine. Unfortunately, our page is far complex than simple, thus hard for me to paste the code snippet here. The following is how we create the calendar via java:
      HtmlCalendar calendar = new HtmlCalendar();
      calendar.setPopup(true);
      calendar.setShowApplyButton(false);
      



      After a bit of digging with the help from IE8 developer tool, we have narrowed down to this code (in RF3.3.0 Calendar.js initialize body):

      obj.component = this; //line 766
      


      Seems that, the "obj.component=this" is not able to associate "this" to the actual DOM element. Its works fine on first load but not after rerender.
      So, the question to RF developer :) do you guys know any possible thing that can actually stop that code from doing what it should?

      I do not think its a bug in RF because it might due to our own code. But we are not sure which one.

      Our environment:
      - RF3.3.0
      - IE8, IE7


      Kindly help us :)