首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

ADF 转入

2012-09-01 
ADF 转向Sometimes you want to perofrm some validations and based on the result, forward to other AD

ADF 转向

Sometimes you want to perofrm some validations and based on the result, forward to other ADF pages.

You can follow one of these following approches.

Approach I
/* Forward to page "myPage.jspx" */
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = fc.getApplication().getViewHandler().createView(fc, "/myPage.jspx");
fc.setViewRoot(viewRoot);
fc.renderResponse();

Approach II
/* Forward to the navigation rule "mypage" */
FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "mypage");

Approach III
/* Redirect to page myPage.jspx */
FacesContext.getCurrentInstance().getExternalContext().redirect(/myPage.jspx);

Approach I and II preserve the processScope

热点排行