Is there a nicer way to do this? I really like how action methods work by returning Navigation objects.
I’ve tried returning a Navigation object with the actionListener, but that didn’t work. Likewise returning a string “/nextPage”, or even “/directory/subdirectory/nextPage.xhtml” does not work. They all simply act as post backs and “refresh” the page.
So if there is anyway to make the actionListener navigation a little more like an action navigation, I would be very pleased to find out.
I agree that this way of navigating isn’t very nice. But why do you use actionListener and not a standard action? As actionListener don’t allow do trigger navigation directly, things are getting dirty. 😉
You COULD perhaps use the JSF NavigationHandler for navigation. In this case you could even use the Navigate class, but that could may be even more ugly.