I am a beginner in the world java and java web, starting with jsf, primefaces and I have a problem that I can not solve. I have a dataTable listing some data, I have the ajax event to select a field in the table and an edit button. when doing this it should open a modal window with the data to do the editing, which I can not do.
Modal window code:
public void abrirDialogo() {
Map<String, Object> options = new HashMap<>();
options.put("modal", true);
options.put("resizable", false);
options.put("width", 400);
options.put("height", 300);
RequestContext.getCurrentInstance().openDialog("frmEstadosMan", options, null);
}
Event code ajax
<p:ajax event="rowSelect"/>
Edit button code
<p:commandButton title="Editar" value="Editar" icon="fa fa-edit"
action="#{estadosBean.abrirDialogoEdt}" process="@this">
<f:setPropertyActionListener target="#{estadosBean.estado}" value="#{estado}" />
</p:commandButton>
Sometimes I've edited the code, the edit window has opened, but it's empty, without the grid line data that was selected.