I have this piece of code:
<composite:interface componentType="nestedGridCellEditor">
<composite:attribute name="componentName" required="false" shortDescription="Name of the attribute to display in the id"/>
<composite:attribute name="action" required="false" targets="#{cc.attrs.componentName}button" shortDescription="A method expression or a string outcome to process when command is executed"/>
</composite:interface>
<composite:implementation>
<span id="#{cc.clientId}" style="display: flex;">
<p:commandButton id="#{cc.attrs.componentName}button"/>
</composite:implementation>
</span>
And I use it that way (I'm using it several of times, with a different componentName):
<sm:nestedGridCellEditor id="DateNGCE" componentName="Foo2101"
action="#{contractTermsBudgetController.updateRow('Date', budget)}"/>
What I want it to do is to use componentName inside the id of the component, and to put it inside the targets as well.
Right now it giving me an error about the targets and about the action method.
(i.e - "Unable to re-target MethodExpression as inner component referenced by target id 'button' cannot be found"
)
How can I do this?
EDIT
The purpose of this is because I'm using this composite inside several tables and I want to identify each button by its table's ID which should include the table name and not the clientId. That's why I need to pass the name through the componentName.