java从FacesContext获取Webflow requestScope值
我使用的是SWF(SpringWebFlow)2.2和JSF2.0.4
在flow.xml
中,我将变量设置到SpringWebFlow的requestScope中
<set name="requestScope.RE_RENDER_TABLE" value="true" type="java.lang.Boolean" />
但是,我需要在JSF中使用FacesContext
这个变量。我尝试了以下方法,但都返回null
FacesContext.getCurrentInstance().getExternalContext().getRequest();
FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("RE_RENDER_TABLE");
如何在JSF上下文中将requestScope变量添加到flow.xml
文件中
# 1 楼答案
或者尝试简单的#{RE_RENDER_TABLE}(在所有范围内)
# 2 楼答案
在xhtml中尝试
或者,在backing bean中: