Demoing some parts of how webslinger functions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@753091 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Adam Heath
2009-03-13 02:29:38 +00:00
parent 9057861730
commit 19c6b3f358
17 changed files with 52 additions and 8 deletions
@@ -0,0 +1,4 @@
webslinger.response.writer.println('groovy start')
println("groovy:This will appear on the console.")
webslinger.merge('Middle')
webslinger.response.writer.println('groovy end')
@@ -0,0 +1,5 @@
webslinger.getResponse().getWriter().println("java start");
System.err.println("java:This will appear on the console.");
webslinger.merge("Middle");
webslinger.getResponse().getWriter().println("java end");
return null;
@@ -0,0 +1 @@
Something in the middle of an event.
@@ -0,0 +1 @@
webslinger.response.writer.write("Howdy from groovy.")
@@ -0,0 +1,6 @@
<ul>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
<li><a href="#">Four</a></li>
</ul>
@@ -0,0 +1,3 @@
<p>
Page by itself, or merged inside another.
</p>
@@ -0,0 +1 @@
java.lang.String:SomeLeftMenu
@@ -0,0 +1 @@
java.lang.String:TwoColumn
@@ -0,0 +1 @@
This is the middle of a template.
@@ -0,0 +1,3 @@
velocity start
#Merge("Middle")
velocity end
@@ -0,0 +1,8 @@
<pre>
#Merge("Events/Groovy")
#Merge("Events/Java")
#Merge("Templates/Velocity")
</pre>
#Merge("Middle", "$ThemePath/Templates/Box/Blue")
#Merge("StandAlonePage")
@@ -0,0 +1,2 @@
#set($boxStyle = $webslinger.pathInfo.split("/").get(1))
<div class="box-$boxStyle">#Content()</div>
@@ -0,0 +1 @@
java.lang.String:true
@@ -0,0 +1,2 @@
#set($cause = $webslinger.planCause)
<div class="Editable" path="$cause.servletPath">#Content()</div>
@@ -0,0 +1,8 @@
<div class="TwoColumn">
<div class="TwoColumnLeft">
#Section("LeftMenu")
</div>
<div class="TwoColumnContent">
#Content("Editable")
</div>
</div>
@@ -0,0 +1 @@
java.lang.String:/Includes/DefaultMenu
@@ -1,12 +1,8 @@
<p>
This page is brought to you by Webslinger!
Front page.
</p>
<p>
It doesn't do a whole lot yet, but if you've gotten this far, here are the features that are available:
Look at the <a href="#viewurl("/Showcase/")">showcase</a>, and at a <a href="#viewurl("/Showcase/StandAlonePage")">standalone</a> page.
</p>
<ul>
<li>Extension mapper</li>
<li>janino/groovy event handler</li>
<li>velocity template markup</li>
<li>template/wrapper/section content split</li>
</ul>