Commits

tm_jee  committed 63b063d

WW-1458
- renamed 'writeCompleted' attribute to 'bufferOutput'

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2913573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 88d3a32

Comments (0)

Files changed (2)

File src/java/com/opensymphony/webwork/views/freemarker/FreemarkerResult.java

  * </ul>
  * 
  * <p>
- * <b>NOTE (writeComplete attribute):</b><br/>
+ * <b>NOTE (bufferOutput attribute):</b><br/>
  * Allow customization of either (when true) to write result to response
  * stream/writer only when everything is ok (without exception) or otherwise.
  * This is usefull when using Freemarker's "rethrow" exception handler, where we
  * 
  * <li><b>contentType</b> - defaults to "text/html" unless specified.</li>
  * 
- * <li><b>writeComplete</b> - default to false. If true, will only write to
+ * <li><b>bufferOutput</b> - default to false. If true, will only write to
  * the response if the whole freemarker page could be rendered ok. </li>
  * 
  * </ul>
     protected Configuration configuration;
     protected ObjectWrapper wrapper;
 
-    protected boolean writeCompleted = false;
+    protected boolean bufferOutput = false;
     
     /*
      * webwork results are constructed for each result execeution
         return pContentType;
     }
     
-    public void setWriteCompleted(boolean writeCompleted) {
-    	this.writeCompleted = writeCompleted;
+    public void setBufferOutput(boolean bufferedOutput) {
+    	this.bufferOutput = bufferedOutput;
     }
     
     /**
      * 
      * @return boolean
      */
-    public boolean getWriteCompleted() {
-    	return writeCompleted;
+    public boolean getBufferOutput() {
+    	return bufferOutput;
     }
     
 
                     // freemarker's "rethrow" exception handler to take over but its too late since 
                     // part of the response has already been 'commited' to the stream/writer.
                 	if (configuration.getTemplateExceptionHandler() == TemplateExceptionHandler.RETHROW_HANDLER || 
-                			getWriteCompleted()) {
+                			getBufferOutput()) {
                 		CharArrayWriter tempBuffer = new CharArrayWriter();
                 		template.process(model, tempBuffer);
                 		tempBuffer.flush();

File src/test/com/opensymphony/webwork/views/freemarker/FreemarkerResultTest.java

 			}
 		};
 		
-		result.setWriteCompleted(true);
+		result.setBufferOutput(true);
 		result.doExecute("/test.ftl", new MockActionInvocation());
 		
 		assertEquals(writer.getBuffer().toString(), "testing");
 			}
 		};
 		
-		result.setWriteCompleted(false);
+		result.setBufferOutput(false);
 		result.doExecute("/test.ftl", new MockActionInvocation());
 		
 		assertEquals(writer.getBuffer().toString(), "testing");