users@woodstock.java.net

Re: Woodstock 4.2M1 async update Javascript error in Internet Explorer

From: Dan Labrecque <Dan.Labrecque_at_Sun.COM>
Date: Thu, 14 Feb 2008 16:38:13 -0500

I have to defer your DynaFaces question to the
users_at_jsf-extensions.dev.java.net alias.

Dan

autozoom wrote:
> I am trying to update a Woodstock 4.2M1 table using Dynafaces transactions,
> but I get a Javascript error using Internet Explorer 6 and 7.
> The error says "'null' is null or not an object" and it happens on
> re-rendering of the table (I know this because debugging my app I see that
> the prerender() method is correctly hit).
>
> When debugging the javascript, error happens in prototype.js file in this
> code snippet:
>
> respondToReadyState: function(readyState) {
> var event = Ajax.Request.Events[readyState];
> var transport = this.transport, json = this.evalJSON();
>
> if (event == 'Complete') {
> try {
> (this.options['on' + this.transport.status]
> || this.options['on' + (this.responseIsSuccess() ? 'Success' :
> 'Failure')]
> || Prototype.emptyFunction)(transport, json);
> } catch (e) {
> this.dispatchException(e);
> }
>
> if ((this.header('Content-type') || '').match(/^text\/javascript/i))
> this.evalResponse();
> }
>
> try {
> (this.options['on' + event] || Prototype.emptyFunction)(transport,
> json);
> Ajax.Responders.dispatch('on' + event, this, transport, json);
> } catch (e) {
> this.dispatchException(e);
> }
>
> /* Avoid memory leak in MSIE: clean up the oncomplete event handler */
> if (event == 'Complete')
> this.transport.onreadystatechange = Prototype.emptyFunction;
> },
>
> dispatchException: function(exception) {
> (this.options.onException || Prototype.emptyFunction)(this, exception);
> Ajax.Responders.dispatch('onException', this, exception);
> }
> });
>
> actually the "json" variable is "undefined" because the call to
> this.evalJSON() returns nothing.
>
> Everything is working perfectly using Firefox.
>
> Any ideas or hints about a possible workaround?
>
> thanks
>
> Mauro
>