Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 faces-config.xml 的导航案例中使用 from-outcome 检索 to-view-id,我使用的是 JSF 1.2。请让我知道是否有内置方法或如何编写代码。提前致谢。
我不确定你到底想做什么,但你可以通过 JSF 中的服务器端代码获取 ViewID:
String viewId = getFacesContext().getViewRoot().getViewId();