Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the problem of page navigation in JSF

Shulou Source: shulou.com Published: 2022-06-02 06:50:40 09月21日 Update

Today, I will talk to you about the problem of page navigation in JSF. Many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

My purpose is to tell you some minor problems and solutions that I usually encounter when working on a project. I hope my colleagues will not make the same mistake again. If you have any questions, please contact me by email, communicate with me and share them.

Let's get to the topic. Let's talk about a problem I solved today. Anyone who has used JSF knows that in JSF (a project that uses the JSF framework), the jump between pages is navigated through faces- config.xml files. Of course, you can do page jumps in other ways, but JSF doesn't recommend it. When doing page navigation, there is a "redirect" option, that is, "redirect". The code is as follows:

/ archives/admin/archivesAudit.jsp

AuditFinish

/ archives/admin/archivesBrowse.jsp

If you do not select this option, after jumping from the current page to another page, the address bar retains the requested URL,server as a forwarding action; if you select "redirect", the requested URL,server in the address bar will resend a requested URL. Of course, the rendered page is normal regardless of whether you make the "redirect" choice or not. However, if you are jumping from the add, modify, delete, etc. Pages to the list page. If you do not add "redirect" for navigation, when the list page is refreshed again after a successful submission, the action of the last submission will be performed again. The result is that the last addition, modification, or deletion will be done over and over again, and it is all the same data. Because the list page retains the same address as the last submitted URL, that's why the last committed action is performed. The solution is to add the "redirect" option when navigating the page!

After reading the above, do you have any further understanding of the problem of page navigation in JSF? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Page navigation question action content address selection again way time project previous same repeat the same theme between code reason just Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info vpn Shulou Information OPPO Reno Docker