4 Replies Latest reply on Jun 25, 2009 7:48 AM by m_w_abdo

    dynamic combobox

    ajanz

      i want to implement a dynamic combobox. where the user clicks on the dropdown the entries should render dynamically depending on other entries.

      any suggestions how to do that?

        • 1. Re: dynamic combobox
          ilya_shaikovsky

          I think in your case not comboBox should call the list according to some components values. But the components which influence the combo should update it via ajax after changed.

          If you want to make decision in the moment when list called - you should use suggestionBox.

          • 2. Re: dynamic combobox
            ajanz

            ok , i could do that. but how can i ensure the user only selects an entry from the list and does not type any "stupid" text?

            so how can i validate this?

            • 3. Re: dynamic combobox
              ilya_shaikovsky

              just create custom validator which will check this. In general comboBox not support this out of the box because it's input component and not a select.

              • 4. Re: dynamic combobox
                m_w_abdo

                Hello,
                I think you can do that without using custom validator, if you use the h:selectOneMenu which is the standard Combo Box from JSF.

                By this, you will have two selectOneMenu components, add to the first one the a4j:support to trigger event onchange....