0
I’m a beginner in the java and java web world, starting with jsf, primefaces and I’m having a problem that I’m not able to solve. I have a datatable listing some data, I have the ajax event to select a field in the table and an edit button. in doing so it should open a modal window with the data to do the editing, which I am unable to do.
Code of modal window:
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);
}
Code for the ajax event
<p:ajax event="rowSelect"/>
Code of the edit button
<p:commandButton title="Editar" value="Editar" icon="fa fa-edit"
action="#{estadosBean.abrirDialogoEdt}" process="@this">
<f:setPropertyActionListener target="#{estadosBean.estado}" value="#{estado}" />
</p:commandButton>
In some times when I edited the code, the editing window even opened, but empty, without the data of the grid line that was selected.
Yes friend, but the way I’m doing it is not with p <p:dialog>, but with the framework of the primefaces, different method of opening modal windows.
– Marcelo