java/primefaces将remoteCommand和commandButton转换为compositeComponent

java/primefaces将remoteCommand和commandButton转换为compositeComponent,java,Java,我正在尝试创建dataTable的compositeComponent,但我无法将remoteCommand和commandButton放在该组合中。我的代码如下: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core"

我正在尝试创建dataTable的compositeComponent,但我无法将remoteCommand和commandButton放在该组合中。我的代码如下:

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:composite="http://java.sun.com/jsf/composite"
xmlns:p="http://primefaces.org/ui">
<composite:interface>
<composite:attribute name="var" />
<composite:attribute name="value" />
<composite:attribute name="newLine" />
<composite:facet name="header" />
<composite:facet name="footer" />
    </composite:interface>
    <composite:implementation>
<h:outputScript name="js/helper.js" />
<p:dataTable value="#{cc.attrs.value}" rowIndexVar="row">
    <c:set target="#{component}" property="var" value="#{cc.attrs.var}" />
    <composite:insertFacet name="header" />
    <p:column>
        <h:outputText value="#{row + 1}" />
        <p:remoteCommand action="#{contatoController.crud.save}"
            name="ajax#{row}">
                <f:setPropertyActionListener                                          target="#{contatoController.crud.row}" value="#{contato}" />
        </p:remoteCommand>
    </p:column>
    <composite:insertChildren />
    <p:column>
        <p:commandButton ajax="false" title="Alterar" icon="ui-icon-trash"
            action="#{contatoController.crud.delete}" process="@this">
    <f:setPropertyActionListener target="#           {contatoController.crud.row}"
                value="#{cc.attrs.var}" />
        </p:commandButton>
    </p:column>
    <composite:insertFacet name="footer" />
</p:dataTable>

单击ManagedBean中的值时,它是一个字符串,我在属性上传递var,但应该从dataTable行到达对象。 有人能帮我吗