页面本身的JSF导航规则 [英] JSF Navigation Rule to the page itself

查看:116
本文介绍了页面本身的JSF导航规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何定义从#{current.doLogout}到同一视图ID的所有视图ID的导航规则?

How can I define a navigation rule from all view-ids from #{current.doLogout} to the same view-id?

推荐答案

如果您未定义任何内容或在操作方法中返回nullvoid,则默认情况下它将显示与表单所在页面相同的页面已提交.

If you don't define any or return null or void in action method, it will by default display the same page as where the form is been submitted.

public void doLogout() {
    // Logout.
}

这样,您就无需在faces-config.xml中摆弄导航案例. 您是否已经意识到新的JSF 2.0隐式导航"功能?

This way you don't need to fiddle with navigation cases in faces-config.xml. Are you by the way already aware of the new JSF 2.0 "implicit navigation" feature?

这篇关于页面本身的JSF导航规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆