I click on a record, then click again, but it does not become editable.
Also, I click on a record, then cilck F2, and the record still does not become editable.
SmartClient Version: v8.3d_2012-10-22/LGPL Development Only (built 2012-10-22)
SmartGWT 3.1d-2012-10-26
GWT 2.3.0
FF 6.0.2
IE 9
Dev console for FF 6.0.2:
Dev console for IE 9:
Sample code:
So I added this:
Then when clicking on a cell and then pressing F2, I started getting the following:
Also, I click on a record, then cilck F2, and the record still does not become editable.
SmartClient Version: v8.3d_2012-10-22/LGPL Development Only (built 2012-10-22)
SmartGWT 3.1d-2012-10-26
GWT 2.3.0
FF 6.0.2
IE 9
Dev console for FF 6.0.2:
Code:
14:19:22.958:INFO:Log:initialized 14:19:28.024:INFO:Log:isc.Page is loaded
Code:
14:20:12.471:INFO:Log:initialized 14:20:12.474:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined. Returning 500 14:20:12.474:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was written out -- value cannot be determined. Returning 500 14:20:12.689:INFO:Log:isc.Page is loaded
Code:
import com.smartgwt.client.types.TreeModelType;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.tree.Tree;
import com.smartgwt.client.widgets.tree.TreeGridField;
import com.smartgwt.client.widgets.tree.TreeGrid;
import com.smartgwt.client.widgets.tree.TreeNode;
import com.google.gwt.core.client.EntryPoint;
public class TreeGridEditOnF2Keypress implements EntryPoint {
// my attributes
int nextNodeId = 1;
/**
* The EntryPoint interface
*/
public void onModuleLoad () {
// configure Tree
final Tree tree = new Tree ();
tree.setModelType (TreeModelType.PARENT);
tree.setNameProperty ("name");
tree.setIdField ("nodeId");
tree.setParentIdField ("parentNodeId");
tree.setShowRoot (true);
final TreeGridField nameField = new TreeGridField ("name", "Name", 200);
// configure TreeGrid
final TreeGrid treeGrid = new TreeGrid ();
treeGrid.setWidth (300);
treeGrid.setHeight (300);
treeGrid.setEditOnF2Keypress (true);
treeGrid.setFields (nameField);
treeGrid.setData (tree);
// add a few nodes, folders and nodes
addTreeNode (tree, true, "G");
addTreeNode (tree, false, "F");
addTreeNode (tree, true, "E");
addTreeNode (tree, false, "D");
addTreeNode (tree, true, "C");
addTreeNode (tree, false, "B");
addTreeNode (tree, true, "A");
// layout
final HLayout layout = new HLayout ();
layout.addMember (treeGrid);
layout.show ();
}
/**
* Helper: uniformely adds the given TreeNode
* @param tree
* @param isFolder
* @param name
*/
private void addTreeNode (
final Tree tree,
final boolean isFolder,
final String name) {
nextNodeId ++;
final TreeNode treeNode = new TreeNode ();
treeNode.setAttribute ("nodeId", nextNodeId);
treeNode.setAttribute ("parentNodeId", 1); // hard-coded
treeNode.setAttribute ("name", name);
treeNode.setIsFolder (isFolder);
final TreeNode rootTreeNode = tree.getRoot ();
tree.add (treeNode, rootTreeNode);
}
}
Code:
treeGrid.setCanEdit (true);
Code:
00:07:50.546 [ERROR] Uncaught exception escapedcom.google.gwt.dev.shell.HostedModeException: invoke arguments: JS value of type undefined, expected int at com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326) at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207) 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.GeneratedMethodAccessor96.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:662)
Comment