jsf 2 - Error the FacesContext is already released -


The following code is working with Request Scod Managed Beans and message P: Message Tags:

  FacesContext reference = FacesContext.getCurrentInstance (); Public zero addAction (if (commande.exists ()) {context.addMessage ("Commande", New FacesMessage (FacesMessage. SEVERITY_ERROR, "Error message: Commander exists", tap));} Else {commandeService.create () Command);}}   

When I try to use it in the scoped view managed bin, it returns an error message to the logger:

  FacesContext error is already in progress!   

The JSF page is not showing and the face message is not shown.

You never FacesContext The present allocation or any of its assets should be assigned as the property of Managed Bean. The current example is valid only in the current HTTP request, it is destroyed at the end of the HTTP request and is not valid in any subsequent HTTP requests .

You should always get the current frequency in the local area.

  add a public zero action () (if (command. Axis ()) {FacesContext.getCurrentInstance (). AddMessage ("Commande", New FacesMessage (FacesMessage.SEVERITY_ERROR, "Error message: Command exists", tap)); } Else {commandeService.create (command); }}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -