我在其他一个中包含.xhtml如下:
<ui:include src="/app/common/panels/task_list.xhtml">
<ui:param name="idObject" value="#{backingBeanRef['workGroup']['id']}" />
<ui:param name="className" value="#{backingBeanRef['workGroup']['class']['name']}" />
<ui:param name="backingBeanRef" value="#{tTaskQueryBean}" />
</ui:include>
为了从我的Bean中获取它,如下所示:
FacesContext fc = FacesContext.getCurrentInstance();
String className = (String) fc.getApplication().evaluateExpressionGet(fc, "#{className}", String.class);
但它返回&#34; &#34;尽管在我做#{className}
时在视图中显示有谁知道如何解决这个问题?
提前致谢
编辑:我已经尝试过this但是它会抛出NullPointerException