AJAX isn't required, but if you don't use AJAX, you have to reload the entire page each time you change one of the menus. The basic code is the same in either case - when a parent menu changes, you replace the datamodel for the child menu(s).
I haven't used NetBeans, and in any event, it's not the
IDE that's got to work, it's the code.
Here's a snippet of some RichFaces JSF with AJAX-enabled cascading menus:
There isn't any AJAX code you have to write. The "a4j:support" tag manages the AJAX - it detects the "onchange" event on the menu and fires the valueChangeListeners in the backing bean. The ValueChangeListeners cause the datamodels for that menu's children to be reset. The reRender attributes limits the actual page updating to only those items named (matching "id" attributes) Otherwise the whole page gets refreshed.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.