Hi.
I'm using Primefaces.
I have a button to display an edit dialog form with a selectOneMenu that holds prefix number values in it and,
after selecting one of those prefix values, three selectCheckboxMenu are loaded with employees data. This is workinkg fine.
The Listener:
The methods to load the employees lists:
Native queries to retrieve database:
But when editing a register that already has prefix and employee values (saved earlier by some user),
the 3 selectCheckboxMenu are loaded showing (undesired) id's entity class name on its labels value
and empty dropdowns:
e.g.: in the figure above, when the edit form was loaded, it shows the values saved earlier by some user:
- the prefix 9882 (displayed as expected) and
- the three (empty) dropdowns for employees (displayed with the undesired class names in it).
If I select a different value than 9882, the dropdowns are (ajax) filled as expected and if I select 9882 again,
the employees are displayed as expected (without the class names):
I'm trying to resolve it activating the ajax as below, but I don't know how to call it from inside the function:
Does anyone knows how to trigger ajax to load nested dropdowns after loading a form?
Or if someone has any other solution to display the values in the labels (without the class name) and automattically load the nested dropdowns, I appreciate that.
Thanks in advance.