Is there a way to pass an bean action as attribute of a custom tag which is inside ui:repeat
of my JSF 2.2 page?
<ui:repeat value="#{list}" var="item">
<custom:component action="#{abean.method}" id="#{item.id}"/>
</ui:repeat>
and then inside of custom tag :
<h:form>
#{id}
<h:commandButton value="say hi" action="#{action}"/>
</h:form>
This will give the error message :
action="#{action}": Identity 'action' was null and was unable to invoke
The id shows up, so if I understand correctly , my custom component is added once during the build time, then during the render time the component is being recycled for each item (thus assigning the correct id). However why action isn't interpreted as a parameter is beyond me and I'd like some clarification as to why. Is it I can only pass strings ?