- Revision
- 852
- Author
- mauro
- Date
- 2008-10-11 05:24:04 -0500 (Sat, 11 Oct 2008)
Log Message
Updated documentation for 1.3 release.
Modified Paths
- trunk/.classpath
- trunk/waffle-core/src/main/java/org/codehaus/waffle/view/DefaultViewResolver.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/view/ViewResolver.java
- trunk/waffle-distribution/src/site/content/download.html
- trunk/waffle-distribution/src/site/content/index.html
- trunk/waffle-distribution/src/site/content/release-notes.html
- trunk/waffle-distribution/src/site/content/views.html
- trunk/waffle-distribution/src/site/templates/skin.html
Diff
Modified: trunk/.classpath (851 => 852)
--- trunk/.classpath 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/.classpath 2008-10-11 10:24:04 UTC (rev 852) @@ -24,9 +24,8 @@ <classpathentry kind="src" output="examples/simple-example/target/test-classes" path="examples/simple-example/src/test/java"/> <classpathentry kind="src" output="examples/jruby-example/target/classes" path="examples/jruby-example/src/main/java"/> <classpathentry excluding="**" kind="src" output="examples/jruby-example/target/classes" path="examples/jruby-example/src/main/webapp"/> - <classpathentry kind="src" output="examples/jruby-example/target/classes" path="examples/jruby-example/src/main/ruby"/> + <classpathentry excluding="**" kind="src" output="examples/jruby-example/target/classes" path="examples/jruby-example/src/main/ruby"/> <classpathentry kind="src" output="examples/jruby-example/target/test-classes" path="examples/jruby-example/src/test/java"/> - <classpathentry kind="src" output="examples/jruby-example/target/test-classes" path="examples/jruby-example/src/test/ruby"/> <classpathentry kind="src" output="examples/freemarker-example/target/classes" path="examples/freemarker-example/src/main/java"/> <classpathentry excluding="**" kind="src" output="examples/freemarker-example/target/classes" path="examples/freemarker-example/src/main/resources"/> <classpathentry excluding="**" kind="src" output="examples/freemarker-example/target/classes" path="examples/freemarker-example/src/main/webapp"/>
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/view/DefaultViewResolver.java (851 => 852)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/view/DefaultViewResolver.java 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/view/DefaultViewResolver.java 2008-10-11 10:24:04 UTC (rev 852) @@ -13,11 +13,11 @@ import org.codehaus.waffle.controller.ControllerDefinition; /** - * The default ViewResolver simply returns the path of the View being resolved. + * The default ViewResolver returns the path of the View being resolved. * It holds the default values of the view properties configurable in the web.xml: * <ul> - * <il>"view.prefix": "/"</li> - * <il>"view.suffix": ".jspx"</li> + * <li>"view.prefix": "/"</li> + * <li>"view.suffix": ".jspx"</li> * <li>"errors.view": "errors"</li> * </ul> * and resolves a view path as [view.prefix][view.name][view.suffix], where the
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/view/ViewResolver.java (851 => 852)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/view/ViewResolver.java 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/view/ViewResolver.java 2008-10-11 10:24:04 UTC (rev 852) @@ -8,16 +8,18 @@ /** * The view resolver determines the path the next view. * The view resolver allows the configuration of view properties. - * The view properties contains the init-params configuration in the web.xml: + * Every implementation should hold default values for the + * properties configurable via init-params in the web.xml: * <ul> - * <il>"view.prefix"</li> - * <il>"view.suffix"</li> + * <li>"view.prefix"</li> + * <li>"view.suffix"</li> * <li>"errors.view"</li> * </ul> * as well as any optional mapping between controller names and view names. * * @author Michael Ward * @author Mauro Talevi + * @see DefaultViewResolver */ public interface ViewResolver {
Modified: trunk/waffle-distribution/src/site/content/download.html (851 => 852)
--- trunk/waffle-distribution/src/site/content/download.html 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-distribution/src/site/content/download.html 2008-10-11 10:24:04 UTC (rev 852) @@ -12,6 +12,7 @@ The stable releases of Waffle can be found on the <a href="" <ul> + <li><a href="" bin distribution</a> (11 Oct 2008)</li> <li><a href="" bin distribution</a> (10 Sep 2008)</li> <li><a href="" bin distribution</a> (7 May 2008)</li> <li><a href="" bin distribution</a> (19 January 2008)</li>
Modified: trunk/waffle-distribution/src/site/content/index.html (851 => 852)
--- trunk/waffle-distribution/src/site/content/index.html 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-distribution/src/site/content/index.html 2008-10-11 10:24:04 UTC (rev 852) @@ -7,6 +7,12 @@ <h2>News</h2> +<h3>October 11th, 2008</h3> + +<p> + Waffle 1.3 is released. +</p> + <h3>September 10th, 2008</h3> <p>
Modified: trunk/waffle-distribution/src/site/content/release-notes.html (851 => 852)
--- trunk/waffle-distribution/src/site/content/release-notes.html 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-distribution/src/site/content/release-notes.html 2008-10-11 10:24:04 UTC (rev 852) @@ -5,6 +5,20 @@ </head> <body> +<h1>Waffle - Version 1.3 (Oct 11, 2008)</h1> + +<h2> Improvement +</h2> +<ul> +<li>[<a href="" - Make controller-view mapping configurable +</li> +<li>[<a href="" - Add I18N support for Waffle exception messages +</li> +<li>[<a href="" - Allow multiple message resources configurable for a given locale +</li> +</ul> + + <h1>Waffle - Version 1.2 (Sep 10, 2008)</h1>
Modified: trunk/waffle-distribution/src/site/content/views.html (851 => 852)
--- trunk/waffle-distribution/src/site/content/views.html 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-distribution/src/site/content/views.html 2008-10-11 10:24:04 UTC (rev 852) @@ -6,9 +6,12 @@ <body> <h2>Views</h2> -<p>With Waffle you can write views with either <a href="" Server Pages (JSP)</a>, -<a href="" or <a href="" Other view technologies, like Tiles or -Sitemesh are compatible with Waffle (eg cf our Freemarker example).</p> +<p>With Waffle you can write views with either <a + href="" Server Pages (JSP)</a>, +<a href="" or <a + href="" Other view +technologies, like Tiles or Sitemesh are compatible with Waffle (eg cf +our Freemarker example).</p> <h3>Java Server Pages</h3> <p>Using Java Server Pages in Waffle is as easy as it is with other @@ -20,9 +23,9 @@ <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page"> <jsp:output doctype-root-element="html" - doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" - doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> - <jsp:directive.page contentType="text/html;charset=UTF-8"/> + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> + <jsp:directive.page contentType="text/html;charset=UTF-8" /> <head> <title>Waffle</title> @@ -62,8 +65,8 @@ </servlet> </textarea> -<p>Note that all view configuration <code>init-param</code>s are optional, -(and this is why they are left out in some of our examples).</p> +<p>Note that all view configuration <code>init-param</code>s are +optional, (and this is why they are left out in some of our examples).</p> <h3>FreeMarker</h3> <p>FreeMarker views can be written like any FreeMarker pages for @@ -71,9 +74,10 @@ documentation FreeMarker provides. Similarly to the JavaServer Pages definition above you will need to register the default view suffix accordingly for FreeMarker (typically <b>.ftl</b>).</p> -<p>You will need to register the <i>freemarker.ext.servlet.FreemarkerServlet</i> (or -<i>com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet</i> if using in conjunction with -<a href="" in the <i>web.xml</i>:</p> +<p>You will need to register the <i>freemarker.ext.servlet.FreemarkerServlet</i> +(or <i>com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet</i> +if using in conjunction with <a + href="" in the <i>web.xml</i>:</p> <textarea class="xml:nogutter:nocontrols" name="code"> <servlet> <servlet-name>freemarker</servlet-name> @@ -107,6 +111,29 @@ </servlet> </textarea> + +<h3>View-Controller Mapping</h3> + +<p>By default, Waffle uses the controller name as the view name, ie +a controller action invoked by "mycontroller.waffle" will be mapped to a +view "[view.prefix]mycontroller[view.suffix]", where the view prefix and +suffix can be configured via the servlet configuration in the web.xml, +as explained above.</p> + +<p>Waffle though aims by design to be highly configurable. The <b><a + href="" +org.codehaus.waffle.view.DefaultViewResolver</a></b> allows the user to fully +configure the view resolution. This is achieve via simply key/value +properties, which can be either view prefix or suffix keys or the name +of the controller. For example, to map "mycontroller.waffle" to, say, +"/ftl/mycontroller-view.ftl", we'd simply set in our registrar: <textarea + class="java:nogutter:nocontrols" name="code"> + ViewResolver viewResolver = registry.locateByKey(ViewResolver.class); + viewResolver.configureView("view.prefix", "/"); // this is the default + viewResolver.configureView("view.suffix", ".ftl"); + viewResolver.configureView("mycontroller", "ftl/mycontroller-view"); +</textarea></p> + </body> </html>
Modified: trunk/waffle-distribution/src/site/templates/skin.html (851 => 852)
--- trunk/waffle-distribution/src/site/templates/skin.html 2008-09-16 13:40:42 UTC (rev 851) +++ trunk/waffle-distribution/src/site/templates/skin.html 2008-10-11 10:24:04 UTC (rev 852) @@ -75,7 +75,7 @@ </div> <div class="clear"></div> <div id="footer"> -<div class="left">Last Published: 10 September 2008</div> +<div class="left">Last Published: 11 Oct 2008</div> <div class="right">© 2005-2008</div> <div class="clear"></div> </div>
To unsubscribe from this list please visit:
