cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Oliver <res1c...@verizon.net>
Subject Re: Problem with JPetStore
Date Fri, 21 Mar 2003 18:07:13 GMT
Sylvain Wallez wrote:
> Christopher Oliver wrote:
> 
>> Sylvain Wallez wrote: 
> 
> 
> 
> <snip/>
> 
>>> Does JavaScript, like Java, make a difference between primitive types 
>>> (stored by value on the stack) and object types (stored by reference) 
>>> ? My understanding after some tests is that a difference is made.
>>
>>
>>
>> No, there shouldn't be any difference. If there is, it's a bug. What 
>> was your test? 
> 
> 
> 
> Here's my test (see below). I modified the viewCategory function in 
> PetStore to track the value of "skipResults", and observed that when you 
> use the browser back button and then reload the page, "skipResults" is 
> correctly restored but not "foo.skip" which is set to the same value.
> 
> However, I realize now that my analyzis of the result (special handing 
> of primitive types) was wrong. Writing "skipResults = 1" in JavaScript 
> is equivalent to writing "Integer skipResults = new Integer(1)" in Java. 
> This means "skipResults" refers to a new object of type Integer. And the 
> reference to this object is restored when the continuation is restored.
> 

Yes, that's correct. Now can you help me with this problem:

http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=104818906732548&w=2 :)

Regards,

Chris


Mime
View raw message