How to open a dialog passing an object as a parameter in primefaces?

0

Good evening.

I'm having trouble opening a dialog by passing an object as a parameter.

Does anyone know how to solve this?

    
asked by anonymous 16.09.2014 / 04:54

1 answer

1

You have been very sparing in your question, but assuming you have a button and that button opens a dialog. To pass an object as a parameter, just do this:

<p:commandButton value="Abre Dialog"
                 onclick="PF('dialogWidget').show()"
                 update=":formDialog">
  <f:setPropertyActionListener target="#{nomeBean.objetoReceptor}" value="#{objetoASerPassado}" />
</p:commandButton>
    
16.09.2014 / 14:27