2 Replies Latest reply on Oct 1, 2010 7:51 PM by sos

    valuechangelistener not fired on rich calendar

    mike82
      hi,

        I want my rich calendar to be able to change date on backing bean without pressing any additional buttons like "apply","set" etc. Simply, after selecting date from pop up value should be updated. It looked very simple but somehow it isn't... Setter method on backing bean is never invoked, then I tried with valuechangelistner, also not fired... here's small part of the code:

      <rich:calendar locale="DE" datePattern="dd.MM.yyyy"                            value="#{calendarsBean.selectedDate}" valueChangeListener="#{calendarActions.setShowDay}">

      @In CalendarsBean calendarsBean;     
      public void setShowDay(ValueChangeEvent event) {          
      Calendar cal = Calendar.getInstance();     
      cal.setTime((Date)event.getNewValue());
      }

      I can imagine it doesn't work because selection takes place on client side. I tried mode="ajax", no success as well.
        • 1. Re: valuechangelistener not fired on rich calendar
          mike82

          I thought it's going to be an easy one... Perhaps I made it hard with my explanations. Let's try over again:


          How to make rich:calendar setting selected date in backing bean after clicking on given date (without apply button)?

          • 2. Re: valuechangelistener not fired on rich calendar
            sos

            Hi,
            I dont know if you found out a solution for the issue you had with the rich:calendar ad its been a while. Was trying to implement something similar but doesnt seem to be working.


            Also noticed no one ever replied to this issue.


            While to sum up and Wrap on what I was trying to achieve:


            Have a rich:calendar in jsf that has a small calendar icon on its side. When the user clicks a date from the cal. I want to get that with no action on clicks of button/hyperlinks etc. Get the date and populate a expired date ( add 10 days to it) which is the next field to the selected date.


            Any suggestions ASAP shall be appreciated else have to think other wise and change the design.


            Please help