PrimeFaces Ajax Dropdown
PrimeFaces provides an easy way to create dynamic dropdown on the basis of filter. A new dropdown is formed by Ajax call. The <p:ajax> tag call Java method after each event is occurred.
In the following example, we are creating two dropdown. This example includes the following files.
After executing, it produces the following output.
The second dropdown contains the city names for each country. Each time country is selected, city dynamically updates.