Hi All,

After a search on the internet and in this group I didn't found help for 
the issue I have. 
So I ask here if someone has any advice or workaround.

I just tried basic example of CellTable found here 
http://www.gwtproject.org/doc/latest/DevGuideUiCellWidgets.html, and put 
the cellTable in an empty VerticalPanel somewhere in my app.

In Chrome only, the example doesn't work correctly : almost all keyboard 
events have no effect. Only Delete, Backspace, CTRL-Z + other CTRLs and 
ENTER keys work. It is impossible to type in some text : alphanumeric key 
events have no effect on the content of the cells.

With other browsers than Chrome the CellTable example works without any 
problem !

For the test I use :
GWT 2.5.1
Test NOT OK : Chrome 32.0.1687.2 dev-m Aura
Test OK : Firefox : 24.0
Test OK : Opera : 12.11
Test OK : Safari : 5.1.7
(no test on IE as I have only IE6, for other tests purpose...)

Thank you for your help.
Yves


      /**
       * A simple data type that represents a contact with a unique ID.
       */
      private static class Contact {
        private static int nextId = 0;

        private final int id;
        private String name;

        public Contact(String name) {
          nextId++;
          this.id = nextId;
          this.name = name;
        }
      }

      /**
       * The list of data to display.
       */
      private static final List<Contact> CONTACTS = Arrays.asList(new 
Contact("John"), new Contact("Joe"), new Contact("George"));

      /**
       * The key provider that allows us to identify Contacts even if a 
field
       * changes. We identify contacts by their unique ID.
       */
      private static final ProvidesKey<Contact> KEY_PROVIDER =
          new ProvidesKey<Contact>() {
            @Override
            public Object getKey(Contact item) {
              return item.id;
            }
          };

.........

        initWidget(uiBinder.createAndBindUi(this));
        
        // Create a CellTable with a key provider.
        final CellTable<Contact> table = new 
CellTable<Contact>(KEY_PROVIDER);

        table.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
        
        // Add a text input column to edit the name.
        final TextInputCell nameCell = new TextInputCell();
        Column<Contact, String> nameColumn = new Column<Contact, 
String>(nameCell) {
          @Override
          public String getValue(Contact object) {
            // Return the name as the value of this column.
            return object.name;
          }
        };
        table.addColumn(nameColumn, "Name");

        // Add a field updater to be notified when the user enters a new 
name.
        nameColumn.setFieldUpdater(new FieldUpdater<Contact, String>() {
          @Override
          public void update(int index, Contact object, String value) {
            // Inform the user of the change.
            Window.alert("You changed the name of " + object.name + " to " 
+ value);

            // Push the changes into the Contact. At this point, you could 
send an
            // asynchronous request to the server to update the database.
            object.name = value;

            // Redraw the table with the new data.
            table.redraw();
          }
        });

        // Push the data into the widget.
        table.setRowData(CONTACTS);
        
        vp.add(table);

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to