1 2 Previous Next 21 Replies Latest reply on Sep 28, 2007 11:50 AM by Blue

    Calendar submit()

    Emil Nilimaa Newbie

      I have a small problem.

      I need to have two calendar fields. And field 1 needs to update the field 2 with the same value when it is changed.

      So i've made a method that will set the value in field 2, and set this method as

      valueChangeListener="#{MyBean.processValueChange}
      

      on the first calendar.

      However, this method seems to be called only when the submit is fired in the form. So i need to be able to call the "submit()" thing from the calendar when the date is called. How can I do this?
      I have tried all of these and none work...
      oninputchange="submit()"
      oncomplete="submit()"
      onchange="submit"()
      


      If i do a simple textinput i can get the submit thing to work by doing it like this:
      <h:inputText
      id="myField"
      onchange="submit()"
      valueChangeListener="#{MyBean.processValueChange}"
      value="#{MyBean.myfield}"
      required="false" />
      

      This works... but i can't understand how to get the calendar input to work the same way... anyone have any idea?

        1 2 Previous Next