use of org.primefaces.csp.CspPartialResponseWriter in project primefaces by primefaces.
the class PrimePartialViewContext method getPartialResponseWriter.
@Override
public PartialResponseWriter getPartialResponseWriter() {
if (writer == null) {
PartialResponseWriter parentWriter = getWrapped().getPartialResponseWriter();
writer = new PrimePartialResponseWriter(parentWriter);
FacesContext context = FacesContext.getCurrentInstance();
PrimeConfiguration config = PrimeApplicationContext.getCurrentInstance(context).getConfig();
if (config.isCsp()) {
writer = new CspPartialResponseWriter(writer, context, PrimeFacesContext.getCspState(context));
}
}
return writer;
}
Aggregations