Quantcast
Viewing all articles
Browse latest Browse all 4756

Javascript Exception on ListGrid -> startEditingNew (Firefox in devMode)

We have a scenario in our application where we put inside a ListGridRecord a reference to a custom object (client) for later use.

After upgrading from 2.5 to 3.0 version of smartgwt it starts to throw a Javascript Exception on Firefox in DevMode.
It works fine on the deployed version and in devMode of others browsers.
We believe that this is some sort of bug on the new SmartGWT version.

There is anything we can do to workarround/fix this problem.

Bellow is the sample code:
App class
Code:


  public void onModuleLoad() {
                 
                  MyBean myBean = new MyBean();
                 
                  //List Grid
                  ListGridField nameField = new ListGridField();
                  nameField.setTitle("Name");
                  nameField.setName("name");
                 
                  ListGridField addressField = new ListGridField();
                  addressField.setTitle("Address");
                  addressField.setName("address");
                 
                  final ListGridRecord record = new ListGridRecord();
                  record.setAttribute("beanColumn", myBean);
                 
                  final ListGrid grid = new ListGrid();       
                  grid.setFields(nameField, addressField);
                  grid.setCanEdit(true);
                 
                  //Add Button
                  Button addButton = new Button();
                  addButton.setTitle("Add new row");
                  addButton.addClickHandler(new ClickHandler() {
                       
                        public void onClick(ClickEvent event) {
                               
                                grid.startEditingNew(record);
                        }
                  });
                 
                  //Layout
                  VLayout vLayout = new VLayout();
                  vLayout.addMember(grid);
                  vLayout.addMember(addButton);
                  vLayout.setWidth(300);
                  vLayout.setHeight(200);
                  vLayout.draw();
         
          }

MyBean Class
Code:

public class MyBean  implements Serializable {

        private static final long serialVersionUID = ...;
       
        private String name;
        private String address;
       
        ...getters/setters ....

}

In this cenario when you click the button it raises a
Code:

Uncaught exception escaped : com.google.gwt.event.shared.UmbrellaException
Exception caught: (null) @com.smartgwt.client.widgets.grid.ListGrid::startEditingNew(Lcom/smartgwt/client/data/Record;)([Java object: com.smartgwt.client.widgets.grid.ListGridRecord@1884349876]): null
See the Development console log for details.
Register a GWT.setUncaughtExceptionHandler(..) for custom uncaught exception handling.

on all versions of Firefox

if we comment the line
Code:

// record.setAttribute("beanColumn", myBean);
everything is back to normal.

Browser: Apparently on all versions of Firefox we tested on 20.0.1 and 22.0
GWT Vesion: 2.5.1
SmartGWT version: 3.1 path 2013-07-05 (it was also tested on 4.0 release)

Viewing all articles
Browse latest Browse all 4756

Trending Articles