从java managedBean获取ui:param

时间:2017-04-07 10:43:05

标签: java jsf javabeans facelets

我在其他一个中包含.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

0 个答案:

没有答案