I'm trying to implement the following function, when the user clicks the edit button, it would send to the "create" page only that populated. but when I try to do this, it sends but nothing.
In my xhtml is like this
<p:commandButton value="Deletar" icon="fa fa-fw fa-remove"
type="submmit" action="#{proprietarioBean.editar(proprietario)}"
update="form" styleClass="ui-icon ui-icon-pencil" >
<f:setPropertyActionListener target="#{proprietarioBean.proprietario}" value="#{proprietario}"/>
</p:commandButton>
In method editar
I'm only giving setProprietario
and redirect.
public String editar(Proprietario proprietario) {
setProprietario(proprietario);
setTelefones(telefoneService.buscar(getProprietario()));
return "inserirProprietario.xhtml";
}
As far as the setProprietario
line, the proprietario
object is not null
, so it should appear on the other side of the screen.