You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by mr...@apache.org on 2006/01/21 23:12:28 UTC
svn commit: r371123 - in /struts/flow/trunk/src/examples: ./ WEB-INF/
WEB-INF/classes/ WEB-INF/guess/flow/ WEB-INF/guess/jsp/ WEB-INF/portlet/
WEB-INF/remote/flow/ WEB-INF/remote/jsp/ WEB-INF/templates/flow/
WEB-INF/templates/jt/ WEB-INF/wizard/flow/ W...
Author: mrdon
Date: Sat Jan 21 14:12:20 2006
New Revision: 371123
URL: http://svn.apache.org/viewcvs?rev=371123&view=rev
Log:
Setting correct eol settings for examples
Modified:
struts/flow/trunk/src/examples/WEB-INF/classes/commons-logging.properties (props changed)
struts/flow/trunk/src/examples/WEB-INF/classes/simplelog.properties (props changed)
struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet.xml (props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/web.xml (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/wizard/flow/wizard.js (props changed)
struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp (contents, props changed)
struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp (contents, props changed)
struts/flow/trunk/src/examples/index.html (props changed)
Propchange: struts/flow/trunk/src/examples/WEB-INF/classes/commons-logging.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/flow/trunk/src/examples/WEB-INF/classes/simplelog.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js Sat Jan 21 14:12:20 2006
@@ -1,39 +1,39 @@
-NumberGuess = function() {
-
- this.play = function() {
-
- this.random = Math.round( Math.random() * 9 ) + 1;
- this.hint = "No hint for you!"
- this.guesses = 0;
-
- while (true) {
-
- // send guess page to user and wait for response
- flow.wait();
-
- // process user's guess
- this.guess = parseInt( params.guess );
- this.guesses++;
- if (this.guess) {
- if (this.guess > this.random) {
- this.hint = "Nope, lower!"
- }
- else if (this.guess < this.random) {
- this.hint = "Nope, higher!"
- }
- else {
- // correct guess
- break;
- }
- }
- }
-
- // send success page to user
- flash.guesses = this.guesses;
- flash.random = this.random;
-
- flow.redirect( { "action" : "endGame" } );
- }
-
- this.endGame = function() {}
-}
+NumberGuess = function() {
+
+ this.play = function() {
+
+ this.random = Math.round( Math.random() * 9 ) + 1;
+ this.hint = "No hint for you!"
+ this.guesses = 0;
+
+ while (true) {
+
+ // send guess page to user and wait for response
+ flow.wait();
+
+ // process user's guess
+ this.guess = parseInt( params.guess );
+ this.guesses++;
+ if (this.guess) {
+ if (this.guess > this.random) {
+ this.hint = "Nope, lower!"
+ }
+ else if (this.guess < this.random) {
+ this.hint = "Nope, higher!"
+ }
+ else {
+ // correct guess
+ break;
+ }
+ }
+ }
+
+ // send success page to user
+ flash.guesses = this.guesses;
+ flash.random = this.random;
+
+ flow.redirect( { "action" : "endGame" } );
+ }
+
+ this.endGame = function() {}
+}
Propchange: struts/flow/trunk/src/examples/WEB-INF/guess/flow/NumberGuess.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp Sat Jan 21 14:12:20 2006
@@ -1,18 +1,18 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game</title>
-</head>
-<body>
-
- <h1>Success!</h1>
-
- <h2>The number was: <%= request.getAttribute("random") %></h2>
-
- <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
-
- <p><a href="play.do">Play again</a></p>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game</title>
+</head>
+<body>
+
+ <h1>Success!</h1>
+
+ <h2>The number was: <%= request.getAttribute("random") %></h2>
+
+ <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
+
+ <p><a href="play.do">Play again</a></p>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/guess/jsp/endGame.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp Sat Jan 21 14:12:20 2006
@@ -1,21 +1,21 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game</title>
-</head>
-<body>
-
- <h1>Guess the Number Between 1 and 10</h1>
-
- <h2><%= request.getAttribute("hint") %></h2>
-
- <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
-
- <form method="post" action="play.do">
- <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
- <input type="text" name="guess"/>
- <input type="submit"/>
- </form>
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game</title>
+</head>
+<body>
+
+ <h1>Guess the Number Between 1 and 10</h1>
+
+ <h2><%= request.getAttribute("hint") %></h2>
+
+ <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
+
+ <form method="post" action="play.do">
+ <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
+ <input type="text" name="guess"/>
+ <input type="submit"/>
+ </form>
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/guess/jsp/play.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt Sat Jan 21 14:12:20 2006
@@ -1,11 +1,11 @@
- <h1>Find Asset</h1>
-
-<ul>
-{for r in xml..rule}
- <li>${r.@condensedImpact} - ${r.@fullImpact}</li>
-{/for}
-</ul>
-
-${xml.request.param.(@name=="debug").value}
-
-<br />
+ <h1>Find Asset</h1>
+
+<ul>
+{for r in xml..rule}
+ <li>${r.@condensedImpact} - ${r.@fullImpact}</li>
+{/for}
+</ul>
+
+${xml.request.param.(@name=="debug").value}
+
+<br />
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/frontPage.jt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp Sat Jan 21 14:12:20 2006
@@ -1,18 +1,18 @@
-<?xml version="1.0"?>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
-<portlet:defineObjects/>
-
- <h1>Guess the Number Between 1 and 10</h1>
-
- <h2><%= request.getAttribute("hint") %></h2>
-
- <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
-
-<portlet:renderURL var="submitUrl">
- <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
-</portlet:renderURL>
-
-<form action="<%=submitUrl%>">
- <input type="text" name="guess"/>
- <input type="submit"/>
- </form>
+<?xml version="1.0"?>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+
+ <h1>Guess the Number Between 1 and 10</h1>
+
+ <h2><%= request.getAttribute("hint") %></h2>
+
+ <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
+
+<portlet:renderURL var="submitUrl">
+ <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
+</portlet:renderURL>
+
+<form action="<%=submitUrl%>">
+ <input type="text" name="guess"/>
+ <input type="submit"/>
+ </form>
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/guess.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js Sat Jan 21 14:12:20 2006
@@ -1,81 +1,81 @@
-flow.load("/templates/template.js");
-
-function doView() {
-
- var random = Math.round( Math.random() * 9 ) + 1;
- var hint = "No hint for you!"
- var guesses = 0;
-
- while (true) {
-
- // send guess page to user and wait for response
- forwardAndWait("/WEB-INF/guess/guess.jsp",
- { "random" : random,
- "hint" : hint,
- "guesses" : guesses} );
-
- // process user's guess
- var guess = parseInt( flow.context.param.guess );
- guesses++;
- if (guess) {
- if (guess > random) {
- hint = "Nope, lower!"
- }
- else if (guess < random) {
- hint = "Nope, higher!"
- }
- else {
- // correct guess
- break;
- }
- }
- }
-
- // send success page to user
- renderTemplate("/WEB-INF/guess/success.jsp",
- {"random" : random,
- "guess" : guess,
- "guesses" : guesses} );
-}
-
-
-function renderTemplate(page, bizdata) {
- res = flow.context.response;
- stream = flow.context.context.getResourceAsStream("/WEB-INF/guess/"+page+".jt");
- if (stream != null) {
- text = new String(stream.getText());
- html = text.process(bizdata);
- res.contentType = "text/html";
- res.writer.print(html);
- res.writer.close();
- } else {
- res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
- }
-
- suicide();
- }
-}
-
-// This function intercepts the forward back to Struts and renders the content
-// directly using Javascript Templates
-function _renderTemplateAndWait(page, bizdata) {
- // if rpc call, use old forward, otherwise use template
- if (page == "n/a") {
- return _oldForwardAndWait(page, bizdata);
- } else {
- var k = new Continuation();
-
- // Use default ttl value from continuation manager
- var timeToLive = 0;
- var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
-
- bizdata.contid = kont.id;
- renderTemplate(page, bizdata);
- return kont;
- }
-}
-
-// Replace old forward method with ours, but keep a reference to it so we can
-// call it for remote flow responses
-this._oldForwardAndWait = _forwardAndWait;
-this._forwardAndWait = _renderTemplateAndWait;
+flow.load("/templates/template.js");
+
+function doView() {
+
+ var random = Math.round( Math.random() * 9 ) + 1;
+ var hint = "No hint for you!"
+ var guesses = 0;
+
+ while (true) {
+
+ // send guess page to user and wait for response
+ forwardAndWait("/WEB-INF/guess/guess.jsp",
+ { "random" : random,
+ "hint" : hint,
+ "guesses" : guesses} );
+
+ // process user's guess
+ var guess = parseInt( flow.context.param.guess );
+ guesses++;
+ if (guess) {
+ if (guess > random) {
+ hint = "Nope, lower!"
+ }
+ else if (guess < random) {
+ hint = "Nope, higher!"
+ }
+ else {
+ // correct guess
+ break;
+ }
+ }
+ }
+
+ // send success page to user
+ renderTemplate("/WEB-INF/guess/success.jsp",
+ {"random" : random,
+ "guess" : guess,
+ "guesses" : guesses} );
+}
+
+
+function renderTemplate(page, bizdata) {
+ res = flow.context.response;
+ stream = flow.context.context.getResourceAsStream("/WEB-INF/guess/"+page+".jt");
+ if (stream != null) {
+ text = new String(stream.getText());
+ html = text.process(bizdata);
+ res.contentType = "text/html";
+ res.writer.print(html);
+ res.writer.close();
+ } else {
+ res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
+ }
+
+ suicide();
+ }
+}
+
+// This function intercepts the forward back to Struts and renders the content
+// directly using Javascript Templates
+function _renderTemplateAndWait(page, bizdata) {
+ // if rpc call, use old forward, otherwise use template
+ if (page == "n/a") {
+ return _oldForwardAndWait(page, bizdata);
+ } else {
+ var k = new Continuation();
+
+ // Use default ttl value from continuation manager
+ var timeToLive = 0;
+ var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
+
+ bizdata.contid = kont.id;
+ renderTemplate(page, bizdata);
+ return kont;
+ }
+}
+
+// Replace old forward method with ours, but keep a reference to it so we can
+// call it for remote flow responses
+this._oldForwardAndWait = _forwardAndWait;
+this._forwardAndWait = _renderTemplateAndWait;
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template Sat Jan 21 14:12:20 2006
@@ -1,90 +1,90 @@
-flow.load("/templates/template.js");
-
-importClass(Packages.org.apache.commons.httpclient.HttpClient);
-importClass(Packages.org.apache.commons.httpclient.MultiThreadedHttpConnectionManager);
-importClass(Packages.org.apache.commons.httpclient.methods.GetMethod);
-importPackage(java.io);
-function doView() {
-
- get = new GetMethod("http://mirage:8090/rp1/public/frontPage.do?debug=true&__accept_disclaimer__=true");
-
- client = new HttpClient();
- iGetResultCode = client.executeMethod(get);
- body = get.getResponseBodyAsString();
- xml = new XML(body);
-
- forwardAndWait("frontPage",{"xml":xml});
-}
-
-/*
- var random = Math.round( Math.random() * 9 ) + 1;
- var hint = "No hint for you!"
- var guesses = 0;
-
- while (true) {
-
- // send guess page to user and wait for response
- forwardAndWait("/WEB-INF/guess/guess.jsp",
- { "random" : random,
- "hint" : hint,
- "guesses" : guesses} );
-
- // process user's guess
- var guess = parseInt( flow.context.param.guess );
- guesses++;
- if (guess) {
- if (guess > random) {
- hint = "Nope, lower!"
- }
- else if (guess < random) {
- hint = "Nope, higher!"
- }
- else {
- // correct guess
- break;
- }
- }
- }
-
- // send success page to user
- forwardAndWait("/WEB-INF/guess/success.jsp",
- {"random" : random,
- "guess" : guess,
- "guesses" : guesses} );
-*/
-
-// This function intercepts the forward back to Struts and renders the content
-// directly using Javascript Templates
-function renderTemplate(page, bizdata) {
- // if rpc call, use old forward, otherwise use template
- if (page == "n/a") {
- return _oldForwardAndWait(page, bizdata);
- } else {
- var k = new Continuation();
-
- // Use default ttl value from continuation manager
- var timeToLive = 0;
- var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
-
- bizdata.contid = kont.id;
- res = flow.context.response;
- stream = flow.context.context.getResourceAsStream("/WEB-INF/guess/"+page+".jt");
- if (stream != null) {
- text = new String(stream.getText());
- html = text.process(bizdata);
- res.contentType = "text/html";
- res.writer.print(html);
- res.writer.close();
- } else {
- res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
- }
-
- suicide();
- return kont;
- }
-}
-
-// Replace old forward method with ours, but keep a reference to it so we can
-// call it for remote flow responses
-this._oldForwardAndWait = _forwardAndWait;
-this._forwardAndWait = renderTemplate;
+flow.load("/templates/template.js");
+
+importClass(Packages.org.apache.commons.httpclient.HttpClient);
+importClass(Packages.org.apache.commons.httpclient.MultiThreadedHttpConnectionManager);
+importClass(Packages.org.apache.commons.httpclient.methods.GetMethod);
+importPackage(java.io);
+function doView() {
+
+ get = new GetMethod("http://mirage:8090/rp1/public/frontPage.do?debug=true&__accept_disclaimer__=true");
+
+ client = new HttpClient();
+ iGetResultCode = client.executeMethod(get);
+ body = get.getResponseBodyAsString();
+ xml = new XML(body);
+
+ forwardAndWait("frontPage",{"xml":xml});
+}
+
+/*
+ var random = Math.round( Math.random() * 9 ) + 1;
+ var hint = "No hint for you!"
+ var guesses = 0;
+
+ while (true) {
+
+ // send guess page to user and wait for response
+ forwardAndWait("/WEB-INF/guess/guess.jsp",
+ { "random" : random,
+ "hint" : hint,
+ "guesses" : guesses} );
+
+ // process user's guess
+ var guess = parseInt( flow.context.param.guess );
+ guesses++;
+ if (guess) {
+ if (guess > random) {
+ hint = "Nope, lower!"
+ }
+ else if (guess < random) {
+ hint = "Nope, higher!"
+ }
+ else {
+ // correct guess
+ break;
+ }
+ }
+ }
+
+ // send success page to user
+ forwardAndWait("/WEB-INF/guess/success.jsp",
+ {"random" : random,
+ "guess" : guess,
+ "guesses" : guesses} );
+*/
+
+// This function intercepts the forward back to Struts and renders the content
+// directly using Javascript Templates
+function renderTemplate(page, bizdata) {
+ // if rpc call, use old forward, otherwise use template
+ if (page == "n/a") {
+ return _oldForwardAndWait(page, bizdata);
+ } else {
+ var k = new Continuation();
+
+ // Use default ttl value from continuation manager
+ var timeToLive = 0;
+ var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
+
+ bizdata.contid = kont.id;
+ res = flow.context.response;
+ stream = flow.context.context.getResourceAsStream("/WEB-INF/guess/"+page+".jt");
+ if (stream != null) {
+ text = new String(stream.getText());
+ html = text.process(bizdata);
+ res.contentType = "text/html";
+ res.writer.print(html);
+ res.writer.close();
+ } else {
+ res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
+ }
+
+ suicide();
+ return kont;
+ }
+}
+
+// Replace old forward method with ours, but keep a reference to it so we can
+// call it for remote flow responses
+this._oldForwardAndWait = _forwardAndWait;
+this._forwardAndWait = renderTemplate;
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/numberguess.js.template
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js Sat Jan 21 14:12:20 2006
@@ -1,64 +1,64 @@
-flow.load("/templates/template.js");
-
-importClass(Packages.javax.portlet.PortletURL);
-
-// This function intercepts the forward back to Struts and renders the content
-// directly using Javascript Templates
-function processTemplateAndWait(page, bizdata) {
- // if rpc call, use old forward, otherwise use template
- if (page == "n/a") {
- return _oldForwardAndWait(page, bizdata);
- } else {
- var k = new Continuation();
-
- // Use default ttl value from continuation manager
- var timeToLive = 0;
- var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
-
- bizdata.contid = kont.id;
- processTemplate(page, bizdata);
- suicide();
- return kont;
- }
-}
-
-function processTemplate(page, bizdata) {
- res = flow.context.response;
- stream = flow.context.context.getResourceAsStream(page);
- if (stream != null) {
- text = new String(stream.getText());
- html = text.process(bizdata);
- res.contentType = "text/html";
- res.writer.print(html);
- res.flushBuffer();
- res.writer.close();
- } else {
- res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
- }
-}
-
-function renderUrl(params) {
- url = flow.context.response.createRenderURL();
- if (params && params.params) {
- for (x in params.params) {
- url.setParameter(x, params.params[x]);
- }
- }
- return url.toString();
-}
-
-function actionUrl(params) {
- url = flow.context.response.createActionURL();
- if (params && params.params) {
- for (x in params.params) {
- url.setParameter(x, params.params[x]);
- }
- }
- return url.toString();
-}
-
-
-// Replace old forward method with ours, but keep a reference to it so we can
-// call it for remote flow responses
-this._oldForwardAndWait = _forwardAndWait;
-this._forwardAndWait = processTemplateAndWait;
+flow.load("/templates/template.js");
+
+importClass(Packages.javax.portlet.PortletURL);
+
+// This function intercepts the forward back to Struts and renders the content
+// directly using Javascript Templates
+function processTemplateAndWait(page, bizdata) {
+ // if rpc call, use old forward, otherwise use template
+ if (page == "n/a") {
+ return _oldForwardAndWait(page, bizdata);
+ } else {
+ var k = new Continuation();
+
+ // Use default ttl value from continuation manager
+ var timeToLive = 0;
+ var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
+
+ bizdata.contid = kont.id;
+ processTemplate(page, bizdata);
+ suicide();
+ return kont;
+ }
+}
+
+function processTemplate(page, bizdata) {
+ res = flow.context.response;
+ stream = flow.context.context.getResourceAsStream(page);
+ if (stream != null) {
+ text = new String(stream.getText());
+ html = text.process(bizdata);
+ res.contentType = "text/html";
+ res.writer.print(html);
+ res.flushBuffer();
+ res.writer.close();
+ } else {
+ res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
+ }
+}
+
+function renderUrl(params) {
+ url = flow.context.response.createRenderURL();
+ if (params && params.params) {
+ for (x in params.params) {
+ url.setParameter(x, params.params[x]);
+ }
+ }
+ return url.toString();
+}
+
+function actionUrl(params) {
+ url = flow.context.response.createActionURL();
+ if (params && params.params) {
+ for (x in params.params) {
+ url.setParameter(x, params.params[x]);
+ }
+ }
+ return url.toString();
+}
+
+
+// Replace old forward method with ours, but keep a reference to it so we can
+// call it for remote flow responses
+this._oldForwardAndWait = _forwardAndWait;
+this._forwardAndWait = processTemplateAndWait;
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/portlet.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp Sat Jan 21 14:12:20 2006
@@ -1,50 +1,50 @@
-<?xml version="1.0"?>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
-<portlet:defineObjects/>
-
- <h1>Select Asset</h1>
-
- <table cellspacing="2" cellpadding="3">
- <tr>
- <td class="property">
- Asset search
- </td>
- <td>
- <portlet:renderURL var="submitUrl">
- <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
- </portlet:renderURL>
-
- <form method="GET" action="<%=submitUrl%>">
- <input name="name" type="text" size="15" /> 
- <input type="submit" value="Search" />
- </form>
- </td>
- </tr>
- <tr>
- <td class="property">
- Choose an asset
- </td>
- <td>
- <form method="GET" action="<%=submitUrl%>" >
- <select name="SystemKey">
-
- <%
- java.util.Map map = (java.util.Map)request.getAttribute("assets");
- boolean any = false;
- if (map != null) {
- for (java.util.Iterator i = map.keySet().iterator(); i.hasNext(); any=true) {
- String key = (String)i.next();
- %>
- <option value="<%=map.get(key)%>"><%=key%></option>
- <%}
- }
- if (!any) {%>
- <option value="">---- Assets ------</option>
- <%}%>
- </select> 
- <input type="submit" value="View" />
- </form>
- </td>
- </tr>
- </table>
-
+<?xml version="1.0"?>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+
+ <h1>Select Asset</h1>
+
+ <table cellspacing="2" cellpadding="3">
+ <tr>
+ <td class="property">
+ Asset search
+ </td>
+ <td>
+ <portlet:renderURL var="submitUrl">
+ <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
+ </portlet:renderURL>
+
+ <form method="GET" action="<%=submitUrl%>">
+ <input name="name" type="text" size="15" /> 
+ <input type="submit" value="Search" />
+ </form>
+ </td>
+ </tr>
+ <tr>
+ <td class="property">
+ Choose an asset
+ </td>
+ <td>
+ <form method="GET" action="<%=submitUrl%>" >
+ <select name="SystemKey">
+
+ <%
+ java.util.Map map = (java.util.Map)request.getAttribute("assets");
+ boolean any = false;
+ if (map != null) {
+ for (java.util.Iterator i = map.keySet().iterator(); i.hasNext(); any=true) {
+ String key = (String)i.next();
+ %>
+ <option value="<%=map.get(key)%>"><%=key%></option>
+ <%}
+ }
+ if (!any) {%>
+ <option value="">---- Assets ------</option>
+ <%}%>
+ </select> 
+ <input type="submit" value="View" />
+ </form>
+ </td>
+ </tr>
+ </table>
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax Sat Jan 21 14:12:20 2006
@@ -1,47 +1,47 @@
-<?xml version="1.0"?>
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
-<portlet:defineObjects/>
-
- <h1>Select Asset</h1>
-
- <script src="<%=request.getContextPath()+response.encodeURL("/js/vcXMLRPC.js")%>" />
- <script src="<%=request.getContextPath()+response.encodeURL("/js/finders.js")%>" />
- <table cellspacing="2" cellpadding="3">
- <tr>
- <td class="property">
- Asset search
- </td>
- <td>
- <form name="find">
- <input name="name" type="text" size="15" /> 
- <input type="button" value="Search" onclick="findNames(form.name.value, document.forms['list'].SystemKey, 'asset', true, []);" />
- </form>
- </td>
- </tr>
- <tr>
- <td class="property">
- Choose an asset
- </td>
- <td>
- <form name="list" >
- <select name="SystemKey">
- <option value="">---- Assets ------</option>
- </select> 
- <input type="submit" value="View" />
- </form>
- </td>
- </tr>
- </table>
-
- <h2><%= request.getAttribute("hint") %></h2>
-
- <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
-
-<portlet:renderURL var="submitUrl">
- <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
-</portlet:renderURL>
-
-<form action="<%=submitUrl%>">
- <input type="text" name="guess"/>
- <input type="submit"/>
- </form>
+<?xml version="1.0"?>
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+<portlet:defineObjects/>
+
+ <h1>Select Asset</h1>
+
+ <script src="<%=request.getContextPath()+response.encodeURL("/js/vcXMLRPC.js")%>" />
+ <script src="<%=request.getContextPath()+response.encodeURL("/js/finders.js")%>" />
+ <table cellspacing="2" cellpadding="3">
+ <tr>
+ <td class="property">
+ Asset search
+ </td>
+ <td>
+ <form name="find">
+ <input name="name" type="text" size="15" /> 
+ <input type="button" value="Search" onclick="findNames(form.name.value, document.forms['list'].SystemKey, 'asset', true, []);" />
+ </form>
+ </td>
+ </tr>
+ <tr>
+ <td class="property">
+ Choose an asset
+ </td>
+ <td>
+ <form name="list" >
+ <select name="SystemKey">
+ <option value="">---- Assets ------</option>
+ </select> 
+ <input type="submit" value="View" />
+ </form>
+ </td>
+ </tr>
+ </table>
+
+ <h2><%= request.getAttribute("hint") %></h2>
+
+ <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
+
+<portlet:renderURL var="submitUrl">
+ <portlet:param name="contid" value="<%= String.valueOf(request.getAttribute("contid")) %>"/>
+</portlet:renderURL>
+
+<form action="<%=submitUrl%>">
+ <input type="text" name="guess"/>
+ <input type="submit"/>
+ </form>
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jsp.ajax
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt Sat Jan 21 14:12:20 2006
@@ -1,37 +1,37 @@
-
- <h2>Select Asset</h2>
-
- <table cellspacing="2" cellpadding="3">
- <tr>
- <td class="property">
- Asset search
- </td>
- <td>
- <form method="GET" action="${%renderUrl({params:{contid:contid}})%}">
- <input name="name" type="text" size="15" /> 
- <input type="submit" value="Search" />
- </form>
- </td>
- </tr>
- {if this["assets"]}
- <tr>
- <td class="property">
- Choose an asset
- </td>
- <td>
- <form method="GET" action="${%renderUrl({params:{contid:contid}})%}" >
- <select name="SystemKey">
-
- {for x in assets}
- <option value="${x}">${x_index}</option>
- {forelse}
- <option value="">---- No assets found ------</option>
- {/for}
- </select> 
- <input type="submit" value="View" />
- </form>
- </td>
- </tr>
- {/if}
- </table>
-
+
+ <h2>Select Asset</h2>
+
+ <table cellspacing="2" cellpadding="3">
+ <tr>
+ <td class="property">
+ Asset search
+ </td>
+ <td>
+ <form method="GET" action="${%renderUrl({params:{contid:contid}})%}">
+ <input name="name" type="text" size="15" /> 
+ <input type="submit" value="Search" />
+ </form>
+ </td>
+ </tr>
+ {if this["assets"]}
+ <tr>
+ <td class="property">
+ Choose an asset
+ </td>
+ <td>
+ <form method="GET" action="${%renderUrl({params:{contid:contid}})%}" >
+ <select name="SystemKey">
+
+ {for x in assets}
+ <option value="${x}">${x_index}</option>
+ {forelse}
+ <option value="">---- No assets found ------</option>
+ {/for}
+ </select> 
+ <input type="submit" value="View" />
+ </form>
+ </td>
+ </tr>
+ {/if}
+ </table>
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/selectAsset.jt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp Sat Jan 21 14:12:20 2006
@@ -1,13 +1,13 @@
-<?xml version="1.0"?>
-
-<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
- <h1>Success!</h1>
-
- <h2>The number was: <%= request.getAttribute("random") %></h2>
-
- <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
-
- <portlet:renderURL var="url" />
- <p><a href="<%=url%>">Play again</a></p>
-
-
+<?xml version="1.0"?>
+
+<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
+ <h1>Success!</h1>
+
+ <h2>The number was: <%= request.getAttribute("random") %></h2>
+
+ <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
+
+ <portlet:renderURL var="url" />
+ <p><a href="<%=url%>">Play again</a></p>
+
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/success.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp Sat Jan 21 14:12:20 2006
@@ -1,2 +1,2 @@
-<%=request.getAttribute("body")%>
-
+<%=request.getAttribute("body")%>
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt (original)
+++ struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt Sat Jan 21 14:12:20 2006
@@ -1,31 +1,31 @@
-<h2>${xml.system.@nomenclature} ${xml.system.@name}</h2>
-
-<p>${xml.system.@description}</p>
-
-<h3>METOC Thresholds</h3>
-<table>
- <tr>
- <th>ID</th>
- <th>Impact</th>
- <th>Severity</th>
- <th>Threshold</th>
- </tr>
- {for rule in xml..rule}
- <tr>
- <td>${rule.@key}</td>
- <td>${rule.@condensedImpact}</td>
- <td>{if parseInt(rule.@weight)==1}
- Severe
- {else}
- Marginal
- {/if}
- </td>
- <td>${rule.limit[0].@metocParameter} ${rule.limit[0].@operator} ${rule.limit[0].@value}</td>
- </tr>
- {/for}
-</table>
-
-<p>
-<a href="${renderUrl()}">Back</a>
-</p>
-
+<h2>${xml.system.@nomenclature} ${xml.system.@name}</h2>
+
+<p>${xml.system.@description}</p>
+
+<h3>METOC Thresholds</h3>
+<table>
+ <tr>
+ <th>ID</th>
+ <th>Impact</th>
+ <th>Severity</th>
+ <th>Threshold</th>
+ </tr>
+ {for rule in xml..rule}
+ <tr>
+ <td>${rule.@key}</td>
+ <td>${rule.@condensedImpact}</td>
+ <td>{if parseInt(rule.@weight)==1}
+ Severe
+ {else}
+ Marginal
+ {/if}
+ </td>
+ <td>${rule.limit[0].@metocParameter} ${rule.limit[0].@operator} ${rule.limit[0].@value}</td>
+ </tr>
+ {/for}
+</table>
+
+<p>
+<a href="${renderUrl()}">Back</a>
+</p>
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/portlet/viewAsset.jt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js Sat Jan 21 14:12:20 2006
@@ -1,44 +1,44 @@
-NumberGuess = function() {
-
- this.play = function() {
-
- this.random = Math.round( Math.random() * 9 ) + 1;
- this.hint = "No hint for you!"
- this.guesses = 0;
-
- while (true) {
-
- // send guess page to user and wait for response
- flow.wait();
-
- // process user's guess
- this.guess = parseInt( params.guess );
- this.guesses++;
- if (this.guess) {
- if (this.guess > this.random) {
- this.hint = "Nope, lower!"
- }
- else if (this.guess < this.random) {
- this.hint = "Nope, higher!"
- }
- else {
- // correct guess
- break;
- }
- }
- }
-
- // send success page to user
- flash.guesses = this.guesses;
- flash.random = this.random;
-
- flow.redirect( { "action" : "endGame" } );
- }
-
- this.endGame = function() {}
-
- this.cheat = function() {
- this.guesses += 5;
- return {"secret":this.random, "guesses":this.guesses};
- }
-}
+NumberGuess = function() {
+
+ this.play = function() {
+
+ this.random = Math.round( Math.random() * 9 ) + 1;
+ this.hint = "No hint for you!"
+ this.guesses = 0;
+
+ while (true) {
+
+ // send guess page to user and wait for response
+ flow.wait();
+
+ // process user's guess
+ this.guess = parseInt( params.guess );
+ this.guesses++;
+ if (this.guess) {
+ if (this.guess > this.random) {
+ this.hint = "Nope, lower!"
+ }
+ else if (this.guess < this.random) {
+ this.hint = "Nope, higher!"
+ }
+ else {
+ // correct guess
+ break;
+ }
+ }
+ }
+
+ // send success page to user
+ flash.guesses = this.guesses;
+ flash.random = this.random;
+
+ flow.redirect( { "action" : "endGame" } );
+ }
+
+ this.endGame = function() {}
+
+ this.cheat = function() {
+ this.guesses += 5;
+ return {"secret":this.random, "guesses":this.guesses};
+ }
+}
Propchange: struts/flow/trunk/src/examples/WEB-INF/remote/flow/NumberGuess.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp Sat Jan 21 14:12:20 2006
@@ -1,18 +1,18 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game - Remote edition</title>
-</head>
-<body>
-
- <h1>Success!</h1>
-
- <h2>The number was: <%= request.getAttribute("random") %></h2>
-
- <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
-
- <p><a href="play.do">Play again</a></p>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game - Remote edition</title>
+</head>
+<body>
+
+ <h1>Success!</h1>
+
+ <h2>The number was: <%= request.getAttribute("random") %></h2>
+
+ <h3>It took you <%= request.getAttribute("guesses") %> tries.</h3>
+
+ <p><a href="play.do">Play again</a></p>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/remote/jsp/endGame.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp Sat Jan 21 14:12:20 2006
@@ -1,38 +1,38 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game - Remote edition</title>
- <script type="text/javascript">
- <!--
-function cheat() {
- dojo.io.bind({
- url: 'play.do?FlowCall=cheat&contid=<%= request.getAttribute("contid") %>',
- type: "text/javascript",
- load: function(type, data, evt) {
- eval("data = "+data);
- alert("The secret number is "+data.secret+". After applying a penalty, you have guessed "+data.guesses+" times");
- }
- });
-}
- -->
- </script>
- <script type="text/javascript" src="../dojo-io.js"></script>
-</head>
-<body>
-
- <h1>Guess the Number Between 1 and 10</h1>
-
- <h2><%= request.getAttribute("hint") %></h2>
-
- <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
-
- <form method="post" action="play.do">
- <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
- <input type="text" name="guess"/>
- <input type="submit"/>
- <input type="button" onclick="cheat()" value="Cheat" />
- </form>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game - Remote edition</title>
+ <script type="text/javascript">
+ <!--
+function cheat() {
+ dojo.io.bind({
+ url: 'play.do?FlowCall=cheat&contid=<%= request.getAttribute("contid") %>',
+ type: "text/javascript",
+ load: function(type, data, evt) {
+ eval("data = "+data);
+ alert("The secret number is "+data.secret+". After applying a penalty, you have guessed "+data.guesses+" times");
+ }
+ });
+}
+ -->
+ </script>
+ <script type="text/javascript" src="../dojo-io.js"></script>
+</head>
+<body>
+
+ <h1>Guess the Number Between 1 and 10</h1>
+
+ <h2><%= request.getAttribute("hint") %></h2>
+
+ <h3>You've guessed <%= request.getAttribute("guesses") %> times.</h3>
+
+ <form method="post" action="play.do">
+ <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
+ <input type="text" name="guess"/>
+ <input type="submit"/>
+ <input type="button" onclick="cheat()" value="Cheat" />
+ </form>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/remote/jsp/play.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js Sat Jan 21 14:12:20 2006
@@ -1,71 +1,71 @@
-NumberGuess = function() {
-
- this.play = function() {
-
- this.random = Math.round( Math.random() * 9 ) + 1;
- this.hint = "No hint for you!"
- this.guesses = 0;
-
- while (true) {
-
- // send guess page to user and wait for response
- flow.wait("play", this);
-
- // process user's guess
- this.guess = parseInt( params.guess );
- this.guesses++;
- if (this.guess) {
- if (this.guess > this.random) {
- this.hint = "Nope, lower!"
- }
- else if (this.guess < this.random) {
- this.hint = "Nope, higher!"
- }
- else {
- // correct guess
- break;
- }
- }
- }
-
- // send success page to user
- flash.guesses = this.guesses;
- flash.random = this.random;
-
- flow.redirect( { "action" : "endGame" } );
- }
-
- this.endGame = function() {
- renderTemplate("endGame", this);
- }
-
- this.cheat = function() {
- this.guesses += 5;
- return {"secret":this.random, "guesses":this.guesses};
- }
-}
-
-
-// This function renders the content directly using Javascript Templates
-function renderTemplateAndWait(page, bizdata, ttl) {
- var cont = new FOM_WebContinuation(new Continuation(), flow.continuation, ttl);
- bizdata.contid = cont.id;
- renderTemplate(page, bizdata);
- flow.forward(null, bizdata, cont);
- FOM_Flow.suicide();
-}
-
-function renderTemplate(page, bizdata) {
- var res = flow.context.response;
- var stream = struts.servletContext.getResourceAsStream("/WEB-INF/templates/jt/"+page+".jt");
- if (stream != null) {
- var text = new String(stream.getText());
- var html = text.process(bizdata);
- res.writer.print(html);
- res.writer.close();
- } else {
- res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
- }
-}
-
-FOM_Flow.prototype._wait=renderTemplateAndWait;
+NumberGuess = function() {
+
+ this.play = function() {
+
+ this.random = Math.round( Math.random() * 9 ) + 1;
+ this.hint = "No hint for you!"
+ this.guesses = 0;
+
+ while (true) {
+
+ // send guess page to user and wait for response
+ flow.wait("play", this);
+
+ // process user's guess
+ this.guess = parseInt( params.guess );
+ this.guesses++;
+ if (this.guess) {
+ if (this.guess > this.random) {
+ this.hint = "Nope, lower!"
+ }
+ else if (this.guess < this.random) {
+ this.hint = "Nope, higher!"
+ }
+ else {
+ // correct guess
+ break;
+ }
+ }
+ }
+
+ // send success page to user
+ flash.guesses = this.guesses;
+ flash.random = this.random;
+
+ flow.redirect( { "action" : "endGame" } );
+ }
+
+ this.endGame = function() {
+ renderTemplate("endGame", this);
+ }
+
+ this.cheat = function() {
+ this.guesses += 5;
+ return {"secret":this.random, "guesses":this.guesses};
+ }
+}
+
+
+// This function renders the content directly using Javascript Templates
+function renderTemplateAndWait(page, bizdata, ttl) {
+ var cont = new FOM_WebContinuation(new Continuation(), flow.continuation, ttl);
+ bizdata.contid = cont.id;
+ renderTemplate(page, bizdata);
+ flow.forward(null, bizdata, cont);
+ FOM_Flow.suicide();
+}
+
+function renderTemplate(page, bizdata) {
+ var res = flow.context.response;
+ var stream = struts.servletContext.getResourceAsStream("/WEB-INF/templates/jt/"+page+".jt");
+ if (stream != null) {
+ var text = new String(stream.getText());
+ var html = text.process(bizdata);
+ res.writer.print(html);
+ res.writer.close();
+ } else {
+ res.sendError(res.SC_INTERNAL_SERVER_ERROR, "Unable to find page "+page);
+ }
+}
+
+FOM_Flow.prototype._wait=renderTemplateAndWait;
Propchange: struts/flow/trunk/src/examples/WEB-INF/templates/flow/NumberGuess.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt (original)
+++ struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt Sat Jan 21 14:12:20 2006
@@ -1,18 +1,18 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game</title>
-</head>
-<body>
-
- <h1>Success!</h1>
-
- <h2>The number was: ${random}</h2>
-
- <h3>It took you ${guesses} tries.</h3>
-
- <p><a href="play.do">Play again</a></p>
-
- <a href="../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game</title>
+</head>
+<body>
+
+ <h1>Success!</h1>
+
+ <h2>The number was: ${random}</h2>
+
+ <h3>It took you ${guesses} tries.</h3>
+
+ <p><a href="play.do">Play again</a></p>
+
+ <a href="../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/templates/jt/endGame.jt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt (original)
+++ struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt Sat Jan 21 14:12:20 2006
@@ -1,48 +1,48 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title>Struts Flow number guessing game</title>
- <script type="text/javascript">
- <!--
-function cheat() {
- hint = document.getElementById("hint");
-
- dojo.io.bind({
- url: 'play.do?FlowCall=cheat&contid=${contid}',
- type: "text/javascript",
- load: function(type, data, evt) {
- eval("data = "+data);
- dojo.io.bind({
- url: "../cheat.jt",
- type: "text/plain",
- load: function(type, temp, evt) {
- hint.innerHTML = temp.process(data);
- }
- });
- }
- });
-}
- -->
- </script>
- <script type="text/javascript" src="../../remote/dojo-io.js"></script>
- <script type="text/javascript" src="../template.js"></script>
-</head>
-<body>
-
- <h1>Guess the Number Between 1 and 10</h1>
-
- <h2 id="hint">${hint}</h2>
-
- <h3>You've guessed ${guesses} times.</h3>
-
- <form method="post" action="play.do">
- <input type="hidden" name="contid" value="${contid}" />
- <input type="text" name="guess"/>
- <input type="submit"/>
- <input type="button" onclick="cheat()" value="Cheat" />
- </form>
-
- <a href="../../index.html">Return to index</a>
-
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title>Struts Flow number guessing game</title>
+ <script type="text/javascript">
+ <!--
+function cheat() {
+ hint = document.getElementById("hint");
+
+ dojo.io.bind({
+ url: 'play.do?FlowCall=cheat&contid=${contid}',
+ type: "text/javascript",
+ load: function(type, data, evt) {
+ eval("data = "+data);
+ dojo.io.bind({
+ url: "../cheat.jt",
+ type: "text/plain",
+ load: function(type, temp, evt) {
+ hint.innerHTML = temp.process(data);
+ }
+ });
+ }
+ });
+}
+ -->
+ </script>
+ <script type="text/javascript" src="../../remote/dojo-io.js"></script>
+ <script type="text/javascript" src="../template.js"></script>
+</head>
+<body>
+
+ <h1>Guess the Number Between 1 and 10</h1>
+
+ <h2 id="hint">${hint}</h2>
+
+ <h3>You've guessed ${guesses} times.</h3>
+
+ <form method="post" action="play.do">
+ <input type="hidden" name="contid" value="${contid}" />
+ <input type="text" name="guess"/>
+ <input type="submit"/>
+ <input type="button" onclick="cheat()" value="Cheat" />
+ </form>
+
+ <a href="../../index.html">Return to index</a>
+
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/templates/jt/play.jt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/web.xml?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/web.xml (original)
+++ struts/flow/trunk/src/examples/WEB-INF/web.xml Sat Jan 21 14:12:20 2006
@@ -1,60 +1,60 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
- <!-- Action Servlet Configuration -->
- <servlet>
- <servlet-name>action</servlet-name>
- <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
- <init-param>
- <param-name>configs</param-name>
- <param-value>/WEB-INF/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>config/guess</param-name>
- <param-value>/WEB-INF/struts-config.xml,/WEB-INF/guess/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>config/remote</param-name>
- <param-value>/WEB-INF/struts-config.xml,/WEB-INF/remote/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>config/templates</param-name>
- <param-value>/WEB-INF/struts-config.xml,/WEB-INF/templates/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>config/wizard</param-name>
- <param-value>/WEB-INF/struts-config.xml,/WEB-INF/wizard/struts-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>config/rails</param-name>
- <param-value>org/apache/struts/flow/struts-config.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet>
- <servlet-name>FlowPortlet</servlet-name>
- <display-name>FlowPortlet Wrapper</display-name>
- <description>Automated generated Portlet Wrapper</description>
- <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
- <init-param>
- <param-name>portlet-guid</param-name>
- <param-value>examples.FlowPortlet</param-value>
- </init-param>
- <init-param>
- <param-name>portlet-class</param-name>
- <param-value>org.apache.struts.flow.portlet.FlowPortlet</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>FlowPortlet</servlet-name>
- <url-pattern>/FlowPortlet/*</url-pattern>
- </servlet-mapping>
-
- <!-- Action Servlet Mapping -->
- <servlet-mapping>
- <servlet-name>action</servlet-name>
- <url-pattern>*.do</url-pattern>
- </servlet-mapping>
-</web-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <!-- Action Servlet Configuration -->
+ <servlet>
+ <servlet-name>action</servlet-name>
+ <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
+ <init-param>
+ <param-name>configs</param-name>
+ <param-value>/WEB-INF/struts-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>config/guess</param-name>
+ <param-value>/WEB-INF/struts-config.xml,/WEB-INF/guess/struts-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>config/remote</param-name>
+ <param-value>/WEB-INF/struts-config.xml,/WEB-INF/remote/struts-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>config/templates</param-name>
+ <param-value>/WEB-INF/struts-config.xml,/WEB-INF/templates/struts-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>config/wizard</param-name>
+ <param-value>/WEB-INF/struts-config.xml,/WEB-INF/wizard/struts-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>config/rails</param-name>
+ <param-value>org/apache/struts/flow/struts-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>FlowPortlet</servlet-name>
+ <display-name>FlowPortlet Wrapper</display-name>
+ <description>Automated generated Portlet Wrapper</description>
+ <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
+ <init-param>
+ <param-name>portlet-guid</param-name>
+ <param-value>examples.FlowPortlet</param-value>
+ </init-param>
+ <init-param>
+ <param-name>portlet-class</param-name>
+ <param-value>org.apache.struts.flow.portlet.FlowPortlet</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>FlowPortlet</servlet-name>
+ <url-pattern>/FlowPortlet/*</url-pattern>
+ </servlet-mapping>
+
+ <!-- Action Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>action</servlet-name>
+ <url-pattern>*.do</url-pattern>
+ </servlet-mapping>
+</web-app>
Propchange: struts/flow/trunk/src/examples/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js (original)
+++ struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js Sat Jan 21 14:12:20 2006
@@ -1,39 +1,39 @@
-flow.load("/WEB-INF/wizard/flow/wizard.js");
-
-Registration = function() {
-
- this.start = function() {
- var model = new java.util.HashMap();
-
- var wizard = new Wizard(model);
- wizard.populate = populate;
- wizard.validate = validate;
-
- wizard.showForm( { "action" : "name-form" }, {
- "title" : "User Name Information"
- });
- wizard.showForm( { "action" : "hobbies-form" }, {
- "title" : "User Hobbies"
- });
- wizard.showForm( { "action" : "summary-form" } , {
- "title" : "User Summary"
- });
- };
-}
-
-function populate() {
- var m = struts.paramValues;
- for (var i = m.keySet().iterator(); i.hasNext(); ) {
- var key = i.next();
- this.model.put(key, m.get(key)[0]);
- }
- // Bug in commons-chain prevents this
- //this.model.putAll(struts.paramValues);
-}
-
-function validate() {
- if (this.model.get("name").length() < 2) {
- return "Name must be specified";
- }
-}
-
+flow.load("/WEB-INF/wizard/flow/wizard.js");
+
+Registration = function() {
+
+ this.start = function() {
+ var model = new java.util.HashMap();
+
+ var wizard = new Wizard(model);
+ wizard.populate = populate;
+ wizard.validate = validate;
+
+ wizard.showForm( { "action" : "name-form" }, {
+ "title" : "User Name Information"
+ });
+ wizard.showForm( { "action" : "hobbies-form" }, {
+ "title" : "User Hobbies"
+ });
+ wizard.showForm( { "action" : "summary-form" } , {
+ "title" : "User Summary"
+ });
+ };
+}
+
+function populate() {
+ var m = struts.paramValues;
+ for (var i = m.keySet().iterator(); i.hasNext(); ) {
+ var key = i.next();
+ this.model.put(key, m.get(key)[0]);
+ }
+ // Bug in commons-chain prevents this
+ //this.model.putAll(struts.paramValues);
+}
+
+function validate() {
+ if (this.model.get("name").length() < 2) {
+ return "Name must be specified";
+ }
+}
+
Propchange: struts/flow/trunk/src/examples/WEB-INF/wizard/flow/Registration.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/flow/trunk/src/examples/WEB-INF/wizard/flow/wizard.js
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp Sat Jan 21 14:12:20 2006
@@ -1,37 +1,37 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title><%=request.getAttribute("title")%></title>
-</head>
-<body>
-
- <h1><%=request.getAttribute("title")%></h1>
- <p>
- Enter your hobbies:
- </p>
-
- <center style="color:red"><%=(request.getAttribute("errors") != null ? request.getAttribute("errors") : "")%></center>
-
- <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
- <form action="registration.do" method="POST">
- <table>
- <tr>
- <th>Favorite Sport</th>
- <td><input type="text" name="sport" value="<%=(form.get("sport") != null ? form.get("sport") : "")%>"/></td>
- </tr>
-
- <tr>
- <th>Favorite Book</th>
- <td><input type="text" name="book" value="<%=(form.get("book") != null ? form.get("book") : "")%>"/></td>
- </tr>
-
- </table>
-
- <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
- <input type="submit" name="prev" value="Previous" />
- <input type="submit" name="next" value="Next" />
- </form>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title><%=request.getAttribute("title")%></title>
+</head>
+<body>
+
+ <h1><%=request.getAttribute("title")%></h1>
+ <p>
+ Enter your hobbies:
+ </p>
+
+ <center style="color:red"><%=(request.getAttribute("errors") != null ? request.getAttribute("errors") : "")%></center>
+
+ <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
+ <form action="registration.do" method="POST">
+ <table>
+ <tr>
+ <th>Favorite Sport</th>
+ <td><input type="text" name="sport" value="<%=(form.get("sport") != null ? form.get("sport") : "")%>"/></td>
+ </tr>
+
+ <tr>
+ <th>Favorite Book</th>
+ <td><input type="text" name="book" value="<%=(form.get("book") != null ? form.get("book") : "")%>"/></td>
+ </tr>
+
+ </table>
+
+ <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
+ <input type="submit" name="prev" value="Previous" />
+ <input type="submit" name="next" value="Next" />
+ </form>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/hobbies-form.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp Sat Jan 21 14:12:20 2006
@@ -1,40 +1,40 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title><%=request.getAttribute("title")%></title>
-</head>
-<body>
-
- <h1><%=request.getAttribute("title")%></h1>
- <p>
- Enter your name information:
- </p>
-
- <center style="color:red"><%=(request.getAttribute("errors") != null ? request.getAttribute("errors") : "")%></center>
- <form action="registration.do" method="POST">
-
- <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
- <table>
- <tr>
- <th>First Name</th>
- <td><input type="text" name="name" value="<%=(form.get("name") != null ? form.get("name") : "")%>"/></td>
- </tr>
-
- <tr>
- <th>Last Name</th>
- <td><input type="text" name="lastname" value="<%=(form.get("lastname") != null ? form.get("lastname") : "")%>"/></td>
- </tr>
-
- <tr>
- <th>Middle Name</th>
- <td><input type="text" name="middlename" value="<%=(form.get("middlename") != null ? form.get("middlename") : "")%>"/></td>
- </tr>
- </table>
-
- <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
- <input type="submit" name="next" value="Next" />
- </form>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title><%=request.getAttribute("title")%></title>
+</head>
+<body>
+
+ <h1><%=request.getAttribute("title")%></h1>
+ <p>
+ Enter your name information:
+ </p>
+
+ <center style="color:red"><%=(request.getAttribute("errors") != null ? request.getAttribute("errors") : "")%></center>
+ <form action="registration.do" method="POST">
+
+ <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
+ <table>
+ <tr>
+ <th>First Name</th>
+ <td><input type="text" name="name" value="<%=(form.get("name") != null ? form.get("name") : "")%>"/></td>
+ </tr>
+
+ <tr>
+ <th>Last Name</th>
+ <td><input type="text" name="lastname" value="<%=(form.get("lastname") != null ? form.get("lastname") : "")%>"/></td>
+ </tr>
+
+ <tr>
+ <th>Middle Name</th>
+ <td><input type="text" name="middlename" value="<%=(form.get("middlename") != null ? form.get("middlename") : "")%>"/></td>
+ </tr>
+ </table>
+
+ <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
+ <input type="submit" name="next" value="Next" />
+ </form>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/name-form.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp
URL: http://svn.apache.org/viewcvs/struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp?rev=371123&r1=371122&r2=371123&view=diff
==============================================================================
--- struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp (original)
+++ struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp Sat Jan 21 14:12:20 2006
@@ -1,48 +1,48 @@
-<?xml version="1.0"?>
-<html>
-<head>
- <title><%=request.getAttribute("title")%></title>
-</head>
-<body>
-
- <h1><%=request.getAttribute("title")%></h1>
- <p>
- Congratulations!
- </p>
-
- <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
- <table border="1">
- <tr>
- <th>First Name</th>
- <td><%=form.get("name")%></td>
- </tr>
-
- <tr>
- <th>Last Name</th>
- <td><%=form.get("lastname")%></td>
- </tr>
-
- <tr>
- <th>Middle Name</th>
- <td><%=form.get("middlename")%></td>
- </tr>
-
- <tr>
- <th>Favorite Sport</th>
- <td><%=form.get("sport")%></td>
- </tr>
-
- <tr>
- <th>Favorite Book</th>
- <td><%=form.get("book")%></td>
- </tr>
- </table>
-
- <form action="registration.do" method="POST">
- <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
- <input type="submit" name="prev" value="Previous" />
- </form>
-
- <a href="../../index.html">Return to index</a>
-</body>
-</html>
+<?xml version="1.0"?>
+<html>
+<head>
+ <title><%=request.getAttribute("title")%></title>
+</head>
+<body>
+
+ <h1><%=request.getAttribute("title")%></h1>
+ <p>
+ Congratulations!
+ </p>
+
+ <% java.util.Map form = (java.util.Map)request.getAttribute("form"); %>
+ <table border="1">
+ <tr>
+ <th>First Name</th>
+ <td><%=form.get("name")%></td>
+ </tr>
+
+ <tr>
+ <th>Last Name</th>
+ <td><%=form.get("lastname")%></td>
+ </tr>
+
+ <tr>
+ <th>Middle Name</th>
+ <td><%=form.get("middlename")%></td>
+ </tr>
+
+ <tr>
+ <th>Favorite Sport</th>
+ <td><%=form.get("sport")%></td>
+ </tr>
+
+ <tr>
+ <th>Favorite Book</th>
+ <td><%=form.get("book")%></td>
+ </tr>
+ </table>
+
+ <form action="registration.do" method="POST">
+ <input type="hidden" name="contid" value='<%= request.getAttribute("contid") %>' />
+ <input type="submit" name="prev" value="Previous" />
+ </form>
+
+ <a href="../../index.html">Return to index</a>
+</body>
+</html>
Propchange: struts/flow/trunk/src/examples/WEB-INF/wizard/jsp/summary-form.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: struts/flow/trunk/src/examples/index.html
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org