0 Replies Latest reply on Jan 6, 2011 2:51 AM by eswaramoorthy1985

    Reinitialize the rich:calendar month?

    eswaramoorthy1985

      Hi,

            I displayed month using rich:calendar.

      Once i select any month, then i will do some action using that month.

       

      If i go to any other page, Later i will see the rich:calander page, then

      month name show the already selected month name instead of current monthname

       

       

           Initialy i click showmonth button, then call backing bean action and set current month

       

      public String showMonthAction()
      {
            calanderRendered = true;
            int startingDate = calendar.getActualMinimum(Calendar.DAY_OF_MONTH);
            calendar.set(Calendar.DATE, startingDate);
            selectedMonth = calendar.getTime();
      
            System.out.println("Selected month : " + selectedMonth);  
            return "";
      }
      

       

      After complete the showMonthAction() action , set rich:calendar month display :  << < january 2011 > >> .

       

      Then i select the month :  << < march 2011 > >> , Then i will do some process using the month .

       

      The problem is :  If i go to any other page. later i will come this rich:calendar page, i click showMonthAction() method, but the month

                               name is showing << < march 2011 > >> . But i want to show << <january 2011> >>  (current month).

       


      <rich:calendar boundaryDatesMode="scroll"
            renedered="#{CalandarBean.calanderRendered}"   
            id="monthlyCalendarId" 
            showWeekDaysBar="false" 
            showFooter="false"
            value="#{CalandarBean.selectedMonth}"                                                   
            oncurrentdateselected="event.rich.component.selectDate(event.rich.date)"
            popup="false"/>
      

       

       

       

      Help me. Thanks in advance.