<f: setPropertyActionListener> Parent does not have an ActionSource type, type: com.sun.faces.component.PassthroughElement
I am using Passthrough elements in my JSF project and you need to do something similar to this:
<h:commandLink action="#{myBean.acao()}" value="click me">
<f:setPropertyActionListener target="#{myBean.object}" value="#{localObject}"/>
</h:commandLink>
but using Passthrough elements to have more control over my interface, as shown below:
<a href="#" jsf:action="#{myBean.acao()}">click me
<f:setPropertyActionListener target="#{myBean.object}" value="#{localObject}"/>
</a>
but apparently this does not work, the following error message appears:
<f:setPropertyActionListener> Parent is not of type ActionSource, type is: com.sun.faces.component.PassthroughElement
Does anyone know how I can solve this?
+4
1 answer
Looks like a bug in your version of Mojarra. It works for me with the latest version 2.2.12.
, EL 2.2 . . // EL. , , , #{myBean.acao()}, -, EL ( EL 2.2).
<a href="#" jsf:action="#{myBean.acao(localObject)}">click me</a>
, . action, AbortProcessingException , , . actionListener, a jsf:actionListener.
<a href="#" jsf:actionListener="#{myBean.setObject(localObject)}" jsf:action="#{myBean.acao}">click me</a>
+3