0

我想用调用相同锚的 < h:commandLink > 替换调用锚 < a href="#deleteModal" > 的普通链接。怎么做?

谢谢你的帮助。

<p:dataTable 
    id="locationTable"
    var="row"
    value="#{locationListBackingBean.list()}" 
    paginator="true" 
    rows="10"
    lazy="true"
    rowsPerPageTemplate="10,30,50"
    paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">

    <p:column headerText="#">
        <h:outputText styleClass="id" style="" value="#{row.locationId}"/>
    </p:column>

    <p:column headerText="Elminar">
        <a href="#deleteModal" id="remove" data-toggle="modal">
            <h:graphicImage styleClass="icon-remove" />
        </a>

        <!-- Dialog to confirm delete function. -->
        <div class="modal hide fade" id="deleteModal" role="dialog" aria-labelledby="deleteModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h3 id="deleteModalLabel">Eliminar</h3>
        </div>
        <div class="modal-body">
            <p>Está seguro que desea eliminar el registro seleccionado?</p>
        </div>
        <div class="modal-footer">
            <h:commandButton styleClass="btn" value="Cancelar" data-dismiss="modal" aria-hidden="true"/>
            <h:commandButton styleClass="btn btn-primary" value="Aceptar" action="#{locationListBackingBean.remove(row.locationId, row.recordVersion)}"/>
        </div>
        </div>
    </p:column>
</p:dataTable>
4

0 回答 0