1 Reply Latest reply on Mar 24, 2009 4:15 AM by Tim

    comboBox focus lost

    Tim Newbie

      hi there,

      after i select or write something i want to rerender another component.
      works fine, but the focus attribute doesn't seem to work. or am i doing something wrong?

      <rich:comboBox id="comboSection"
       suggestionValues="#{orgUnitBean.sectionSuggestions}"
       value="#{orgUnitBean.viewSection}" directInputSuggestions="true"
       defaultLabel="#{res.createUnit_default_label}">
       <a4j:support event="onchange" requestDelay="2000" focus="comboSection" reRender="viewCn, comboDivision" />
      </rich:comboBox>
      


      i want the focus back to the input field of the combo box after rerendering the other component.

      thanks in advance.
      kind regards,
      tim.

        • 1. Re: comboBox focus lost
          Tim Newbie

          solved it.
          you have to rerender "id + comboboxField".

          in this case: comboDivisioncomboboxField

          <rich:comboBox id="comboSection"
           suggestionValues="#{orgUnitBean.sectionSuggestions}"
           value="#{orgUnitBean.viewSection}" directInputSuggestions="true"
           defaultLabel="#{res.createUnit_default_label}">
           <a4j:support event="onchange" requestDelay="2000" focus="comboSection" reRender="viewCn, comboDivisioncomboboxField" />
          </rich:comboBox>