0
I have a Datatable in which I have several data and a select button. When I click the select button I call a Dialog with a few more fields. I would like to click on the button select it to take the data of the Object and fill in the fields of this Dialog.
This is the method that generates the 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>
Anyone can help?
Good, for that the best is to follow the example of the showcase of the first faces http://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml .
– jrabasilio