Announcement

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

    SmartGWT widgets not displayed, Firebug shows "TypeError: $wnd.isc is undefined"

    Hello,
    I have created a sample GWT application using webappcreator and I have imported it in NetBeans 7.3 to run on Glassfish 3.1.2.2. After I configure the classpath entries correctly on the build.xml file, I can build the code, deploy it on Glassfish and run it without issues.

    I then added the SmartGWT library to the gtw.xml file and to the build.xml file. When I try to add a new SmartGWT widget to my page, this does not get displayed and the following error is shown in Firebug (on Firefox 35):
    Code:
    TypeError: $wnd.isc is undefined
    I'm using GWT 2.6.1 and SmartGWT 5.0. Using GWT 2.7.0 or SmartGWT 4.1 seem to produce the same problem.

    How can I resolve this issue?

    My module gwt.xml file contains the following lines to enable SmartGWT:
    Code:
      <inherits name="com.smartgwt.SmartGwt"/>
      <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
    My main entry point class has the following code to add the SmartGWT widget:
    Code:
        Calendar calendar = new Calendar();
        Date today = new Date();
        int year = today.getYear();
        int month = today.getMonth();
        int start = today.getDate() - today.getDay();
        CalendarEvent[] myEvents = new CalendarEvent[]
        {
          new CalendarEvent(1, "Meeting", "Shareholders meeting: monthly forecast report", new Date(year, month, start + 2, 9, 0, 0), new Date(year, month, start + 2, 14, 0, 0)),
          new CalendarEvent(2, "Realtor", "Breakfast with realtor to discuss moving plans", new Date(year, month, start + 3, 8, 0, 0), new Date(year, month, start + 3, 10, 0, 0)),
        };
        calendar.setData(myEvents);
        calendar.draw();
    Last edited by mcari; 3 Feb 2015, 06:13. Reason: Added code tags

    #2
    There's a known issue with GWT 2.7 not respecting <script> declarations in our module files, which you can follow here. This would not affect GWT 2.6.

    Most likely, you either forgot to run a GWT compile before testing, or something is wrong with either your NetBeans or Glassfish setup which is causing the various script files from the SmartClient runtime (ISC_Core.js et al) not to load. Look in your browser's developer tools to see if requests are being sent for these files, and whether you are getting 404 errors for some reason.

    Comment

    Working...
    X