Hello,

I discover a strange behaviour when I execute this flowscript from two clients at the same time:

mypage.js:

var test = null;

function mypage() {
  cocoon.session.invalidate();

  var form = new Form("logica/forms/mypage.xml");
  form.showForm("mypage1.template");

  ......

  var session = cocoon.session;

  print("test [" + test + "]");
  test = form.lookupWidget("nameWidget").getValue();

  form.showForm("mypage2.template",
                  {"sessionId" : session.getId(),
                  "sessionNew" : session.isNew(),
                  "sessionCreateTime" : session.getCreationTime(),
                  "sessionLastAccess" : session.getLastAccessedTime()});
}

the problem is that when I try this flowscript from two navigators (IE6) in the same machine, and after the second showForm() I press the navigator's back button, then I submit the form again and the value of 'test' in the print is the value put by the last navigator, I'll try to explain it with an example:

time     navigator1                     navigator2
---------------------------------------------------
 0       showForm("mypage1")
 1                                      showForm("mypage1")
 2       submit => nameWidget='A'
         test [null]
 3                                      submit => nameWidget='B'
                                        test [null]
 4       <back button>
 5                                      <back button>
 6       submit => nameWidget='C'
         test [B]
 7                                      submit => nameWidget='D'
                                        test [C]


so as you can see, the values of the variable 'test' are mixed in the two sessions, even though the session ID's are different


I've tried the same test with the two navigators in different machines and the output is correct

is it a bug or I'm using it incorrectly? is there a problem with global variables?

Thanks a lot
Arcadio

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to