Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    body.onload never called in hybrid application

    I am trying to integrate an existing Prototype (JS) based web application with GWT & SmartGWT.

    Just GWT integration works fine. Existing content and GWT content are displayed in different divs.

    But after adding "inherits SmartGWT" into module xml (without changing anything else) and recompiling, "body.onload" is not called. Prototype's "dom:loaded" event is neither.

    I just can not find anything useful (like an error message) in Firebug console, indeed I am not very keen on debugging javascript applications.

    Every library is at latest stable build, Prototype 1.7, GWT 2.4, SmartGWT 2.5. I have tested on all browsers, works on none.

    #2
    Make sure that the JavaScript files for Prototype are loaded *before* the ones for SmartGWT. SmartGWT carefully preserve's Prototype functionality such as onload handlers and extensions to Array.

    Comment


      #3
      I solved my problem after learning about the SmartClient Developer Console.

      The problem was a name collision with a warning log:

      Code:
      21:36:36.826:WARN:Log:New Class ID: 'Toolbar' collides with ID of existing object with value 'function klass() {
          this.initialize.apply(this, arguments);
      }'.  Existing object will be replaced.
      This conflict would be avoided by disabling ISC Simple Names mode.  See documentation for further information.
      I renamed my class and voila! Two days of struggling because of illiteracy.

      Anyway, IMHO, this warning log should have propogated to main console of the application.

      Comment


        #4
        It can't be propagated (too early in application startup). This is one reason why opening the Developer Console is considered step 1 for troubleshooting.

        Comment

        Working...
        X