4 Replies Latest reply on Nov 13, 2007 5:52 AM by ilya_shaikovsky

    focus calendar problem

    rainw

      Hey,

      I'm using rich:calendar in a simple page with only two h:inputText fields.
      The calendar is not the first field on the page, but I need to set focus on it when I click the commandButton. I try to do this with focus attribute of commandButton.

      <h:inputText id="input1" value="#{bean.value1} />
      <h:inputText id="input2" value="#{bean.value2}" />
      <rich:calendar id="test" value="#{bean.date}" enableManualInput="true"
      popup="true" />
      
      <a4j:commandButton focus="test" id="submit" reRender="page" />
      <a4j:commandButton focus="input2" id=v2" reRender="page" />
      


      When I click the commandButton rerender is ok, but no field is set on focus. When I do this for second h:inputText it works fine.

      Does anyone have any ideas?