Potential bug in DWR Reverse Ajax v2.0.1

View: New views
3 Messages — Rating Filter:   Alert me  

Potential bug in DWR Reverse Ajax v2.0.1

by James Mortensen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

After attempting to get DWR comet to work in Internet Explorer 6 using v2.0.2, I reverted back to 2.0.1 based on information found in this forum.

In Mozilla Firefox, when I browse to the debug test page for my class and click on one of the methods, my log shows only one call to the constructor for the class.  

However, in Internet Explorer 6, my constructor is called twice, and two objects are created!  I can't see why this would occur in IE but work fine in Firefox.  Below is by dwr.xml configuration:

<dwr>
  <allow>
    <create creator="new" javascript="MyClass" scope="session">
     
    </create>
  </allow>
</dwr>

I have a static variable in my constructor that records the number of objects that have been created.  When I output the integer to the log it shows 2 objects instead of 1 in Internet Explorer 6.

I also tried commenting out the dwr initializer in the body onload attribute, which did not resolve the problem:

<body onload="/*dwr.engine.setActiveReverseAjax(true);*/">

Essentially, I have 0 objects until I click one of the methods, then there are 2.  Is this really a bug or do I have something miconfigured that is IE-specific?

Thanks,
James Mortensen

Re: Potential bug in DWR Reverse Ajax v2.0.1

by James Mortensen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think I solved my own problem after "digging" through the documentation.  The solution was to set the scope attribute for the creator element in dwr.xml to "script".  This eliminated the bug in Internet Explorer 6.

Although I didn't find a bug in the code, I have found a bug in the documentation.  The link below describes only the four following scope attributes:  "application", "session", "request" and "page".

http://getahead.org/dwr/server/dwrxml/creators

I found documentation on the "script" attribute in the changelog located here:

http://getahead.org/dwr/changelog/dwr20

Please update the documentation on creators to reflect this scope attribute so that others will not have to chase their tail :)

Thank you,
James Mortensen




James Mortensen wrote:
Hello,

After attempting to get DWR comet to work in Internet Explorer 6 using v2.0.2, I reverted back to 2.0.1 based on information found in this forum.

In Mozilla Firefox, when I browse to the debug test page for my class and click on one of the methods, my log shows only one call to the constructor for the class.  

However, in Internet Explorer 6, my constructor is called twice, and two objects are created!  I can't see why this would occur in IE but work fine in Firefox.  Below is by dwr.xml configuration:

<dwr>
  <allow>
    <create creator="new" javascript="MyClass" scope="session">
     
    </create>
  </allow>
</dwr>

I have a static variable in my constructor that records the number of objects that have been created.  When I output the integer to the log it shows 2 objects instead of 1 in Internet Explorer 6.

I also tried commenting out the dwr initializer in the body onload attribute, which did not resolve the problem:

<body onload="/*dwr.engine.setActiveReverseAjax(true);*/">

Essentially, I have 0 objects until I click one of the methods, then there are 2.  Is this really a bug or do I have something miconfigured that is IE-specific?

Thanks,
James Mortensen

Re: Potential bug in DWR Reverse Ajax v2.0.1

by Joe Walker-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks, I've done the update.
Joe

On Dec 11, 2007 1:43 AM, James Mortensen <james.mortensen@...> wrote:

I think I solved my own problem after "digging" through the documentation.
The solution was to set the scope attribute for the creator element in
dwr.xml to "script".  This eliminated the bug in Internet Explorer 6.

Although I didn't find a bug in the code, I have found a bug in the
documentation.  The link below describes only the four following scope
attributes:  "application", "session", "request" and "page".

http://getahead.org/dwr/server/dwrxml/creators

I found documentation on the "script" attribute in the changelog located
here:

http://getahead.org/dwr/changelog/dwr20

Please update the documentation on creators to reflect this scope attribute
so that others will not have to chase their tail :)

Thank you,
James Mortensen





James Mortensen wrote:

>
> Hello,
>
> After attempting to get DWR comet to work in Internet Explorer 6 using
> v2.0.2, I reverted back to 2.0.1 based on information found in this forum.
>
> In Mozilla Firefox, when I browse to the debug test page for my class and
> click on one of the methods, my log shows only one call to the constructor
> for the class.
>
> However, in Internet Explorer 6, my constructor is called twice, and two
> objects are created!  I can't see why this would occur in IE but work fine
> in Firefox.  Below is by dwr.xml configuration:
>
> <dwr>
>   <allow>
>     <create creator="new" javascript="MyClass" scope="session">
>
>     </create>
>   </allow>

> </dwr>
>
> I have a static variable in my constructor that records the number of
> objects that have been created.  When I output the integer to the log it
> shows 2 objects instead of 1 in Internet Explorer 6.
>
> I also tried commenting out the dwr initializer in the body onload
> attribute, which did not resolve the problem:
>
> <body onload="/*dwr.engine.setActiveReverseAjax(true);*/">
>
> Essentially, I have 0 objects until I click one of the methods, then there
> are 2.  Is this really a bug or do I have something miconfigured that is
> IE-specific?
>
> Thanks,
> James Mortensen
>
>

--
View this message in context: http://www.nabble.com/Potential-bug-in-DWR-Reverse-Ajax-v2.0.1-tp14265395p14265983.html
Sent from the DWR - Issues mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


LightInTheBox - Buy quality products at wholesale price