1 Reply Latest reply on Nov 11, 2009 4:52 PM by takach

    Modify the content of h:selectOneMenu by AJAX

    takach

      I want to fill the content of a h:selectOneMenu component (say person) according to the chosen value in an other selectOneMenu (say category). I do it by an a4j:support of the category menu. The getListItems() method looks returning a List for the person menu but I get IllegalArgumentException:

      java.lang.IllegalArgumentException: Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(person). Found null.

      I guess it is due to the fact that the menus are binded to variables and if I change the selected category, the actual person may be missing among the person SelectItems corresponding the new category. Then perhaps the reset of the person variable and the setting it to a default value according to the new value of the category helps?

      Do you advise me a tutorial how to do such kind of magic?