diff --git a/.gitignore b/.gitignore
index 00e7b2c5..56ff9020 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,4 +26,5 @@ out
gradle-app.setting
spring-binding/src/main/java/META-INF/
spring-faces/src/main/java/META-INF/
+spring-js-resources/src/main/java/META-INF/
spring-webflow/src/main/java/META-INF/
diff --git a/build.gradle b/build.gradle
index 488cb119..293b8b9b 100644
--- a/build.gradle
+++ b/build.gradle
@@ -45,6 +45,10 @@ subprojects { subproject ->
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
+}
+
+configure(subprojects.findAll {
+ it.name != "spring-build-src" && it.name != "spring-js-resources"}) { subproject ->
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
@@ -131,7 +135,6 @@ subprojects { subproject ->
project("spring-binding") {
description = "Spring Binding"
-
}
project("spring-webflow") {
@@ -188,6 +191,16 @@ project("spring-faces") {
}
}
+project("spring-js-resources") {
+ description = "Spring JS Resources"
+
+ apply from: "spring-js-resources.gradle"
+
+ jar {
+ dependsOn prepareResources
+ }
+}
+
configure(rootProject) {
description = "Spring Web Flow"
diff --git a/settings.gradle b/settings.gradle
index db798d64..30428e63 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,5 +1,6 @@
rootProject.name = 'webflow'
include 'spring-binding'
-include 'spring-faces'
include 'spring-webflow'
+include 'spring-faces'
+include 'spring-js-resources'
diff --git a/spring-js-resources/dojo-build/README.txt b/spring-js-resources/dojo-build/README.txt
new file mode 100644
index 00000000..823f4fe8
--- /dev/null
+++ b/spring-js-resources/dojo-build/README.txt
@@ -0,0 +1,3 @@
+
+This directory contains the custom build of Dojo that distributed with Spring JavaScript.
+See ../scripts/dojo/README.txt for details.
diff --git a/spring-js-resources/dojo-build/dojo-build.zip b/spring-js-resources/dojo-build/dojo-build.zip
new file mode 100644
index 00000000..d79afbf3
Binary files /dev/null and b/spring-js-resources/dojo-build/dojo-build.zip differ
diff --git a/spring-js-resources/scripts/dojo/README.txt b/spring-js-resources/scripts/dojo/README.txt
new file mode 100644
index 00000000..82a7b6ae
--- /dev/null
+++ b/spring-js-resources/scripts/dojo/README.txt
@@ -0,0 +1,15 @@
+
+Use the script in this directory to upgrade the version of Dojo bundled with spring-js.
+
+Upgrade procedures:
+ 1) Open build.properties and modify the dojo.version property
+ 2) Run 'ant clean' from this directory
+ 3) Run 'ant'
+ 4) Commit changes in build-spring-js/dojo-build directory
+
+Notes:
+Step 3) above creates a dojo-build.zip and copies it to build-spring-js/dojo-build.
+The file dojo-build.zip is then used during the spring-js build to bundle Dojo.
+
+
+
diff --git a/spring-js-resources/scripts/dojo/build.properties b/spring-js-resources/scripts/dojo/build.properties
new file mode 100644
index 00000000..2d77d6f5
--- /dev/null
+++ b/spring-js-resources/scripts/dojo/build.properties
@@ -0,0 +1,4 @@
+
+dojo.version=1.5.0
+dojo.download.url=http://download.dojotoolkit.org/release-${dojo.version}/dojo-release-${dojo.version}-src.zip
+dojo.profile=standard.profile.js
diff --git a/spring-js-resources/scripts/dojo/build.xml b/spring-js-resources/scripts/dojo/build.xml
new file mode 100644
index 00000000..9c3b904b
--- /dev/null
+++ b/spring-js-resources/scripts/dojo/build.xml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-js-resources/scripts/dojo/standard.profile.js b/spring-js-resources/scripts/dojo/standard.profile.js
new file mode 100644
index 00000000..3c2f4d8a
--- /dev/null
+++ b/spring-js-resources/scripts/dojo/standard.profile.js
@@ -0,0 +1,77 @@
+dependencies ={
+ //Strip all console.* calls except console.warn and console.error. This is basically a work-around
+ //for trac issue: http://bugs.dojotoolkit.org/ticket/6849 where Safari 3's console.debug seems
+ //to be flaky to set up (apparently fixed in a webkit nightly).
+ //But in general for a build, console.warn/error should be the only things to survive anyway.
+ stripConsole: "normal",
+
+ layers: [
+ {
+ name: "dojo.js",
+ dependencies: [
+ "dijit.Dialog",
+ "dijit.form.CurrencyTextBox",
+ "dijit.form.DateTextBox"
+ ]
+ },
+
+ // Now add layers from Dojo's standard.profile.js:
+ // http://svn.dojotoolkit.org/src/util/trunk/buildscripts/profiles/standard.profile.js
+
+ {
+ name: "../dijit/dijit.js",
+ dependencies: [
+ "dijit.dijit"
+ ]
+ },
+ {
+ name: "../dijit/dijit-all.js",
+ layerDependencies: [
+ "../dijit/dijit.js"
+ ],
+ dependencies: [
+ "dijit.dijit-all"
+ ]
+ },
+ {
+ name: "../dojox/grid/DataGrid.js",
+ dependencies: [
+ "dojox.grid.DataGrid"
+ ]
+ },
+ {
+ name: "../dojox/gfx.js",
+ dependencies: [
+ "dojox.gfx"
+ ]
+ },
+ // FIXME:
+ // we probably need a better structure for this layer and need to
+ // add some of the most common themes
+ {
+ name: "../dojox/charting/widget/Chart2D.js",
+ dependencies: [
+ "dojox.charting.widget.Chart2D",
+ "dojox.charting.widget.Sparkline",
+ "dojox.charting.widget.Legend"
+ ]
+ },
+ {
+ name: "../dojox/dtl.js",
+ dependencies: [
+ "dojox.dtl",
+ "dojox.dtl.Context",
+ "dojox.dtl.tag.logic",
+ "dojox.dtl.tag.loop",
+ "dojox.dtl.tag.date",
+ "dojox.dtl.tag.loader",
+ "dojox.dtl.tag.misc",
+ "dojox.dtl.ext-dojo.NodeList"
+ ]
+ }
+ ],
+ prefixes: [
+ [ "dijit", "../dijit" ],
+ [ "dojox", "../dojox" ]
+ ]
+};
diff --git a/spring-js-resources/spring-js-resources.gradle b/spring-js-resources/spring-js-resources.gradle
new file mode 100644
index 00000000..26e79392
--- /dev/null
+++ b/spring-js-resources/spring-js-resources.gradle
@@ -0,0 +1,42 @@
+configurations {
+ shrinksafe
+}
+
+dependencies {
+ shrinksafe "org.dojotoolkit:dojo-shrinksafe:1.7.2"
+}
+
+task prepareResources(type: Jar) { jar ->
+ doLast() {
+ minify("Spring.js")
+ minify("Spring-Dojo.js")
+ ant.unzip(src: "${projectDir}/dojo-build/dojo-build.zip",
+ dest: "${buildDir}/resources/main/META-INF/web-resources")
+ }
+}
+
+void minify(fileName) {
+
+ project.ant {
+ def sourceDir = "${basedir}/src/main/resources/META-INF/web-resources/spring/"
+ def outputDir = "${buildDir}/resources/main/META-INF/web-resources/spring/"
+
+ copy(file: "${outputDir}/${fileName}", tofile: "${outputDir}/${fileName}.uncompressed.js")
+
+ java(classname: "org.dojotoolkit.shrinksafe.Main",
+ classpath: configurations.shrinksafe.asPath, fork: true,
+ output: "${outputDir}/${fileName}.TMP.js") {
+ arg(value: "${sourceDir}/${fileName}")
+ }
+
+ move(file: "${outputDir}/${fileName}.TMP.js", toFile: "${outputDir}/${fileName}") {
+ filterchain {
+ filterreader(classname: "org.apache.tools.ant.filters.StripLineBreaks")
+ }
+ filterchain {
+ concatfilter(prepend: "${basedir}/../src/dist/javascript-copyright.txt")
+ }
+ }
+ }
+}
+
diff --git a/spring-js-resources/src/main/java/.gitignore b/spring-js-resources/src/main/java/.gitignore
new file mode 100644
index 00000000..e69de29b
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/forms.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/forms.css
new file mode 100644
index 00000000..3b3e47ef
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/forms.css
@@ -0,0 +1,134 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* FORM ELEMENTS */
+ form {
+ margin:0;
+ padding:0;
+ }
+ form div,
+ form p {
+ margin: 0 0 1em 0;
+ padding: 0;
+
+ font-size: 1em;
+ }
+ label {
+ font-weight: bold;
+ }
+ fieldset {
+ padding: 5px 10px;
+ margin: 0 0 1.5em 0;
+
+ border: 1px solid #eee;
+ }
+ fieldset legend {
+ margin: 0 0 0 0px;
+ padding: 0;
+
+ font-size: 1.1em;
+ font-weight: bold;
+
+ color: #666;
+ background-color: white;
+ }
+ * html fieldset legend {
+ margin: 0 0 10px -10px;
+ }
+ fieldset ul {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ list-style: none;
+ }
+ fieldset ul li {
+ margin: 0 0 0.5em 0;
+ padding: 0;
+
+ list-style: none;
+ }
+ input, select, textarea {
+ margin: 0;
+ padding: 2px;
+
+ font-size: 1em;
+ font-family: arial, helvetica, verdana, sans-serif;
+ }
+
+ input, select {
+ vertical-align: middle;
+ }
+ textarea {
+ width: 200px;
+ height: 8em;
+ }
+
+ input.check {
+ width: auto;
+ height: auto;
+
+ margin: 0;
+
+ border: none;
+ }
+ input.radio {
+ width: auto;
+
+ height: auto;
+ margin: 0;
+
+ border: none;
+ }
+ input.file {
+ width: 250px;
+ height: auto;
+ }
+ input.readonly {
+ background-color: transparent;
+ border: none;
+ }
+ input.button {
+ width: 10em;
+
+ background-color: #ddd;
+ border: 1px solid black;
+ }
+ input.image {
+ width: auto;
+ height: auto;
+
+ border: none;
+ }
+
+ form div.submit {
+ margin: 1em 0;
+ }
+ form div.submit input {
+ width: 15em;
+ height: 2em;
+ }
+/* END FORM ELEMENTS */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-1col.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-1col.css
new file mode 100644
index 00000000..7f3de7b4
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-1col.css
@@ -0,0 +1,52 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-horizontal.css");
+
+/* NAV BAR AT THE TOP AND ONE COLUMN OF CONTENT */
+ div#content {
+ position: relative;
+ width: 701px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ width: 100%;
+ }
+ div#local {
+ display: none;
+ }
+ div#sub {
+ display: none;
+ }
+ div#nav {
+ display: none;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-1col.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-1col.css
new file mode 100644
index 00000000..9840d71c
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-1col.css
@@ -0,0 +1,56 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-vertical.css");
+
+/* NAV BAR ON THE LEFT AND ONE COLUMN OF CONTENT */
+ div#content {
+ position: relative;
+ width: 780px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ float: right;
+ width: 560px;
+ display: inline;
+ }
+ div#local {
+ display: none;
+ }
+ div#sub {
+ display: none;
+ }
+ div#nav {
+ float: left;
+ width: 200px;
+ display: inline;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-2col.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-2col.css
new file mode 100644
index 00000000..a2fa6061
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navleft-2col.css
@@ -0,0 +1,64 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-vertical.css");
+
+/* NAV BAR ON THE LEFT AND TWO COLUMNS OF CONTENT */
+ div#content {
+ position: relative;
+ width: 780px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ float: right;
+ width: 340px;
+ display: inline;
+
+ margin-right: 220px;
+ margin-left: -220px;
+ }
+ div#local {
+ display: none;
+ }
+ div#sub {
+ float: right;
+ width: 200px;
+ display: inline;
+
+ margin-right: -340px;
+ margin-left: 200px;
+ }
+ div#nav {
+ float: left;
+ width: 200px;
+ display: inline;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-1col.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-1col.css
new file mode 100644
index 00000000..635494b7
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-1col.css
@@ -0,0 +1,57 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-horizontal.css");
+
+/* NAV BAR AT THE TOP AND ONE COLUMN OF CONTENT */
+ div#content {
+ position: relative;
+ width: 701px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ width: 100%;
+ }
+ div#local {
+ width: 100%;
+ }
+ div#sub {
+ width: 100%;
+ }
+ div#nav {
+ position: absolute;
+ top: -15px;
+ left: 0;
+ width: 100%;
+
+ text-align: left;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-3col.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-3col.css
new file mode 100644
index 00000000..599fa997
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-3col.css
@@ -0,0 +1,68 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-horizontal.css");
+
+/* NAV BAR AT THE TOP, LOCAL NAV ON THE LEFT AND TWO COLUMNS OF CONTENT */
+ div#content {
+ position: relative;
+ width: 701px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ float: left;
+ width: 300px;
+ display: inline;
+
+ margin-right: -200px;
+ margin-left: 200px;
+ }
+ div#sub {
+ float: right;
+ width: 180px;
+ display: inline;
+ }
+ div#local {
+ float: left;
+ width: 180px;
+ display: inline;
+
+ margin-left: -300px;
+ }
+ div#nav {
+ position: absolute;
+ top: -15px;
+ left: 0;
+ width: 701px;
+
+ text-align: left;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-localleft.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-localleft.css
new file mode 100644
index 00000000..1cf0c61d
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-localleft.css
@@ -0,0 +1,61 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-horizontal.css");
+
+/* NAV BAR AT THE TOP, LOCAL NAVIGATION ON THE LEFT AND ONE COLUMN OF CONTENT */
+ div#content {
+ position: relative;
+ width: 701px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ float: right;
+ width: 500px;
+ display: inline;
+ }
+ div#local {
+ float: left;
+ width: 200px;
+ display: inline;
+ }
+ div#sub {
+ display: none;
+ }
+ div#nav {
+ position: absolute;
+ top: -15px;
+ left: 0;
+ width: 100%;
+
+ text-align: left;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-subright.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-subright.css
new file mode 100644
index 00000000..47384ca1
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout-navtop-subright.css
@@ -0,0 +1,61 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+@import url("nav-horizontal.css");
+
+/* NAV BAR AT THE TOP AND TWO COLUMNS OF CONTENT */
+ div#content {
+ position: relative;
+ width: 701px;
+
+ margin: 0 auto 20px auto;
+ padding: 0;
+
+ text-align: left;
+ }
+ div#main {
+ float: left;
+ width: 480px;
+ display: inline;
+ }
+ div#sub {
+ float: right;
+ width: 200px;
+ display: inline;
+ }
+ div#local {
+ display: none;
+ }
+ div#nav {
+ position: absolute;
+ top: -15px;
+ left: 0;
+ width: 100%;
+
+ text-align: left;
+ }
+/* END CONTENT */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout.css
new file mode 100644
index 00000000..b6f3cfe0
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/layout.css
@@ -0,0 +1,152 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* SITE SPECIFIC LAYOUT */
+ body {
+ margin: 0;
+ padding: 0;
+
+ text-align: center;
+
+ background: white;
+ }
+ div#page {
+ width: 780px;
+
+ margin: 0 auto;
+ padding: 0;
+
+ text-align: center;
+
+ background: white;
+ }
+
+ /* HEADER */
+ div#header {
+ margin: 0 0 5em 0;
+ padding: 40px 20px;
+
+ color: white;
+ background: black;
+
+ text-align: left;
+ }
+ div#branding {
+ float: left;
+ width: 40%;
+
+ margin: 0;
+ padding: 10px 0 10px 20px;
+
+ text-align: left;
+ }
+ div#search {
+ float: right;
+ width: 49%;
+
+ margin: 0;
+ padding: 16px 20px 0 0;
+
+ text-align: right;
+ }
+ /* END HEADER */
+
+
+ /* CONTENT */
+ div#content {
+
+ }
+
+ /* MAIN */
+ div#main {
+
+ }
+ /* END MAIN */
+
+ /* SUB */
+ div#sub {
+
+ }
+ /* END SUB */
+
+ /* END CONTENT */
+
+
+ /* FOOTER */
+ div#footer {
+ color: white;
+ background-color: black;
+ }
+ div#footer p {
+ margin: 0;
+ padding: 15px;
+
+ font-size: 0.8em;
+ }
+ /* END FOOTER */
+/* END LAYOUT */
+
+
+/* UL.SUBNAV */
+ ul.subnav {
+ margin: 0;
+ padding: 0;
+
+ font-size: 0.8em;
+ list-style: none;
+ }
+ ul.subnav li {
+ margin: 0 0 1em 0;
+ padding: 0;
+
+ list-style: none;
+ }
+ ul.subnav li a,
+ ul.subnav li a:link,
+ ul.subnav li a:visited,
+ ul.subnav li a:active {
+ text-decoration: none;
+ font-weight: bold;
+
+ color: black;
+ }
+ ul.subnav li a:hover {
+ text-decoration: underline;
+ }
+ ul.subnav li strong {
+ padding: 0 0 0 12px;
+
+ background: url("../i/subnav-highlight.gif") left top no-repeat transparent;
+ }
+ ul.subnav li strong a,
+ ul.subnav li strong a:link,
+ ul.subnav li strong a:visited,
+ ul.subnav li strong a:active {
+ color: white;
+ background-color: black;
+ }
+/* END UL.SUBNAV */
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-horizontal.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-horizontal.css
new file mode 100644
index 00000000..2af4f2bc
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-horizontal.css
@@ -0,0 +1,105 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* NAV */
+ div#nav {
+ font-size: 0.8em;
+ }
+ * html div#nav {
+ /* hide ie/mac \*/
+ height: 1%;
+ /* end hide */
+ }
+ div#nav div.wrapper {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ }
+ div#nav ul {
+ width: 100%;
+
+ margin: 0;
+ padding: 0;
+
+ line-height: 1em;
+ list-style: none;
+ }
+ div#nav li {
+ float: left;
+ display: inline;
+
+ margin: 0;
+ padding: 0;
+
+ list-style: none;
+
+ line-height: 1em;
+ border-right: 1px solid #aaa;
+ }
+ div#nav li.last {
+ border-right: none;
+ }
+ div#nav a,
+ div#nav a:link,
+ div#nav a:active,
+ div#nav a:visited {
+ display: inline-block;
+ /* hide from ie/mac \*/
+ display: block;
+ /* end hide */
+
+ margin: 0;
+ padding: 5px 38px 5px 38px;
+
+ font-weight: bold;
+ text-decoration: none;
+
+ color: black;
+ background: #ddd;
+ }
+ div#nav a:hover {
+ text-decoration: underline;
+ }
+ div#nav strong {
+ display: inline-block;
+ /* hide from ie/mac \*/
+ display: block;
+ /* end hide */
+
+ color: white;
+ background: black;
+ }
+ div#nav strong a,
+ div#nav strong a:link,
+ div#nav strong a:active,
+ div#nav strong a:visited,
+ div#nav strong a:hover {
+ color: white;
+ background-color: black;
+ }
+/* END NAV */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-vertical.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-vertical.css
new file mode 100644
index 00000000..56d8f5dc
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/nav-vertical.css
@@ -0,0 +1,104 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* NAV */
+ div#nav {
+ font-size: 0.8em;
+ }
+ * html div#nav {
+ /* hide ie/mac \*/
+ height: 1%;
+ /* end hide */
+ }
+ div#nav div.wrapper {
+ width: 100%;
+
+ background: #ddd;
+ }
+ div#nav ul {
+ width: 100%;
+
+ margin: 0;
+ padding: 0;
+
+ line-height: 1em;
+ list-style: none;
+ }
+ div#nav li {
+ display: block;
+
+ margin: 0;
+ padding: 0;
+
+ list-style: none;
+
+ line-height: 1em;
+ }
+ * html div#nav li {
+ /* hide ie/mac \*/
+ height: 1%;
+ /* end hide */
+ }
+ div#nav li.last {
+
+ }
+ div#nav a,
+ div#nav a:link,
+ div#nav a:active,
+ div#nav a:visited {
+ display: block;
+
+ font-weight: bold;
+ text-decoration: none;
+
+ margin: 0;
+ padding: 5px 10px 5px 10px;
+
+ color: black;
+ background: white;
+ }
+ div#nav a:hover {
+ text-decoration: underline;
+
+ color: white;
+ background: black;
+ }
+ div#nav strong {
+ display: block;
+
+ color: white;
+ background: black;
+ }
+ div#nav strong a,
+ div#nav strong a:link,
+ div#nav strong a:active,
+ div#nav strong a:visited,
+ div#nav strong a:hover {
+ color: white;
+ background-color: black;
+ }
+/* END NAV */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/tools.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/tools.css
new file mode 100644
index 00000000..0555cb08
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/tools.css
@@ -0,0 +1,64 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* clearing */
+ .stretch,
+ .clear {
+ clear: both;
+ height: 1px;
+
+ margin: 0;
+ padding: 0;
+
+ font-size: 15px;
+ line-height: 1px;
+ }
+ .clearfix:after {
+ clear: both;
+ height: 0;
+
+ display: block;
+ visibility: hidden;
+
+ content: ".";
+ }
+ .clearfix {display:inline-block;}
+ /* Hide from IE Mac \*/
+ .clearfix {display:block;}
+ /* End hide from IE Mac */
+/* end clearing */
+
+/* accessibility */
+ span.accesskey {
+ text-decoration: none;
+ }
+ .accessibility {
+ position: absolute;
+ top: -999em;
+ left: -999em;
+ }
+/* end accessibility */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/typo.css b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/typo.css
new file mode 100644
index 00000000..9f54ab95
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/css-framework/css/typo.css
@@ -0,0 +1,228 @@
+/*
+A CSS Framework by Mike Stenhouse of Content with Style
+-------------------------------------------------------
+
+Copyright (c) 2005, Mike Stenhouse of Content with Style
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of CSS Framework nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* TYPOGRAPHY */
+ body {
+ text-align: left;
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 76%;
+ line-height: 1em;
+
+ color: #333;
+ }
+ div {
+ font-size: 1em;
+ }
+ img {
+ border: 0;
+ }
+
+/* LINKS */
+ a,
+ a:link,
+ a:active {
+ text-decoration: underline;
+
+ color: blue;
+ background-color: white;
+ }
+ a:visited {
+ color: purple;
+ background-color: transparent;
+ }
+ a:hover {
+ text-decoration: none;
+
+ color: white;
+ background-color: black;
+ }
+/* END LINKS */
+
+/* HEADINGS */
+ h1 {
+ margin: 0 0 0.5em 0;
+ padding: 0;
+
+ font-size: 2em;
+ line-height: 1.5em;
+
+ color: black;
+ }
+ h2 {
+ margin: 0 0 0.5em 0;
+ padding: 0;
+
+ font-size: 1.5em;
+ line-height: 1.5em;
+
+ color: black;
+ }
+ h3 {
+ margin: 0 0 0.5em 0;
+ padding:0;
+
+ font-size: 1.3em;
+ line-height: 1.3em;
+
+ color: black;
+ }
+ h4 {
+ margin: 0 0 0.25em 0;
+ padding: 0;
+
+ font-size: 1.2em;
+ line-height: 1.3em;
+
+ color: black;
+ }
+ h5 {
+ margin: 0 0 0.25em 0;
+ padding: 0;
+
+ font-size: 1.1em;
+ line-height: 1.3em;
+
+ color: black;
+ }
+ h6 {
+ margin: 0 0 0.25em 0;
+ padding: 0;
+
+ font-size: 1em;
+ line-height: 1.3em;
+
+ color: black;
+ }
+/* END HEADINGS */
+
+/* TEXT */
+ p {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ font-size: 1em;
+ line-height:1.4em;
+ }
+ blockquote {
+ margin-left: 10px;
+
+ border-left: 10px solid #ddd;
+ }
+ pre {
+ font-family: monospace;
+ font-size: 1.0em;
+ }
+ strong, b {
+ font-weight: bold;
+ }
+ em, i {
+ font-style:italic;
+ }
+ code {
+ font-family: "Courier New", Courier, monospace;
+ font-size: 1em;
+ white-space: pre;
+ }
+/* END TEXT */
+
+/* LISTS */
+ ul {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ line-height:1.4em;
+ }
+ ul li {
+ margin: 0 0 0.25em 30px;
+ padding: 0;
+ }
+ ol {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ font-size: 1.0em;
+ line-height: 1.4em;
+ }
+ ol li {
+ margin: 0 0 0.25em 30px;
+ padding: 0;
+
+ font-size: 1.0em;
+ }
+ dl {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ line-height: 1.4em;
+ }
+ dl dt {
+ margin: 0.25em 0 0.25em 0;
+ padding: 0;
+
+ font-weight: bold;
+ }
+ dl dd {
+ margin: 0 0 0 30px;
+ padding: 0;
+ }
+/* END LISTS */
+
+
+/* TABLE */
+ table {
+ margin: 0 0 1.5em 0;
+ padding: 0;
+
+ font-size: 1em;
+ }
+ table caption {
+ margin: 0;
+ padding: 0 0 1.5em 0;
+
+ font-weight: bold;
+ }
+ th {
+ font-weight: bold;
+ text-align: left;
+ }
+ td {
+ font-size: 1em;
+ }
+/* END TABLE */
+
+ hr {
+ display: none;
+ }
+ div.hr {
+ height: 1px;
+
+ margin: 1.5em 10px;
+
+ border-bottom: 1px dotted black;
+ }
+
+/* END TYPOGRAPHY */
\ No newline at end of file
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js
new file mode 100644
index 00000000..97836504
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring-Dojo.js
@@ -0,0 +1,452 @@
+/*
+ * Copyright 2004-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+dojo.declare("Spring.DefaultEquals", null, {
+ equals : function(/*Object*/other){
+ if (other.declaredClass && other.declaredClass == this.declaredClass) {
+ return true;
+ }else{
+ return false;
+ }
+ }
+});
+
+dojo.declare("Spring.ElementDecoration", [Spring.AbstractElementDecoration, Spring.DefaultEquals], {
+ constructor : function(config) {
+ this.widgetAttrs = {};
+ this.copyFields = new Array('name', 'value', 'type', 'checked', 'selected', 'readOnly', 'disabled', 'alt', 'maxLength', 'class', 'title');
+ dojo.mixin(this, config);
+ this.element = dojo.byId(this.elementId);
+ this.elementId = dojo.isString(this.elementId) ? this.elementId : this.elementId.id;
+ if(this.widgetModule == "") {
+ this.widgetModule = this.widgetType;
+ }
+ dojo.require(this.widgetModule);
+ },
+
+ apply : function(){
+ if (dijit.byId(this.elementId)) {
+ dijit.byId(this.elementId).destroyRecursive(false);
+ }
+
+ if (!this.element) {
+ console.error("Could not apply " + this.widgetType + " decoration. Element with id '" + this.elementId + "' not found in the DOM.");
+ }
+ else {
+ /*
+ * dijit.form.DateTextBox uses locale information when displaying a date and a
+ * fixed date format when parsing or serializing date values coming from the
+ * server-side. There is no way configure it to use a single date pattern,
+ * which is the reason for the code below.
+ */
+ var datePattern = this.widgetAttrs['datePattern'];
+ if (datePattern && this.widgetType == 'dijit.form.DateTextBox') {
+ if (!this.widgetAttrs['value']) {
+ // Help dijit.form.DateTextBox parse the server side date value.
+ this.widgetAttrs['value'] = dojo.date.locale.parse(this.element.value, {selector : "date", datePattern : datePattern});
+ }
+ if (!this.widgetAttrs['serialize']) {
+ // Help dijit.form.DateTextBox format the date to send to the server side.
+ this.widgetAttrs['serialize'] = function(d, options){
+ return dojo.date.locale.format(d, {selector : "date", datePattern : datePattern});
+ }
+ }
+ // Add a constraint that specifies the date pattern to use when displaying a date
+ // but don't interfere with any constraints that may have been specified.
+ if (!this.widgetAttrs['constraints']) {
+ this.widgetAttrs['constraints'] = {};
+ }
+ if (!this.widgetAttrs['constraints'].datePattern) {
+ this.widgetAttrs['constraints'].datePattern = datePattern;
+ }
+ }
+ for (var copyField in this.copyFields) {
+ copyField = this.copyFields[copyField];
+ if (!this.widgetAttrs[copyField] && this.element[copyField] &&
+ (typeof this.element[copyField] != 'number' ||
+ (typeof this.element[copyField] == 'number' && this.element[copyField] >= 0))) {
+ this.widgetAttrs[copyField] = this.element[copyField];
+ }
+ }
+ if(this.element['style'] && this.element['style'].cssText){
+ this.widgetAttrs['style'] = this.element['style'].cssText;
+ }
+ var widgetConstructor = dojo.eval(this.widgetType);
+ this.widget = new widgetConstructor(this.widgetAttrs, this.element);
+ this.widget.startup();
+ }
+ //return this to support method chaining
+ return this;
+ },
+
+ validate : function(){
+ if (!this.widget.isValid) {
+ // some widgets cannot be validated
+ return true;
+ }
+ var isValid = this.widget.isValid(false);
+ if (!isValid) {
+ this.widget.state = "Error";
+ this.widget._setStateClass();
+ }
+ return isValid;
+ }
+});
+
+dojo.declare("Spring.ValidateAllDecoration", [Spring.AbstractValidateAllDecoration, Spring.DefaultEquals], {
+ constructor : function(config) {
+ this.originalHandler = null;
+ this.connection = null;
+ dojo.mixin(this, config);
+ },
+
+ apply : function() {
+ var element = dojo.byId(this.elementId);
+ if (!element) {
+ console.error("Could not apply ValidateAll decoration. Element with id '" + this.elementId + "' not found in the DOM.");
+ } else {
+ this.originalHandler = element[this.event];
+ var context = this;
+ element[this.event] = function(event){
+ context.handleEvent(event, context);
+ };
+ }
+ return this;
+ },
+
+ cleanup : function(){
+ dojo.disconnect(this.connection);
+ },
+
+ handleEvent : function(event, context){
+ if (!Spring.validateAll()) {
+ dojo.publish(this.elementId+"/validation", [false]);
+ dojo.stopEvent(event);
+ } else {
+ dojo.publish(this.elementId+"/validation", [true]);
+ if(dojo.isFunction(context.originalHandler)) {
+ var result = context.originalHandler(event);
+ if (result == false) {
+ dojo.stopEvent(event);
+ }
+ }
+ }
+ }
+});
+
+dojo.declare("Spring.AjaxEventDecoration", [Spring.AbstractAjaxEventDecoration, Spring.DefaultEquals], {
+ constructor : function(config){
+ this.validationSubscription = null;
+ this.connection = null;
+ this.allowed = true;
+ dojo.mixin(this, config);
+ },
+
+ apply : function() {
+
+ var element = dijit.byId(this.elementId) ? dijit.byId(this.elementId) : dojo.byId(this.elementId);
+ if (!element) {
+ console.error("Could not apply AjaxEvent decoration. Element with id '" + this.elementId + "' not found in the DOM.");
+ } else {
+ this.validationSubscription = dojo.subscribe(this.elementId+"/validation", this, "_handleValidation");
+ this.connection = dojo.connect(element, this.event, this, "submit");
+ }
+ return this;
+ },
+
+ cleanup : function(){
+ dojo.unsubscribe(this.validationSubscription);
+ dojo.disconnect(this.connection);
+ },
+
+ submit : function(event){
+ if (this.sourceId == ""){
+ this.sourceId = this.elementId;
+ }
+ if(this.formId == ""){
+ Spring.remoting.getLinkedResource(this.sourceId, this.params, this.popup);
+ } else {
+ if (this.allowed){
+ Spring.remoting.submitForm(this.sourceId, this.formId, this.params);
+ }
+ }
+ dojo.stopEvent(event);
+ },
+
+ _handleValidation : function(success){
+ if (!success) {
+ this.allowed=false;
+ } else {
+ this.allowed=true;
+ }
+ }
+});
+
+dojo.declare("Spring.RemotingHandler", Spring.AbstractRemotingHandler, {
+ constructor : function(){},
+
+ submitForm : function(/*String */ sourceId, /*String*/formId, /*Object*/ params) {
+ var content = new Object();
+ for (var key in params) {
+ content[key] = params[key];
+ }
+
+ var sourceComponent = dojo.byId(sourceId);
+
+ if (sourceComponent != null){
+ if(sourceComponent.value != undefined && sourceComponent.type && ("button,submit,reset").indexOf(sourceComponent.type) < 0) {
+ content[sourceId] = sourceComponent.value;
+ }
+ else if(sourceComponent.name != undefined) {
+ content[sourceComponent.name] = sourceComponent.name;
+ } else {
+ content[sourceId] = sourceId;
+ }
+ }
+
+ if (!content['ajaxSource']) {
+ content['ajaxSource'] = sourceId;
+ }
+
+ var formNode = dojo.byId(formId);
+ var formMethod = dojo.string.trim(formNode.method);
+ formMethod = formMethod.length > 0 ? formMethod.toUpperCase() : "GET";
+
+ dojo.xhr(formMethod, {
+
+ content: content,
+
+ form: formId,
+
+ handleAs: "text",
+
+ headers: {"Accept" : "text/html;type=ajax"},
+
+ // The LOAD function will be called on a successful response.
+ load: this.handleResponse,
+
+ // The ERROR function will be called in an error case.
+ error: this.handleError
+ }, formMethod == "POST" ? true : false);
+
+ },
+
+ getLinkedResource: function(/*String */ linkId, /*Object*/params, /*boolean*/ modal) {
+ this.getResource(dojo.byId(linkId).href, params, modal);
+ },
+
+ getResource: function(/*String */ resourceUri, /*Object*/params, /*boolean*/ modal) {
+
+ dojo.xhrGet({
+
+ url: resourceUri,
+
+ content: params,
+
+ handleAs: "text",
+
+ headers: {"Accept" : "text/html;type=ajax"},
+
+ load: this.handleResponse,
+
+ error: this.handleError,
+
+ modal: modal
+ });
+ },
+
+ handleResponse: function(response, ioArgs) {
+
+ //First check if this response should redirect
+ var redirectURL = ioArgs.xhr.getResponseHeader('Spring-Redirect-URL');
+ var modalViewHeader = ioArgs.xhr.getResponseHeader('Spring-Modal-View');
+ var modalView = ((dojo.isString(modalViewHeader) && modalViewHeader.length > 0) || ioArgs.args.modal);
+
+ if (dojo.isString(redirectURL) && redirectURL.length > 0) {
+ if (modalView) {
+ //render a popup with the new URL
+ Spring.remoting._renderURLToModalDialog(redirectURL);
+ return response;
+ }
+ else {
+ if (redirectURL.indexOf("/") >= 0) {
+ window.location = window.location.protocol + "//" + window.location.host + redirectURL;
+ } else {
+ var location = window.location.protocol + "//" + window.location.host + window.location.pathname;
+ var appendIndex = location.lastIndexOf("/");
+ location = location.substr(0,appendIndex+1) + redirectURL;
+ if (location == window.location) {
+ Spring.remoting.getResource(location, ioArgs.args.content, false);
+ }
+ else {
+ window.location = location;
+ }
+ }
+ return response;
+ }
+ } else if ((dojo.string.trim(response).length == 0) && (ioArgs.xhr.status != 204) && (ioArgs.xhr.status != 205)) {
+ if (Spring.debug) {
+ Spring.remoting.showError('Received empty response with no Spring redirect headers. If this is intentional set the response status code to 204 or 205.');
+ }
+ }
+
+ //Extract and store all ');
+
+ if (modalView) {
+ //For a modal view, just dump the response into a modal dialog
+ Spring.remoting._renderResponseToModalDialog(response);
+ } else {
+ //Extract the new DOM nodes from the response
+ var tempSpan = dojo.doc.createElement("span");
+ tempSpan.id="ajaxResponse";
+ tempSpan.style.display= "none";
+ document.body.appendChild(tempSpan);
+ tempSpan.innerHTML=response;
+ var tempContainer = new dojo.NodeList(tempSpan);
+ var newNodes = tempContainer.query(">").orphan();
+ tempContainer.orphan();
+
+ //Insert the new DOM nodes and update the Form's action URL
+ newNodes.forEach(function(item){
+ if (item.id != null && item.id != "") {
+ var target = dijit.byId(item.id) ? dijit.byId(item.id).domNode : dojo.byId(item.id);
+ if (!target) {
+ console.error("An existing DOM elment with id '" + item.id + "' could not be found for replacement.");
+ } else {
+ target.parentNode.replaceChild(item, target);
+ }
+ }
+ });
+ }
+
+ //Evaluate any script code
+ dojo.forEach(extractedScriptNodes, function(script){
+ dojo.eval(script);
+ });
+
+ return response;
+ },
+
+ handleError: function(response, ioArgs) {
+ dojo.require("dijit.Dialog");
+
+ console.error("HTTP status code: ", ioArgs.xhr.status);
+
+ if (Spring.debug && ioArgs.xhr.status != 200) {
+ var dialog = new dijit.Dialog({ title: 'Ajax Request Error' });
+ dojo.connect(dialog, "hide", dialog, function(){
+ this.destroyRecursive(false);
+ });
+ dialog.domNode.style.overflow = "auto";
+ dialog.setContent(ioArgs.xhr.responseText);
+ dialog.show();
+ }
+
+ return response;
+ },
+
+ showError: function(message) {
+ dojo.require("dijit.Dialog");
+
+ var dialog = new dijit.Dialog({ title: 'Error Message' });
+ dojo.connect(dialog, "hide", dialog, function(){
+ this.destroyRecursive(false);
+ });
+ dialog.domNode.style.width = "500px";
+ dialog.setContent(message);
+ dialog.show();
+ },
+
+ _renderURLToModalDialog: function(url) {
+ Spring.remoting.getResource(url, {}, true);
+ },
+
+ _renderResponseToModalDialog: function(response) {
+ dojo.require("dijit.Dialog");
+
+ var dialog = new dijit.Dialog({});
+ dialog.setContent(response);
+ dojo.connect(dialog, "hide", dialog, function(){
+ this.destroyRecursive(false);
+ });
+ dialog.show();
+ }
+});
+
+dojo.declare("Spring.CommandLinkDecoration", [Spring.AbstractCommandLinkDecoration, Spring.DefaultEquals], {
+ constructor : function(config){
+ dojo.mixin(this, config);
+ },
+
+ apply : function(){
+ var advisedNode = dojo.byId(this.elementId);
+ if (!dojo.hasClass(advisedNode, "progressiveLink")) {
+ //Node must be replaced
+ var nodeToReplace = new dojo.NodeList(advisedNode);
+ nodeToReplace.addContent(this.linkHtml, "after").orphan("*");
+ //Get the new node
+ advisedNode = dojo.byId(this.elementId);
+ }
+ advisedNode.submitFormFromLink = this.submitFormFromLink;
+ //return this to support method chaining
+ return this;
+ },
+
+ submitFormFromLink : function(/*String*/ formId, /*String*/ sourceId, /*Array of name,value params*/ params){
+ var addedNodes = [];
+ var formNode = dojo.byId(formId);
+ var linkNode = document.createElement("input");
+ linkNode.name = sourceId;
+ linkNode.value = "submitted";
+ addedNodes.push(linkNode);
+
+ dojo.forEach(params, function(param){
+ var paramNode = document.createElement("input");
+ paramNode.name=param.name;
+ paramNode.value=param.value;
+ addedNodes.push(paramNode);
+ });
+
+ dojo.forEach(addedNodes, function(nodeToAdd){
+ dojo.addClass(nodeToAdd, "SpringLinkInput");
+ dojo.place(nodeToAdd, formNode, "last");
+ });
+
+ if ((formNode.onsubmit ? !formNode.onsubmit() : false) || !formNode.submit()) {
+ dojo.forEach(addedNodes, function(hiddenNode){
+ hiddenNode.parentNode.removeChild(hiddenNode);
+ });
+ }
+ }
+});
+
+dojo.addOnLoad(Spring.initialize);
diff --git a/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring.js b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring.js
new file mode 100644
index 00000000..0cdfcd89
--- /dev/null
+++ b/spring-js-resources/src/main/resources/META-INF/web-resources/spring/Spring.js
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2004-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+Spring = {};
+
+Spring.debug = true;
+
+Spring.decorations = {};
+
+Spring.decorations.applied = false;
+
+Spring.initialize = function(){
+ Spring.applyDecorations();
+ Spring.remoting = new Spring.RemotingHandler();
+};
+
+Spring.addDecoration = function(/*Object*/decoration){
+ //Spring.decorations.push(decoration);
+
+ if (!Spring.decorations[decoration.elementId]) {
+ Spring.decorations[decoration.elementId] = [];
+ Spring.decorations[decoration.elementId].push(decoration);
+ } else {
+ var replaced = false;
+ for(var i = 0; i
- Handling Ajax Requests
+ Spring JavaScript Quick Reference
+
+ Introduction
+
+ Spring Javascript (spring-js) is a lightweight abstraction over common JavaScript toolkits such as Dojo.
+ It aims to provide a common client-side programming model for progressively enhancing a web page with rich widget behavior and Ajax remoting.
+
+
+ Use of the Spring JS API is demonstrated in the the Spring MVC + Web Flow version of the Spring Travel reference application.
+
+
+
+ Serving Javascript Resources
+
+ Spring JS provides a generic ResourceServlet to serve web resources such as JavaScript and CSS files from jar files,
+ as well as the webapp root directory.
+ This servlet provides a convenient way to serve Spring.js files to your pages.
+ To deploy this servlet, declare the following in web.xml:
+
+
+
+ Resource Servlet
+ org.springframework.js.resource.ResourceServlet
+
+
+
+
+ Resource Servlet
+ /resources/*
+]]>
+
+
+ Note that starting with version 3.0.4, the Spring Framework includes
+ a replacement for the ResourceServlet (see the
+ Spring Framework documentation).
+ With the new <mvc:resources> element resource requests (.js, .css) are handled by the
+ DispatcherSevlet without the need for a separate ResourceServlet.
+ Here is the relevant portion of the Spring MVC configuration in
+ the mvc-booking sample:
+
+
+
+
+
+
+
+
+ ...
+
+
+]]>
+
+
+ This incoming maps requests for /resources to resources found under
+ /META-INF/web-resources on the classpath. That's where Spring JavaScript resources
+ are bundled. However, you can modify the location attribute in the above configuration in order
+ to serve resources from any classpath or web application relative location.
+
+
+ Note that the full resource URL depends on how your DispatcherServlet is mapped.
+ In the mvc-booking sample we've chosen to map it with the default servlet mapping '/':
+
+
+ Spring MVC Dispatcher Servlet
+ org.springframework.web.servlet.DispatcherServlet
+
+
+
+ Spring MVC Dispatcher Servlet
+ /
+
+]]>
+
+
+ That means the full URL to load Spring.js is /myapp/resources/spring/Spring.js.
+ If your DispatcherServlet was instead mapped to /main/* then the full
+ URL would be /myapp/main/resources/spring/Spring.js.
+
+
+ When using of the default servlet mapping it is also recommended to add this to your Spring MVC
+ configuration, which ensures that any resource requests not handled by your Spring MVC mappings
+ will be delegated back to the Servlet container.
+
+
+
+
+ ...
+
+
+
+
+]]>
+
+
+
+ Including Spring Javascript in a Page
+
+ Spring JS is designed such that an implementation of its API can be built for any of the popular Javascript toolkits.
+ The initial implementation of Spring.js builds on the Dojo toolkit.
+
+
+ Using Spring Javascript in a page requires including the underlying toolkit as normal,
+ the Spring.js base interface file, and the Spring-(library implementation).js file for the underlying toolkit.
+ As an example, the following includes obtain the Dojo implementation of Spring.js using the ResourceServlet:
+
+ ">
+">
+"> ]]>
+
+
+ When using the widget system of an underlying library, typically you must also include some CSS resources to obtain the desired look and feel.
+ For the booking-mvc reference application, Dojo's tundra.css is included:
+
+ " />]]>
+
+
+
+ Spring Javascript Decorations
+
+ A central concept in Spring Javascript is the notion of applying decorations to existing DOM nodes.
+ This technique is used to progressively enhance a web page such that the page will still be functional in a less capable browser.
+ The addDecoration method is used to apply decorations.
+
+
+ The following example illustrates enhancing a Spring MVC <form:input> tag with rich suggestion behavior:
+
+
+]]>
+
+
+ The ElementDecoration is used to apply rich widget behavior to an existing DOM node.
+ This decoration type does not aim to completely hide the underlying toolkit, so the toolkit's native widget type and attributes are used directly.
+ This approach allows you to use a common decoration model to integrate any widget from the underlying toolkit in a consistent manner.
+ See the booking-mvc reference application for more examples of applying decorations to do things from suggestions to client-side validation.
+
+
+ When using the ElementDecoration to apply widgets that have rich validation behavior, a common need is to prevent the form from being submitted to the server until validation passes.
+ This can be done with the ValidateAllDecoration:
+
+
+]]>
+
+
+ This decorates the "Proceed" button with a special onclick event handler that fires the client side validators and does not allow the form to submit until they pass successfully.
+
+
+ An AjaxEventDecoration applies a client-side event listener that fires a remote Ajax request to the server. It also auto-registers a callback function to link in the response:
+
+ Previous
+]]>
+
+
+ This decorates the onclick event of the "Previous Results" link with an Ajax call, passing along a special parameter that specifies the fragment to be re-rendered in the response.
+ Note that this link would still be fully functional if Javascript was unavailable in the client.
+ (See for details on how this request is handled on the server.)
+
+
+ It is also possible to apply more than one decoration to an element.
+ The following example shows a button being decorated with Ajax and validate-all submit suppression:
+
+
+]]>
+
+
+ It is also possible to apply a decoration to multiple elements in a single statement using Dojo's query API.
+ The following example decorates a set of checkbox elements as Dojo Checkbox widgets:
+
+
+
+
+
+
+]]>
+
+ Handling Ajax Requests
- TODO
-
-
- Spring Web Flow's Ajax response handling is built upon the notion of receiving "fragments" back from the server.
+ Spring Javascript's client-side Ajax response handling is built upon the notion of receiving "fragments" back from the server.
These fragments are just standard HTML that is meant to replace portions of the existing page.
The key piece needed on the server is a way to determine which pieces of a full response need to be pulled out for partial rendering.
@@ -22,11 +236,11 @@
In order to be able to render partial fragments of a full response, the full response must be built using a
templating technology that allows the use of composition for constructing the response, and for the member
parts of the composition to be referenced and rendered individually.
- Spring Web Flow provides some simple Spring MVC extensions that make use of Tiles to achieve this.
+ Spring Javascript provides some simple Spring MVC extensions that make use of Tiles to achieve this.
The same technique could theoretically be used with any templating system supporting composition.
- Spring Web Flow's Ajax remoting functionality is built upon the notion that the core handling code for an
+ Spring Javascript's Ajax remoting functionality is built upon the notion that the core handling code for an
Ajax request should not differ from a standard browser request, thus no special knowledge of an Ajax request
is needed directly in the code and the same hanlder can be used for both styles of request.
diff --git a/src/reference/whatsnew.xml b/src/reference/whatsnew.xml
index 5457d6d5..bd12e4b3 100644
--- a/src/reference/whatsnew.xml
+++ b/src/reference/whatsnew.xml
@@ -101,4 +101,204 @@
+
+ Spring Web Flow 2.3
+
+ Embedding A Flow On A Page
+
+ By default Web Flow does a client-side redirect upon entering every view state.
+ That makes it impossible to embed a flow on a page or within a modal dialog and execute more than one view state without causing a full-page refresh.
+ Web Flow now supports launching a flow in "embedded" mode.
+ In this mode a flow can transition to other view states without a client-side redirect during Ajax requests.
+ See and .
+
+
+
+ Support For JSR-303 Bean Validation
+
+ Support for the JSR-303 Bean Validation API is now available building on equivalent support available in Spring MVC.
+ See for more details.
+
+
+
+ Flow-Managed Persistence Context Propagation
+
+ Starting with Web Flow 2.3 a flow managed PersistenceContext is automatically extended (propagated) to sub-flows assuming the subflow also has the feature enabled as well.
+ See .
+
+
+
+ Portlet 2.0 Resource Requests
+
+ Support for Portlet 2.0 resource requests has now been added enabling Ajax requests with partial rendering.
+ URLs for such requests can be prepared with the <portlet:resourceURL> tag in JSP pages.
+ Server-side processing is similar to a combined an action and a render requests but combined in a single request.
+ Unlike a render request, the response from a resource request includes content from the target portlet only.
+
+
+
+ Custom ConversationManager
+
+ The <flow-execution-repository> element now provides a conversation-manager attribute accepting a reference to a ConversationManager instance.
+
+
+
+ Redirect In Same State
+
+ By default Web Flow does a client-side redirect when remaining in the same view state as long as the current request is not an Ajax request.
+ This is useful after form validation failure.
+ Hitting Refresh or Back won't result in browser warnings.
+ Hence this behavior is usually desirable.
+ However a new flow execution attribute makes it possible to disable it and that may also be necessary in some cases specific to JSF applications.
+ See .
+
+
+
+ Samples
+
+ The process for building the samples included with the distribution has been simplified.
+ Maven can be used to build all samples in one step.
+ Eclipse settings include source code references to simplify debugging.
+
+
+ Additional samples can be accessed as follows:
+mkdir spring-samples
+cd spring-samples
+svn co https://src.springframework.org/svn/spring-samples/webflow-primefaces-showcase
+cd webflow-primefaces-showcase
+mvn package
+# import into Eclipse
+
+
+mkdir spring-samples
+cd spring-samples
+svn co https://src.springframework.org/svn/spring-samples/webflow-showcase
+cd webflow-showcase
+mvn package
+# import into Eclipse
+
+
+
+
+
+
+ Spring Web Flow 2.2
+
+ JSF 2 Support
+
+ Comprehensive JSF 2 Support
+
+ Building on 2.1, Spring Web Flow version 2.2 adds support for core JSF 2 features
+ The following features that were not supported in 2.1 are now available:
+ partial state saving, JSF 2 resource request, handling, and JSF 2 Ajax requests.
+ At this point support for JSF 2 is considered
+ comprehensive although not covering every JSF 2 feature --
+ excluded are mostly features that overlap with the core value Web Flow provides
+ such as those relating to navigation and state management.
+
+
+ See for important configuration changes.
+ Note that partial state saving is only supported with Sun Mojarra 2.0.3 or later.
+ It is not yet supported with Apache MyFaces. This is due to the
+ fact MyFaces was not as easy to customize with regards to how component state is stored.
+ We will work with Apache MyFaces to provide this support. In the mean time you will need to use
+ the javax.faces.PARTIAL_STATE_SAVING context parameter in web.xml
+ to disable partial state saving with Apache MyFaces.
+
+
+
+ Travel Sample With the PrimeFaces Components
+
+ The main Spring Travel sample demonstrating Spring Web Flow and JSF support
+ is now built on JSF 2 and components from the PrimeFaces component library.
+ Please check out the booking-faces sample in the distribution.
+
+
+ Additional samples can be found at the Spring Web Flow - Prime Faces
+
+ Showcase, an SVN repository within the
+ spring-samples
+ repository. Use these commands to check out and build:
+
+
+
+
+
+
+ Spring Security Facelets Tag Library
+
+ A new Spring Security tag library is available for use with with JSF 2.0 or with JSF 1.2 Facelets views.
+ It provides an <authorize> tag as well as several EL functions.
+ See for more details.
+
+
+
+ Spring JavaScript Updates
+
+ Deprecated ResourcesServlet
+
+ Starting with Spring 3.0.4, the Spring Framework includes
+ a replacement for the ResourcesServlet. Please see
+ the Spring Framework documentation for details on the custom mvc namespace,
+ specifically the new
+ "resources"
+ element.
+
+
+
+ Dojo 1.5 and dojox
+
+ The bundled custom Dojo build is upgraded to version 1.5. It now includes dojox.
+
+
+ Note that applications are generally encouraged to prepare their own custom
+ Dojo build for optimized performance depending on what parts of Dojo are
+ commonly used together. For examples see the
+ scripts
+ used by Spring Web Flow to prepare its own custom Dojo build.
+
+
+
+ Two Spring JS artifacts
+
+ The spring-js artifact has been split in two -- the new artifact
+ (spring-js-resources) contains client side resource (.js, .css, etc.) while
+ the existing artifact (spring-js) contains server-side Java code only.
+
+
+ Applications preparing their own custom Dojo build have an option now to
+ avoid including spring-js-resources and put Spring.js and
+ Spring-Dojo.js directly under the root of their web application.
+
+
+
+ Client resources moved into META-INF/web-resources
+
+ Bundled client resources (.js, .css, etc.)
+ have been moved to META-INF/web-resources from their previous location
+ under META-INF. This change is transparent for applications but will result
+ in simpler and safer configuration when using the new resource handling
+ mechanism available in Spring 3.0.4.
+
+
+
+
+ JSF Portlet Support
+
+ Portlet API 2.0 and JSF 1.2 support
+
+ In previous versions of Spring Web Flow support for JSF Portlets relied on
+ a Portlet Bridge for JSF implementation and was considered experimental.
+ Spring Web Flow 2.2 adds support for JSF Portlets based on its own internal
+ Portlet integration targeting Portlet API 2.0 and JSF 1.2 environments.
+ See for more details.
+ The Spring Web Flow Travel JSF Portlets sample has been successfully
+ tested on the Apache Pluto portal container.
+
+
+
+