JSF - how to send information to another page

1

I have orderList for the operator to select the client name. After selecting it, I need to direct it to another page with the client data. How do I pass information from the client that was selected to another xhtml page? What is the rationale for doing this?

    
asked by anonymous 04.05.2016 / 13:38

1 answer

1

You can use the parameters:

In XHTML

<p:commandButton title="EDITAR" action="/pagina?faces-redirect=true">
    <f:setPropertyActionListener target="#{flash.objeto}"
    value="#{listItem}" />
</p:commandButton>

No ManagedBean (Objeto)FacesContext.getCurrentInstance().getExternalContext().getFlash().get("objeto")

In this way the id will not be passed via url, so if your client reloads the page it will turn out without the data.

    
04.05.2016 / 22:34