Ticket #2188 (closed enhancement: fixed)

Opened 2 months ago

Last modified 6 weeks ago

Widgetset creation is very error prone

Reported by: Mauno Haukila Owned by: Marko Gronroos
Priority: major Milestone: User Interface Library 5.3.0 RC
Component: Documentation Version: trunk
Keywords: Cc:
Known Issue description:
Hours estimate: Deadline (dd.mm.yyyy):
Known Issue version (since): Known Issue title:
Hours done: Depends to:
Affects documentation: no
Known Issue workaround:
Affects release notes: no Contract:

Description

Widget creation is very easy but widgetSET creation is not. You have to define xml, no verification on right syntax, very error prone.

I had a little situation recently where hosted mode browser crashed and firefox complained about javascript taking too long. I double checked syntax for package\gwt\mywidgetset.gwt.xml and widgetset-class and I found no errors on quick look. Widgetset compiled successfully.

I noticed that if I added "?debug" parameter to URL, Toolkit debug window had text "too much javascript recursion".

Problem was one typo in createWidget method.

if ("com.itmill.toolkit.training.chaptr8.gwt.client.ui.INumbersOnlyTextField"
                .equals(className)) {
            return new INumbersOnlyTextField();
        }

Should have been:

if ("com.itmill.toolkit.training.chapter8.gwt.client.ui.INumbersOnlyTextField"
                .equals(className)) {
            return new INumbersOnlyTextField();
        }

Change History

Changed 2 months ago by Joonas Lehtinen

  • priority changed from undefined to major
  • status changed from new to closed
  • type changed from defect to enhancement
  • resolution set to duplicate
  • milestone set to User Interface Library 5 stable branch backlog

I hope this will be resolved when we add a "create widgetset" wizard to IDE integration. See #98

Closing this as a duplicate for now. Please reopen i you have have any intermediate solutions before that.

Changed 2 months ago by Mauno Haukila

  • status changed from closed to reopened
  • resolution deleted

Checked out current trunk and tested:

        final String className = resolveWidgetTypeName(uidl);        
        if (ICheckBox.class.getName().equals(className)) {
            return new ICheckBox();
        } else if (IButton.class.getName()
                .equals(className)) {
            return new IButton();
        } else if (IWindow.class.getName()
                .equals(className)) {
            return new IWindow();

Seems to work fine.

Changed 2 months ago by Matti Tahvonen

  • owner changed from ticketmaster to Marko Gronroos
  • status changed from reopened to assigned
  • version changed from 5.2.11 to trunk

in [5884] refactored DefaultWidgetSet? to use class comparison instead of class name. (now possible with GWT 1.5, changed the version to trunk). So there is actually no need to do string comparison at all nowadays. Change should be backwards compatible. There was actually a TODO for this in Default widget set.

Other widgetsets and manual should be updated. Assigning to Marko

Changed 7 weeks ago by Joonas Lehtinen

  • milestone changed from User Interface Library 5 stable branch backlog to User Interface Library 5.3.0 RC

Matti - does this close the ticket?

As this is only for GWT 1.5, I'll move the ticket to 5.3.0

Changed 7 weeks ago by Matti Tahvonen

When manual and examples are updated.

Changed 7 weeks ago by Matti Tahvonen

  • component changed from gwt-adapter to Documentation

Changed ReservationWidgetSet? and ColorPickerWidgetSet? to use the new method in [5957].

Magi check those as an example and update manual to correspond the new system.

Changed 6 weeks ago by Marko Gronroos

  • status changed from assigned to closed
  • resolution set to fixed

Reformatted the examples to be more suitable for the manual in [5988]. Updated the manual according to the updated examples in [5987].

Note: See TracTickets for help on using tickets.