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 2005/04/11 06:07:15 UTC
svn commit: r160827 - in struts/core/trunk/doc/flow: guess-example.xml
remote-example.xml templates-example.xml wizard-example.xml
Author: mrdon
Date: Sun Apr 10 21:07:12 2005
New Revision: 160827
URL: http://svn.apache.org/viewcvs?view=rev&rev=160827
Log:
Updating examples for new flow variables
Modified:
struts/core/trunk/doc/flow/guess-example.xml
struts/core/trunk/doc/flow/remote-example.xml
struts/core/trunk/doc/flow/templates-example.xml
struts/core/trunk/doc/flow/wizard-example.xml
Modified: struts/core/trunk/doc/flow/guess-example.xml
URL: http://svn.apache.org/viewcvs/struts/core/trunk/doc/flow/guess-example.xml?view=diff&r1=160826&r2=160827
==============================================================================
--- struts/core/trunk/doc/flow/guess-example.xml (original)
+++ struts/core/trunk/doc/flow/guess-example.xml Sun Apr 10 21:07:12 2005
@@ -30,7 +30,7 @@
"guesses" : guesses} );
// process user's guess
- var guess = parseInt( getRequestParams().guess );
+ var guess = parseInt( struts.param.guess );
guesses++;
if (guess) {
if (guess > random) {
Modified: struts/core/trunk/doc/flow/remote-example.xml
URL: http://svn.apache.org/viewcvs/struts/core/trunk/doc/flow/remote-example.xml?view=diff&r1=160826&r2=160827
==============================================================================
--- struts/core/trunk/doc/flow/remote-example.xml (original)
+++ struts/core/trunk/doc/flow/remote-example.xml Sun Apr 10 21:07:12 2005
@@ -40,9 +40,9 @@
"guesses" : guesses},
["cheat"]);
- print("processing a user guess "+getRequestParams().guess);
+ print("processing a user guess "+struts.param.guess);
// process user's guess
- var guess = parseInt( getRequestParams().guess );
+ var guess = parseInt( struts.param.guess );
guesses++;
if (guess) {
if (guess > random) {
Modified: struts/core/trunk/doc/flow/templates-example.xml
URL: http://svn.apache.org/viewcvs/struts/core/trunk/doc/flow/templates-example.xml?view=diff&r1=160826&r2=160827
==============================================================================
--- struts/core/trunk/doc/flow/templates-example.xml (original)
+++ struts/core/trunk/doc/flow/templates-example.xml Sun Apr 10 21:07:12 2005
@@ -35,7 +35,7 @@
directly. Here is what the new parts of the flow code looks like:
</p>
<pre>
-context.load("/templates/template.js");
+flow.load("/templates/template.js");
...
@@ -50,11 +50,11 @@
// Use default ttl value from continuation manager
var timeToLive = 0;
- var kont = new WebContinuation(context, k, lastContinuation, timeToLive);
+ var kont = new WebContinuation(flow, k, lastContinuation, timeToLive);
bizdata.contid = kont.id;
- res = context.chainContext.response;
- stream = context.chainContext.context.getResourceAsStream("/WEB-INF/templates/"+page+".jt");
+ res = struts.response;
+ stream = struts.servletContext.getResourceAsStream("/WEB-INF/templates/"+page+".jt");
if (stream != null) {
text = new String(stream.getText());
html = text.process(bizdata);
Modified: struts/core/trunk/doc/flow/wizard-example.xml
URL: http://svn.apache.org/viewcvs/struts/core/trunk/doc/flow/wizard-example.xml?view=diff&r1=160826&r2=160827
==============================================================================
--- struts/core/trunk/doc/flow/wizard-example.xml (original)
+++ struts/core/trunk/doc/flow/wizard-example.xml Sun Apr 10 21:07:12 2005
@@ -26,7 +26,7 @@
<pre>
importPackage(Packages.java.util);
-context.load("/WEB-INF/wizard.js");
+flow.load("/WEB-INF/wizard.js");
function main() {
var model = new HashMap();
@@ -51,13 +51,13 @@
}
function populate() {
- m = context.chainContext.paramValues;
+ m = struts.paramValues;
for (i = m.keySet().iterator(); i.hasNext(); ) {
key = i.next();
this.model.put(key, m.get(key)[0]);
}
// Bug in commons-chain prevents this
- //this.model.putAll(context.chainContext.getParamValues());
+ //this.model.putAll(struts.paramValues);
}
function validate() {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org