public void encodeEnd(FacesContext facesContext,
UIComponent uiComponent) {
Buffer buffer = (Buffer)uiComponent;
HtmlBufferResponseWriterWrapper writer = (HtmlBufferResponseWriterWrapper) facesContext.getResponseWriter();
buffer.fill(writer.toString(), facesContext);
facesContext.setResponseWriter( writer.getInitialWriter() );
if( DummyFormUtils.getDummyFormParameters(facesContext) != null ){
try{ // Attempt to add the dummy form params (will not work with Sun RI)
if( DummyFormUtils.isWriteDummyForm(facesContext) )
DummyFormUtils.setWriteDummyForm(facesContext, true );
for(Iterator i = DummyFormUtils.getDummyFormParameters(facesContext).iterator() ; i.hasNext() ;)
DummyFormUtils.addDummyFormParameter(facesContext, i.next().toString() );
} catch (Exception e) {
log.warn("Dummy form parameters are not supported by this JSF implementation.");
}
}
}
|