I have a DataTable in which I have multiple data and a select button. When I click on the select button I call a Dialog with a few more fields. I would like to click on the select button to get the object data and fill in the fields of this Dialog.
This is the method that generates Dialog:
@ManagedBean(name="dtBasicView")
@ViewScoped
public class ListaProcedimentosBean {
public void abrirDialogo() {
Map<String, Object> opcoes = new HashMap<>();
opcoes.put("modal", true);
opcoes.put("resizable", false);
opcoes.put("contentHeight", 670);
opcoes.put("contentWidth", 870);
RequestContext.getCurrentInstance().openDialog("procedimentosPesquisaCompleta", opcoes, null);
}
}
And here is the select button:
<p:column headerText="Opções">
<p:commandButton value="Selecionar" icon="ui-icon-search" action="#{dtBasicView.abrirDialogo}" process="@this">
</p:commandButton>
Can anyone help?