how to select a record in a table and get the selected value to display it?

0

I have the following table, and I want that when selecting a record in the action button a modal appears, and that in that modal the info of the regstro that I select is shown

<p:dataTable id="detalle" var="detalle" styleClass="columns" value="#{RegistroAccesoComponent.fechasIncidencias}" emptyMessage="No se encontraron registros.">


  <p:column headerText="FECHA" style="width: 100px;">
    <h:outputText value="#{detalle.fecha}">
      <f:convertDateTime type="date" pattern="dd/MM/yyyy" />
    </h:outputText>
  </p:column>

  <p:column headerText="ENTRADA" style="width: 100px;">
    <h:outputText value="#{detalle.incidencia.horaEntrada}">
      <f:convertDateTime type="date" timeZone="CST" pattern="HH:mm:ss" />
    </h:outputText>

  </p:column>
  <p:column headerText="SALIDA" style="width: 100px;">
    <h:outputText value="#{detalle.incidencia.horaSalida}">
      <f:convertDateTime type="date" timeZone="CST" pattern="HH:mm:ss" />
    </h:outputText>
  </p:column>
  <p:column headerText="INCIDENCIA">
    <h:outputText value="#{detalle.incidencia.incidencias.cveIdIncidencia} - #{detalle.incidencia.incidencias.concepto}" />
  </p:column>
  <p:column headerText="ACCIÓN" style="width: 100px;">
    <p:commandButton icon="ui-icon-search" oncomplete="PF('modalIntentos').show()" styleClass="element-button green hacia-izquierda" style="margin-right: 5em;" title="View">

    </p:commandButton>
  </p:column>
</p:dataTable>

for example in the date field, it shows all the days of the month in the format dd / MM / YYYY, so if I select day 1, in the modal I see DIA: 01/03/2018, but I want to recover that value and see it in the back

    
asked by Root93 16.03.2018 в 18:53
source

0 answers