Hi all

We are using GWT 1.4.x for a larger web application and we got reports
from some customers, that they see only an empty start page. These
reports are very rare and hard to reproduce (we can't reproduce it in
our environment)

Today I spent time on a customer site and and debugged the generated
JavaScript Code and found two possible bugs in the generated
JavaScript code. These are both not tied to our special application
but it looks like there are some problems in the generic start code.

Our application starts with GUI.html which loads the generated
com.aod.GUI.nocache.js which then should load a generated application
cache file like '278A6CEE55E17277BC30FF22BE7EC49F.cache.html'

However, this doe not always work for 2 reasons:

1) The JavaScript does not always find the application cache file,
e.g. if the user.agent is not unrecognized, there is no useful error
message:

   else {
    try {
      unflattenKeylistIntoAnswers(['default', 'gecko1_8'],
'278A6CEE55E17277BC30FF22BE7EC49F');
      unflattenKeylistIntoAnswers(['default', 'opera'],
'3A949F730D03A2193FC5997EAFEB53FB');
      unflattenKeylistIntoAnswers(['default', 'gecko'],
'4976F0D88DB5DD9126730A97428F8064');
      unflattenKeylistIntoAnswers(['default', 'ie6'],
'9065C062B3CE40889AD7450AA889D000');
      unflattenKeylistIntoAnswers(['default', 'safari'],
'F7EDC28497D316A3E0229FA7E074D99E');
      strongName = answers[computePropValue('locale')][computePropValue
('user.agent')];
    }
     catch (e) {
      return;
    }
    strongName += '.cache.html';
  }

if the user.agent is not known, an exception is thrown and catched
without any error message.

QUESTION: Is it possible to define a file for 'unknwon' useragents?

I fixed this by adding 'unkwnon' to the values['user.agent']  array:

185c183
<   values['user.agent'] = {'gecko':0, 'gecko1_8':1, 'ie6':2, 'opera':
3, 'safari':4, 'unknown': 5};
---
>   values['user.agent'] = {'gecko':0, 'gecko1_8':1, 'ie6':2, 'opera':3, 
> 'safari':4};

and adding an default entry to the list:

<       unflattenKeylistIntoAnswers(['default', 'unknown'],
'278A6CEE55E17277BC30FF22BE7EC49F');


2) Sometimes, even if the strongName is found, the loading of the file
sometimes stopped. We fixed this by changing the generated function
from

  function maybeInjectFrame(){
    if (!scriptInjected && $doc.body) {
      scriptInjected = true;
      var iframe = $doc.createElement('iframe');
      iframe.src = "javascript:''";
      iframe.id = 'com.aod.GUI';
      iframe.style.cssText = 'position:absolute;width:0;height:
0;border:none';
      $doc.body.appendChild(iframe);
      iframe.src = base + strongName;
    }
  }

and added an

 $doc.location.href += '#';

after the

 iframe.src = base + strongName;

line.

QUESTION: Is this a known problem?

Any ideas what happens here?

Thanks for all responses

    Mirko



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to