1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    18
    Vote Rating
    0
    jschwarz0 is on a distinguished road

      0  

    Default [FIXED] beta5 - npe TreeBinder.onAdd(TreeBinder.java:329)

    [FIXED] beta5 - npe TreeBinder.onAdd(TreeBinder.java:329)


    hi,

    upgraded to beta5 and got this on my tree table:

    ERROR] Uncaught exception escaped
    java.lang.NullPointerException: null
    at com.extjs.gxt.ui.client.binder.TreeBinder.onAdd(TreeBinder.java:329)
    at com.extjs.gxt.ui.client.binder.StoreBinder$1.storeAdd(StoreBinder.java:44)
    at com.extjs.gxt.ui.client.store.StoreTypedListener.handleEvent(StoreTypedListener.java:38)
    at com.extjs.gxt.ui.client.event.BaseObservable.fireEvent(BaseObservable.java:74)
    at com.extjs.gxt.ui.client.store.TreeStore.doInsert(TreeStore.java:539)
    at com.extjs.gxt.ui.client.store.TreeStore.insert(TreeStore.java:289)
    at com.extjs.gxt.ui.client.store.TreeStore.add(TreeStore.java:152)
    at com.extjs.gxt.ui.client.store.TreeStore.add(TreeStore.java:162)

    is this already reported or do I need to refactor to a EntryPoint example?

    thanks,
    jim

  2. #2
    Sencha User
    Join Date
    Jan 2008
    Posts
    55
    Vote Rating
    0
    skhan is on a distinguished road

      0  

    Default


    Confirmed.
    Just upgraded to Beta 5 and got a javascript error (I'm unable to run my app in hosted mode for a few reasons so I don't can't tell you what the exception is).
    Looking through the compiled javascript it breaks in the updateJointStyle method of TreeItemUI
    on the first if stmt.

  3. #3
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    If you can post some sample code I will take a look.

  4. #4
    Sencha User
    Join Date
    Jan 2008
    Posts
    55
    Vote Rating
    0
    skhan is on a distinguished road

      0  

    Default


    Should've included this in my post...
    Code:
    package com.test.client;
    
    
    
    import java.util.ArrayList;
    import java.util.List;
    
    
    import com.extjs.gxt.ui.client.Events;
    
    import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
    import com.extjs.gxt.ui.client.Style.LayoutRegion;
    import com.extjs.gxt.ui.client.Style.SelectionMode;
    
    import com.extjs.gxt.ui.client.binder.TableBinder;
    import com.extjs.gxt.ui.client.binder.TreeTableBinder;
    import com.extjs.gxt.ui.client.event.Listener;
    
    import com.extjs.gxt.ui.client.event.TabPanelEvent;
    
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.store.TreeStore;
    import com.extjs.gxt.ui.client.widget.ContentPanel;
    import com.extjs.gxt.ui.client.widget.Info;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.TabItem;
    import com.extjs.gxt.ui.client.widget.TabPanel;
    import com.extjs.gxt.ui.client.widget.Text;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.button.Button;
    import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
    import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
    import com.extjs.gxt.ui.client.widget.layout.FillLayout;
    import com.extjs.gxt.ui.client.widget.layout.FitLayout;
    import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
    import com.extjs.gxt.ui.client.widget.table.CellRenderer;
    import com.extjs.gxt.ui.client.widget.table.DateTimeCellRenderer;
    import com.extjs.gxt.ui.client.widget.table.NumberCellRenderer;
    import com.extjs.gxt.ui.client.widget.table.Table;
    import com.extjs.gxt.ui.client.widget.table.TableColumn;
    import com.extjs.gxt.ui.client.widget.table.TableColumnModel;
    import com.extjs.gxt.ui.client.widget.table.TableItem;
    import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
    import com.extjs.gxt.ui.client.widget.toolbar.TextToolItem;
    import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
    import com.extjs.gxt.ui.client.widget.treetable.TreeTable;
    import com.extjs.gxt.ui.client.widget.treetable.TreeTableColumn;
    import com.extjs.gxt.ui.client.widget.treetable.TreeTableColumnModel;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.i18n.client.NumberFormat;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class TreeTableNPE implements EntryPoint {
    
        public void onModuleLoad() {
    
            Viewport viewport = new Viewport();
            viewport.setLayout(new FillLayout());
           
           
            final NumberFormat currency = NumberFormat.getCurrencyFormat();
            final NumberFormat number = NumberFormat.getFormat("0.00");
    
            List<TreeTableColumn> columns = new ArrayList<TreeTableColumn>();
    
            TreeTableColumn col = new TreeTableColumn("name", "Company", 150);
            col.setMinWidth(75);
            col.setMaxWidth(300);
            columns.add(col);
    
            col = new TreeTableColumn("symbol", "Symbol", 50);
            columns.add(col);
    
            col = new TreeTableColumn("last", "Last", 100);
            col.setMaxWidth(100);
            col.setAlignment(HorizontalAlignment.RIGHT);
            
            columns.add(col);
    
            col = new TreeTableColumn("change", "Change", 100);
            col.setAlignment(HorizontalAlignment.RIGHT);
            
            columns.add(col);
    
            col = new TreeTableColumn("date", "Last Updated", 100);
            col.setAlignment(HorizontalAlignment.RIGHT);
            
            columns.add(col);
    
            
            TreeTableColumnModel cm = new TreeTableColumnModel(columns);
    
            TreeTable tbl = new TreeTable(cm);
            tbl.setSelectionMode(SelectionMode.MULTI);
            tbl.setHorizontalScroll(true);
    
            TreeStore<Stock> store = new TreeStore<Stock>();
           
    
            TreeTableBinder<Stock> binder = new TreeTableBinder<Stock>(tbl, store);
    //        binder.init();
    
            
    //        store.removeAll();
            store.add(getStocks(),true);
    
            
            final ContentPanel panel = new ContentPanel();
            panel.setCollapsible(true);
            panel.setFrame(true);
            panel.setAnimCollapse(false);
            panel.setButtonAlign(HorizontalAlignment.CENTER);
            panel.setIconStyle("icon-table");
            panel.setHeading("Table Store Demo");
            panel.setLayout(new FitLayout());
            panel.add(tbl);
            panel.setSize(575, 350);
    
            // built in support for top component
            ToolBar toolBar = new ToolBar();
            toolBar.add(new TextToolItem("Add", "icon-add"));
            toolBar.add(new SeparatorToolItem());
            toolBar.add(new TextToolItem("Remove", "icon-delete"));
            toolBar.add(new SeparatorToolItem());
            toolBar.add(new TextToolItem("Configure", "icon-plugin"));
            panel.setTopComponent(toolBar);
    
            // add buttons
            panel.addButton(new Button("Save"));
            panel.addButton(new Button("Cancel"));
           
            viewport.add(panel);
    
    		RootPanel.get().add(viewport);
        }
       
       
       
    
        private TreeTableColumn createColumn(String id, String name, float size) {
            TreeTableColumn col = new TreeTableColumn(id, name, size);
            col.setSortable(false);
            col.setResizable(true);
            return col;
        }
       
       
       
        public static List<Stock> getStocks() {
            List<Stock> stocks = new ArrayList<Stock>();
           
            Stock s1 = new Stock("Apple Inc.", "AAPL", 125.64, 123.43);
            s1.add(new Stock("Apple Jr", "AAPL", 125.64, 123.43));
            stocks.add(s1);
            stocks.add(new Stock("Cisco Systems, Inc.", "CSCO", 25.84, 26.3));
            stocks.add(new Stock("Google Inc.", "GOOG", 516.2, 512.6));
            stocks.add(new Stock("Intel Corporation", "INTC", 21.36, 21.53));
            stocks.add(new Stock("Level 3 Communications, Inc.", "LVLT", 5.55, 5.54));
            stocks.add(new Stock("Microsoft Corporation", "MSFT", 29.56, 29.72));
            stocks.add(new Stock("Nokia Corporation (ADR)", "NOK", 27.83, 27.93));
            stocks.add(new Stock("Oracle Corporation", "ORCL", 18.73, 18.98));
            stocks.add(new Stock("Starbucks Corporation", "SBUX", 27.33, 27.36));
            stocks.add(new Stock("Yahoo! Inc.", "YHOO", 26.97, 27.29));
            stocks.add(new Stock("Applied Materials, Inc.", "AMAT", 18.4, 18.66));
            stocks.add(new Stock("Comcast Corporation", "CMCSA", 25.9, 26.4));
            stocks.add(new Stock("Sirius Satellite", "SIRI", 2.77, 2.74));
           
            stocks.add(new Stock("Tellabs, Inc.", "TLAB", 10.64, 10.75));
            stocks.add(new Stock("eBay Inc.", "EBAY", 30.43, 31.21));
            stocks.add(new Stock("Broadcom Corporation", "BRCM", 30.88, 30.48));
            stocks.add(new Stock("CMGI Inc.", "CMGI", 2.14, 2.13));
            stocks.add(new Stock("Amgen, Inc.", "AMGN", 56.22, 57.02));
            stocks.add(new Stock("Limelight Networks", "LLNW", 23, 22.11));
            stocks.add(new Stock("Amazon.com, Inc.", "AMZN", 72.47, 72.23));
           
            stocks.add(new Stock("E TRADE Financial Corporation", "ETFC", 24.32, 24.58));
            stocks.add(new Stock("AVANIR Pharmaceuticals", "AVNR", 3.7, 3.52));
            stocks.add(new Stock("Gemstar-TV Guide, Inc.", "GMST", 4.41, 4.55));
            stocks.add(new Stock("Akamai Technologies, Inc.", "AKAM", 43.08, 45.32));
            stocks.add(new Stock("Motorola, Inc.", "MOT", 17.74, 17.69));
            stocks.add(new Stock("Advanced Micro Devices, Inc.", "AMD", 13.77, 13.98));
            stocks.add(new Stock("General Electric Company", "GE", 36.8, 36.91));
            stocks.add(new Stock("Texas Instruments Incorporated", "TXN", 35.02, 35.7));
            stocks.add(new Stock("Qwest Communications", "Q", 9.9, 10.03));
            stocks.add(new Stock("Tyco International Ltd.", "TYC", 33.48, 33.26));
            stocks.add(new Stock("Pfizer Inc.", "PFE", 26.21, 26.19));
            stocks.add(new Stock("Time Warner Inc.", "TWX", 20.3, 20.45));
            stocks.add(new Stock("Sprint Nextel Corporation", "S", 21.85, 21.76));
            stocks.add(new Stock("Bank of America Corporation", "BAC", 49.92, 49.73));
            stocks.add(new Stock("Taiwan Semiconductor", "TSM", 10.4, 10.52));
            stocks.add(new Stock("AT&T Inc.", "T", 39.7, 39.66));
            stocks.add(new Stock("United States Steel Corporation", "X", 115.81, 114.62));
            stocks.add(new Stock("Exxon Mobil Corporation", "XOM", 81.77, 81.86));
            stocks.add(new Stock("Valero Energy Corporation", "VLO", 72.46, 72.6));
            stocks.add(new Stock("Micron Technology, Inc.", "MU", 12.02, 12.27));
            stocks.add(new Stock("Verizon Communications Inc.", "VZ", 42.5, 42.61));
            stocks.add(new Stock("Avaya Inc.", "AV", 16.96, 16.96));
            stocks.add(new Stock("The Home Depot, Inc.", "HD", 37.66, 37.79));
           
            stocks.add(new Stock("First Data Corporation", "FDC", 32.7, 32.65));
            return stocks;
    
          }
       
    }

    Using beta 5 from downloads section, not SVN

  5. #5
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Fixed in SVN.

  6. #6
    Ext User
    Join Date
    May 2008
    Posts
    21
    Vote Rating
    0
    jtmille3 is on a distinguished road

      0  

    Default Tree Binder Beta 5

    Tree Binder Beta 5


    I'm having a similar issue. I did an update today on the SVN and the tree binder still isn't working for me. Code below will not work. I can't figure out if I'm loading the tree incorrectly or what. Basically I'm trying to manually add nodes to a tree, and then customize the icon style. When I use a binder and tree store it blows all to heck after two node levels.

    Code:
    import com.extjs.gxt.ui.client.binder.TreeBinder;
    import com.extjs.gxt.ui.client.data.BaseTreeModel;
    import com.extjs.gxt.ui.client.store.TreeStore;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.layout.FillLayout;
    import com.extjs.gxt.ui.client.widget.tree.Tree;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class ExampleTree implements EntryPoint {
    
        public void onModuleLoad() {
        Viewport vp = new Viewport();
        vp.setLayout(new FillLayout());
    
        Tree tree = new Tree();
        TreeStore store = new TreeStore();
        TreeBinder binder = new TreeBinder(tree, store);
        binder.setDisplayProperty("name");
    
        TestModel node1 = new TestModel("Node 1");
        TestModel node2 = new TestModel("Node 2");
        TestModel node3 = new TestModel("Node 3");
        TestModel node4 = new TestModel("Node 4");
        
        node1.add(node2);
        node2.add(node3);
        node3.add(node4);
        
        store.add(node1, true);
        
        RootPanel.get().add(vp);
        }
    
        private class TestModel extends BaseTreeModel {
        public TestModel(String name) {
            set("name", name);
        }
    
        public String getName() {
            return (String) get("name");
        }
    
        public String toString() {
            return getName();
        }
        }
    }

  7. #7
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Try this code after getting the latest code form SVN:

    PHP Code:
    public void onModuleLoad() {
        
    Viewport vp = new Viewport();

        
    Tree tree = new Tree();
        
    TreeStore store = new TreeStore();
        
    TreeBinder binder = new TreeBinder(treestore);
        
    binder.setDisplayProperty("name");
        
    binder.init();

        
    TestModel node1 = new TestModel("Node 1");
        
    TestModel node2 = new TestModel("Node 2");
        
    TestModel node3 = new TestModel("Node 3");
        
    TestModel node4 = new TestModel("Node 4");

        
    node1.add(node2);
        
    node2.add(node3);
        
    node3.add(node4);

        
    store.add(node1true);
        
        
    vp.add(tree);

        
    RootPanel.get().add(vp);
      }

      private class 
    TestModel extends BaseTreeModel {
        public 
    TestModel(String name) {
          
    set("name"name);
        }

        public 
    String getName() {
          return (String) 
    get("name");
        }

        public 
    String toString() {
          return 
    getName();
        }
      } 

  8. #8
    Ext User
    Join Date
    May 2008
    Posts
    21
    Vote Rating
    0
    jtmille3 is on a distinguished road

      0  

    Default Worked

    Worked


    Thanks for the quick response.

  9. #9
    Sencha User
    Join Date
    Jan 2008
    Posts
    55
    Vote Rating
    0
    skhan is on a distinguished road

      0  

    Default More issues with this

    More issues with this


    So I tried running the same code i posted here:
    http://extjs.com/forum/showthread.ph...655#post182655
    with the latest SVN (got about a couple of hours before this post).
    Everything seems to work fine in hosted mode but if you compile/browse that same code you'll get a javascript exception every time you click on an item.

    In firebug:
    invalid assignment left-hand side
    In IE:
    Cannot assign to a function result

    Thanks

  10. #10
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    Fix is in SVN.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi