0

I have the following code:

some_file.xhtml containing:

<ui:decorate template="template/a_template.xhtml">
    ...
    <ui:param name="doSmthg" value="#{aBean.someAction()}"/>
    ...
</ui:decorate>

And in the template file a_template.xhtml:

<p:commandLink id="anId" actionListener="#{doSmthg}" ...>

The issue here is that, aBean.someAction() is called normally but I've an error "Identity 'doSmthg' was null and was unable to invoke".

I don't have the error if I use directly actionListener="#{aBean.someAction()}" in the template though.

Does anyone have an idea ? Thx

ODT
  • 3
  • 2

1 Answers1

0

Try this:

Passthe name of the method as parameter:

 <ui:param name="doSmthgName" value="someAction"/>

and use it:

<p:commandLink id="anId" actionListener="#{bean[doSmthgName]}" ...>
David Mantilla
  • 228
  • 1
  • 10