RequestContext
is a utility class provided by PrimeFaces with the following features, which come in handy at times:
Update UI components from Managed Bean methods programmatically
Execute JavaScript from Managed Bean methods
Add AJAX callback parameters
ScrollTo a specific component after the AJAX update
The RequestContext
utility class can be used with both AJAX and Non-AJAX requests. We can also use the requestContext.isAjaxRequest()
method to determine whether the current request is an AJAX or Non-AJAX request.