Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy do I get a JavascriptException "no method 'focus'" when I click on a EditTextCell?
    primarykey
    data
    text
    <p>I'm using GWT, building a table.</p> <p>I would like on of the fields to be a EditTextCell. It renders OK initially, but then when I click on it to make it change into a TextInputCell, I see the following exception in Eclipse:</p> <pre><code>15:13:22.428 [ERROR] [xxx] Uncaught exception escaped com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object Text] has no method 'focus' at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) at com.google.gwt.core.client.impl.Impl.apply(Impl.java) at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214) at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:680) </code></pre> <p>Relevant code is: </p> <pre><code>private void buildTable() { // Create a celltable final CellTable&lt;Person&gt; personTable = new CellTable&lt;Person&gt;(KEY_PROVIDER); // Create name column final EditTextCell nameCell = new EditTextCell(); Column&lt;Person, String&gt; nameColumn = new Column&lt;Person, String&gt;(nameCell) { @Override public String getValue(Person person) { return person.getName(); } }; nameColumn.setFieldUpdater(new FieldUpdater&lt;Person,String&gt;() { public void update(int index, Person object, String value) { System.out.println("field updater called"); } }); // Make the name column sortable. nameColumn.setSortable(true); personTable.addColumn(nameColumn, "Name"); // ... and then code for other columns... } </code></pre> <p>Does anyone have a clue on why I get the exception that I'm seeing? </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload