0
一個簡單的問題,但不記得如何做到最好。我想要的是在代碼段運行後自動將用戶發送到另一頁"/lecturer/marking/marking-section-two"
。如何添加導航到支持bean
是否有一種方法可以在後臺bean中執行此操作,而不會影響之前顯示的ajax消息?
這是我運行
public void markSectionOne() {
//supposing the data in markSectionOne is filled...
this.markingFacade.create(markSectionOne);
this.setMessage("Mark Saved");
//after saving...
markSectionOne = new Marking();
// now navigating to the next page
}
的代碼,一旦它的運行我想自動定位到一個新的一頁。
謝謝你們
將方法簽名更改爲'public String markSectionOne()'並返回重定向結果。結果可以註冊在** faces-config.xml中** <導航規則>' –