0

I'm including a .xhtml in other one as follows:

<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>

In order to get it from my Bean as follows:

FacesContext fc = FacesContext.getCurrentInstance();
String className = (String) fc.getApplication().evaluateExpressionGet(fc, "#{className}", String.class);

But it returns " " in despite of being showed in the view when I do #{className}

Does anyone know how can I solve this?

Thanks in advance

EDIT : I have already tried to do this but it throws NullPointerException

Community
  • 1
  • 1
Aldeguer
  • 801
  • 10
  • 31
  • 2
    Possible duplicate of [How to access ui:param value in the managed bean](http://stackoverflow.com/questions/12533865/how-to-access-uiparam-value-in-the-managed-bean) – axemoi Apr 07 '17 at 14:04
  • You are aware that just stating 'it throws NPE' makes it kind of difficult to help. Then it would be a duplicate of http://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it – Kukeltje Apr 10 '17 at 07:51
  • @Kukeltje, I just cannot access the code right now in order to debug it again and remember which was exactly the trouble and that's what I remember, this line : FaceletContext faceletContext = (FaceletContext) FacesContext.getCurrentInstance().getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY); returned null so I got a NPE in the next one. I will try to be more specific as soon as I can – Aldeguer Apr 10 '17 at 07:55

0 Answers0