JSF Navigation with Ajax

后端 未结 3 1907
独厮守ぢ
独厮守ぢ 2020-12-21 06:20

If I place, for instance, the following component and click it, it behaves as expected:

         


        
相关标签:
3条回答
  • 2020-12-21 06:44

    You can do it if you send a redirect.

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

    However, I completely fail to see the point/benefit of navigating using Ajax like that.

    0 讨论(0)
  • 2020-12-21 06:52

    If you have lots of ajax requests on your page then ajaxifying the command button's request mean's that all other validations (from other ajax requests) on the page will complete before navigation to the next page. Otherwise without the ajax request for the button the http request that it generates will blow away these other requests and just navigate directly to the next page without waiting for them to complete.

    0 讨论(0)
  • 2020-12-21 06:55

    From my understanding ajax is used to update components of the current page and not to navigate to other pages.

    0 讨论(0)
提交回复
热议问题