Anonymous avatar Anonymous committed 88d3a32

updated javadoc (describe the writeComplete attribute)

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

Comments (0)

Files changed (1)

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

 
 /**
  * <!-- START SNIPPET: description -->
- *
- * Renders a view using the Freemarker template engine.  Alternatively, the
+ * 
+ * Renders a view using the Freemarker template engine. Alternatively, the
  * {@link com.opensymphony.webwork.dispatcher.ServletDispatcherResult
  * dispatcher} result type can be used in conjunction Webwork's {@link
  * FreemarkerServlet}.
  * The FreemarkarManager class configures the template loaders so that the
  * template location can be either
  * </p>
- *
+ * 
  * <ul>
- *
+ * 
  * <li>relative to the web root folder. eg <code>/WEB-INF/views/home.ftl</code>
  * </li>
  * 
  * <li>a classpath resuorce. eg <code>com/company/web/views/home.ftl</code></li>
- *
+ * 
  * </ul>
- *
+ * 
+ * <p>
+ * <b>NOTE (writeComplete 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
+ * don't want partial of the page to be writen and then exception occurred and
+ * we have 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.
+ * </p>
+ * 
  * <!-- END SNIPPET: description -->
- *
+ * 
  * <b>This result type takes the following parameters:</b>
- *
+ * 
  * <!-- START SNIPPET: params -->
- *
+ * 
  * <ul>
- *
+ * 
  * <li><b>location (default)</b> - the location of the template to process.</li>
- *
- * <li><b>parse</b> - true by default. If set to false, the location param will 
- * not be parsed for Ognl expressions.</li>
- *
+ * 
+ * <li><b>parse</b> - true by default. If set to false, the location param
+ * will not be parsed for Ognl expressions.</li>
+ * 
  * <li><b>contentType</b> - defaults to "text/html" unless specified.</li>
- *
+ * 
+ * <li><b>writeComplete</b> - default to false. If true, will only write to
+ * the response if the whole freemarker page could be rendered ok. </li>
+ * 
  * </ul>
- *
+ * 
  * <!-- END SNIPPET: params -->
- *
+ * 
  * <b>Example:</b>
- *
- * <pre><!-- START SNIPPET: example -->
- * &lt;result name="success" type="freemarker"&gt;foo.ftl&lt;/result&gt;
- * <!-- END SNIPPET: example --></pre>
+ * 
+ * <pre>
+ * &lt;!-- START SNIPPET: example --&gt;
+ *  &lt;result name=&quot;success&quot; type=&quot;freemarker&quot;&gt;foo.ftl&lt;/result&gt;
+ *  &lt;!-- END SNIPPET: example --&gt;
+ * </pre>
+ * 
  * @author CameronBraid
  */
 public class FreemarkerResult extends WebWorkResultSupport {
      * 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 don't want
-     * partial of the page to be writen and then exception occurred and we get 
+     * partial of the page to be writen and then exception occurred and we have 
      * 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.
      * 
                 	// 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 don't want
-                    // partial of the page to be writen and then exception occurred and we get 
+                    // partial of the page to be writen and then exception occurred and we have 
                     // 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 || 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.