cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arcadio Pando Cao <>
Subject Concurrent access to flowscript mixes variable content
Date Wed, 29 Sep 2004 13:18:04 GMT

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


var test = null;

function mypage() {

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


   var session = cocoon.session;

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

                   {"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 

Thanks a lot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message