本文介紹了“Back"的最佳實踐JSF 中的導航鏈接的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
制作返回"鏈接的最佳方式是什么,以便應用程序在導航后保持一致.
What is the best way to make "Back" links, so that the application stays consistent after navigation.
onclick="history.go(-1)"
.這非常有害嗎?- 使用支持 bean 中的堆棧彈出最后一個視圖的導航案例.您可以通過使用
<f:setPropertyActionListener>
設置導航案例來做到這一點. - 這些都不是……其他解決方案.
onclick="history.go(-1)"
. Is this very harmful?- Using a stack in a backing bean that pops you the navigation case of the last view. You can do this by setting the navigation case with
<f:setPropertyActionListener>
. - None of these... other solutions.
任何幫助將不勝感激!分享你的意見!丹尼爾
Any help would be appreciated! Share your thoughts! Daniel
推薦答案
我正在使用:
- MyFaces orchestra 用于提供對話范圍
<redirect/>
用于每個導航規則
- MyFaces orchestra for providing conversation scope
<redirect />
for each navigation rule
這確保在按下返回"按鈕或 history.go(-1)
時:
This ensures that on pressing the "back" button or history.go(-1)
:
- 上一個屏幕中可用的數據仍將存在(因為對話仍處于活動狀態)
- 重新提交"瀏覽器對話框不會打開.
附:反向鏈接"有不同的含義
這篇關于“Back"的最佳實踐JSF 中的導航鏈接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!