Results 1 to 5 of 5

Thread: Getting started with gxt

  1. #1

    Default Getting started with gxt

    Greetings,

    I'm pretty new to GWT and GXT and just trying to get my first example running. I'm using GWT 1.5 RC1 and GXT 1.0 beta 4.

    Upon compilation I see the following:

    Compiling permutations
    Analyzing permutation #1
    [ERROR] An internal compiler exception occurred
    com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error during visit.
    at com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:538)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:529)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:65)
    at com.google.gwt.dev.jjs.ast.JIfStatement.traverse(JIfStatement.java:51)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:100)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAcceptWithInsertRemove(JModVisitor.java:212)
    at com.google.gwt.dev.jjs.ast.JVisitor.acceptWithInsertRemove(JVisitor.java:81)
    at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:36)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:73)
    at com.google.gwt.dev.jjs.ast.JForStatement.traverse(JForStatement.java:66)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:100)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAcceptWithInsertRemove(JModVisitor.java:212)
    at com.google.gwt.dev.jjs.ast.JVisitor.acceptWithInsertRemove(JVisitor.java:81)
    at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:36)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:73)
    at com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:52)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:69)
    at com.google.gwt.dev.jjs.ast.JMethod.traverse(JMethod.java:189)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:100)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAcceptWithInsertRemove(JModVisitor.java:212)
    at com.google.gwt.dev.jjs.ast.JVisitor.acceptWithInsertRemove(JVisitor.java:81)
    at com.google.gwt.dev.jjs.ast.JClassType.traverse(JClassType.java:62)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:202)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:77)
    at com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:799)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    at com.google.gwt.dev.jjs.ast.JModVisitor$NodeContext.traverse(JModVisitor.java:154)
    at com.google.gwt.dev.jjs.ast.JModVisitor.doAccept(JModVisitor.java:192)
    at com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:69)
    at com.google.gwt.dev.jjs.impl.EqualityNormalizer.execImpl(EqualityNormalizer.java:198)
    at com.google.gwt.dev.jjs.impl.EqualityNormalizer.exec(EqualityNormalizer.java:187)
    at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compile(JavaToJavaScriptCompiler.java:424)
    at com.google.gwt.dev.GWTCompiler.realizePermutation(GWTCompiler.java:511)
    at com.google.gwt.dev.GWTCompiler.compilePermutations(GWTCompiler.java:442)
    at com.google.gwt.dev.GWTCompiler.distill(GWTCompiler.java:358)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:564)
    at com.google.gwt.dev.GWTCompiler.run(GWTCompiler.java:554)
    at com.google.gwt.dev.GWTCompiler.main(GWTCompiler.java:214)
    Caused by: java.lang.ClassCastException: com.google.gwt.dev.jjs.ast.JPrimitiveType
    at com.google.gwt.dev.jjs.impl.EqualityNormalizer$BreakupAssignOpsVisitor.endVisit(EqualityNormalizer.java:86)
    at com.google.gwt.dev.jjs.ast.JBinaryOperation.traverse(JBinaryOperation.java:79)
    at com.google.gwt.dev.jjs.ast.JVisitor.doTraverse(JVisitor.java:527)
    ... 52 more
    [ERROR] at TableHeader.java(249): null.nullMethod() == 1
    [ERROR] at TableHeader.java(249): if (null.nullMethod() == 1) {
    for (final AbstractList$IteratorImpl item$iterator = AbstractList$IteratorImpl.$AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), columnMenu.items); item$iterator.i < item$iterator.this$0.size(); ) {
    final Item item = Cast.dynamicCast(AbstractList$IteratorImpl.$next(item$iterator), 19);
    final CheckMenuItem ci = Cast.dynamicCast(item, 22);
    if (ci.checked) {
    Component.$disable(ci);
    }
    }
    }
    [ERROR] at TableHeader.java(216): {
    null.nullMethod();
    final CheckMenuItem check = CheckMenuItem.$CheckMenuItem(new CheckMenuItem());
    check.hideOnClick = false;
    MenuItem.$setText(check, null.nullMethod());
    CheckMenuItem.$setChecked(check, !null.nullMethod(), false);
    Component.$addListener(check, 640, TableHeader$5.$TableHeader$5(new TableHeader$5(), this$static, columnMenu));
    columnMenu.insert(check, columnMenu.items.size);
    if (null.nullMethod() == 1) {
    for (final AbstractList$IteratorImpl item$iterator = AbstractList$IteratorImpl.$AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), columnMenu.items); item$iterator.i < item$iterator.this$0.size(); ) {
    final Item item = Cast.dynamicCast(AbstractList$IteratorImpl.$next(item$iterator), 19);
    final CheckMenuItem ci = Cast.dynamicCast(item, 22);
    if (ci.checked) {
    Component.$disable(ci);
    }
    }
    }
    }
    [ERROR] at TableHeader.java(216): for (int i = 0; i < cols; ++i) {
    null.nullMethod();
    final CheckMenuItem check = CheckMenuItem.$CheckMenuItem(new CheckMenuItem());
    check.hideOnClick = false;
    MenuItem.$setText(check, null.nullMethod());
    CheckMenuItem.$setChecked(check, !null.nullMethod(), false);
    Component.$addListener(check, 640, TableHeader$5.$TableHeader$5(new TableHeader$5(), this$static, columnMenu));
    columnMenu.insert(check, columnMenu.items.size);
    if (null.nullMethod() == 1) {
    for (final AbstractList$IteratorImpl item$iterator = AbstractList$IteratorImpl.$AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), columnMenu.items); item$iterator.i < item$iterator.this$0.size(); ) {
    final Item item = Cast.dynamicCast(AbstractList$IteratorImpl.$next(item$iterator), 19);
    final CheckMenuItem ci = Cast.dynamicCast(item, 22);
    if (ci.checked) {
    Component.$disable(ci);
    }
    }
    }
    }
    [ERROR] at TableHeader.java(183): {
    final Menu menu = Menu.$Menu(new Menu());
    if (null.nullMethod()) {
    MenuItem item = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(item, "Sort Ascending");
    MenuItem.$setIconStyle(item, "my-icon-asc");
    Component.$addListener(item, 640, TableHeader$3.$TableHeader$3(new TableHeader$3(), this$static));
    menu.insert(item, menu.items.size);
    item = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(item, "Sort Descending");
    MenuItem.$setIconStyle(item, "my-icon-desc");
    Component.$addListener(item, 640, TableHeader$4.$TableHeader$4(new TableHeader$4(), this$static));
    menu.insert(item, menu.items.size);
    }
    final MenuItem columns = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(columns, "Columns");
    MenuItem.$setIconStyle(columns, "icon-columns");
    final Menu columnMenu = Menu.$Menu(new Menu());
    final int cols = null.nullMethod();
    for (int i = 0; i < cols; ++i) {
    null.nullMethod();
    final CheckMenuItem check = CheckMenuItem.$CheckMenuItem(new CheckMenuItem());
    check.hideOnClick = false;
    MenuItem.$setText(check, null.nullMethod());
    CheckMenuItem.$setChecked(check, !null.nullMethod(), false);
    Component.$addListener(check, 640, TableHeader$5.$TableHeader$5(new TableHeader$5(), this$static, columnMenu));
    columnMenu.insert(check, columnMenu.items.size);
    if (null.nullMethod() == 1) {
    for (final AbstractList$IteratorImpl item$iterator = AbstractList$IteratorImpl.$AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), columnMenu.items); item$iterator.i < item$iterator.this$0.size(); ) {
    final Item item = Cast.dynamicCast(AbstractList$IteratorImpl.$next(item$iterator), 19);
    final CheckMenuItem ci = Cast.dynamicCast(item, 22);
    if (ci.checked) {
    Component.$disable(ci);
    }
    }
    }
    }
    (columns.subMenu = columnMenu, columnMenu.parentItem = columns);
    menu.insert(columns, menu.items.size);
    return menu;
    }
    [ERROR] at TableHeader.java(183): {
    final Menu menu = Menu.$Menu(new Menu());
    if (null.nullMethod()) {
    MenuItem item = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(item, "Sort Ascending");
    MenuItem.$setIconStyle(item, "my-icon-asc");
    Component.$addListener(item, 640, TableHeader$3.$TableHeader$3(new TableHeader$3(), this$static));
    menu.insert(item, menu.items.size);
    item = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(item, "Sort Descending");
    MenuItem.$setIconStyle(item, "my-icon-desc");
    Component.$addListener(item, 640, TableHeader$4.$TableHeader$4(new TableHeader$4(), this$static));
    menu.insert(item, menu.items.size);
    }
    final MenuItem columns = MenuItem.$MenuItem(new MenuItem());
    MenuItem.$setText(columns, "Columns");
    MenuItem.$setIconStyle(columns, "icon-columns");
    final Menu columnMenu = Menu.$Menu(new Menu());
    final int cols = null.nullMethod();
    for (int i = 0; i < cols; ++i) {
    null.nullMethod();
    final CheckMenuItem check = CheckMenuItem.$CheckMenuItem(new CheckMenuItem());
    check.hideOnClick = false;
    MenuItem.$setText(check, null.nullMethod());
    CheckMenuItem.$setChecked(check, !null.nullMethod(), false);
    Component.$addListener(check, 640, TableHeader$5.$TableHeader$5(new TableHeader$5(), this$static, columnMenu));
    columnMenu.insert(check, columnMenu.items.size);
    if (null.nullMethod() == 1) {
    for (final AbstractList$IteratorImpl item$iterator = AbstractList$IteratorImpl.$AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), columnMenu.items); item$iterator.i < item$iterator.this$0.size(); ) {
    final Item item = Cast.dynamicCast(AbstractList$IteratorImpl.$next(item$iterator), 19);
    final CheckMenuItem ci = Cast.dynamicCast(item, 22);
    if (ci.checked) {
    Component.$disable(ci);
    }
    }
    }
    }
    (columns.subMenu = columnMenu, columnMenu.parentItem = columns);
    menu.insert(columns, menu.items.size);
    return menu;
    }
    [ERROR] at TableHeader.java(183): public static final Menu $onShowContextMenu(TableHeader this$static);

    [ERROR] at TableHeader.java(41): final class TableHeader extends BoxComponent
    [ERROR] <no source info>: <JProgram>
    [ERROR] Build failed

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572

    Default

    If you post your source code (or entire eclipse project zipped) I will try to work out where things are going wrong.

  3. #3

    Default

    The source is extremely simple:

    package org.yournamehere.client;

    import com.extjs.gxt.ui.client.widget.table.Table;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;

    public class MainEntryPoint implements EntryPoint {

    /** Creates a new instance of MainEntryPoint */
    public MainEntryPoint() {
    }

    /**
    The entry point method, called automatically by loading a module
    that declares an implementing class as an entry-point
    */
    public void onModuleLoad() {
    Table table = new Table();
    RootPanel.get().add(table);
    }

    }

    I used GWT4NB plug-in for NetBeans 6.1 to create the project. If you have NetBeans than I could send it over to you.

    Thank you,
    Yuriy

  4. #4
    Sencha User darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242

    Default

    You need to pass a TableColumnModel in the Table constructor or set one using table.setColumnModel before the table is rendered.

  5. #5

    Default

    I just got bit by this too. It would be nice if table defaulted to an empty table column model if none was set before rendering.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •