javax.faces.context FacesContext responseComplete is a method that allows to indicate that the JSF view processing for the current request has finished and any rendered response should be returned to the client. This method can be used to skip processing of remaining lifecycle phases when a certain condition is met, such as success or failure of an action.
This will stop any further processing of the current JSF view and return the current response to the client.
2. Example in action method:
public String submit() { // business logic if (success) { return "success"; } else { FacesContext.getCurrentInstance().getResponseComplete(); return null; } }
In this example, if success condition is not met, the responseComplete method will be called and the view processing will be stopped.
Package Library:
javax.faces.context is part of JavaServer Faces (JSF) technology, which is a Java-based web application framework for building component-based user interfaces for web applications. It is part of the Java EE (Enterprise Edition) platform and comes with its own set of standard components, lifecycle phases and processing rules.
Java FacesContext.responseComplete - 30 examples found. These are the top rated real world Java examples of javax.faces.context.FacesContext.responseComplete extracted from open source projects. You can rate examples to help us improve the quality of examples.