JSF navigation with Ajax

If I put, for example, the following component and click on it, it behaves as expected:

<h:commandLink value="Click me" action="anotherPage.jsf" />

But if I use Ajax:

<h:commandLink value="Click me" action="anotherPage.jsf"><f:ajax /></h:commandLink>

It will not move to another page. Am I missing something? Shouldn't that work?

Another problem is that when you click the button using ajax after the session timeout, the application is redirected to the login page, but does not download css files.

Any ideas?

Yours faithfully,

Carlos Ferreira

+3
source share
3 answers

You can do this if you send a redirect.

action="anotherPage.jsf?faces-redirect=true"

However, I completely do not see the point / benefit of navigating with Ajax.

+6
source

ajax , .

+1

ajax , ajaxifying , ( ajax) . ajax HTTP-, , , .

0

All Articles