本文介紹了“Back"的最佳實踐JSF 中的導(dǎo)航鏈接的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!
問題描述
制作返回"鏈接的最佳方式是什么,以便應(yīng)用程序在導(dǎo)航后保持一致.
What is the best way to make "Back" links, so that the application stays consistent after navigation.
onclick="history.go(-1)"
.這非常有害嗎?- 使用支持 bean 中的堆棧彈出最后一個視圖的導(dǎo)航案例.您可以通過使用
<f:setPropertyActionListener>
設(shè)置導(dǎo)航案例來做到這一點. - 這些都不是……其他解決方案.
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/>
用于每個導(dǎo)航規(guī)則
- 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)
:
- 上一個屏幕中可用的數(shù)據(jù)仍將存在(因為對話仍處于活動狀態(tài))
- 重新提交"瀏覽器對話框不會打開.
附:反向鏈接"有不同的含義
這篇關(guān)于“Back"的最佳實踐JSF 中的導(dǎo)航鏈接的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!