I have the following table, what I want to do is that when selecting a row, send me to another page to be able to show data according to the person you select in the table,
<h:form>
<p:dataTable var="consultaPersona" style="max-width:3000px;max-height:770px;" value="#{ConsultaPersonasUnidadFisicaComponent.listNivelesPersona}" emptyMessage="No se encontraron registros." selectionMode="single" selection="#{ConsultaPersonasUnidadFisicaComponent.nivelesPersona}"
rowKey="#{consultaPersona.persona.cveIdPersona}">
<p:ajax event="rowSelect" listener="#{ConsultaPersonasUnidadFisicaComponent.mostrarPantallaHorario}" />
<p:column headerText="No.Empleado">
<h:outputText value="#{consultaPersona.persona.noEmpleado}" />
</p:column>
<p:column headerText="RFC">
<h:outputText value="#{consultaPersona.persona.rfc}" />
</p:column>
<p:column headerText="Nombre">
<h:outputText value="#{consultaPersona.persona.nombre}" />
</p:column>
<p:column headerText="Ubicacion">
<h:outputText value="#{consultaPersona.unidadAdministrativa.cveIdUnidadAdmin}" />
</p:column>
<p:column headerText="Entrada">
<h:outputText />
</p:column>
<p:column headerText="Salida">
<h:outputText />
</p:column>
</p:dataTable>
</h:form>
I already select the rows, and I add a rowselect ajax, which calls the following method, but it does not do anything to me
public String mostrarPantallaHorario(SelectEvent event) {
return RUTA2;
}
How can I make it so that when I select the row, send me to another page?