Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with EditorGrid.addEditorGridListener() on numeric Fields #33

Closed
GoogleCodeExporter opened this issue Jan 20, 2016 · 3 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. use a numeric Field [new IntegerField("xyz")]
2. use a numeric Editor in ColumnConfig
setEditor(new GridEditor(new NumberField(new NumberFieldConfig() { ... }
3. create an EditorGrid and attach a EditGridListener
EditorGrid grid = new EditorGrid("grid", "100%", "100%", store, colModel);
grid.addEditorGridListener(new EditorGridListener() { ... }
4. double-click on a cell to edit it

What is the expected output? What do you see instead?
expected: an editable field
instead exception in console:
com.google.gwt.dev.shell.HostedModeException: Calling method
'doBeforeEdit': JS value of type number, expected string
    at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:207)
    at
com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:
57)
    at
com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:119)
    at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:150)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:293)
    at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:196)
    at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
    at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:689)
    at com.google.gwt.dev.GWTShell.run(GWTShell.java:550)
    at com.google.gwt.dev.GWTShell.main(GWTShell.java:321)

and the field is not editable.

What version of the product are you using? On what operating system?
GWT: latest (1.4rc1)
gwt-ext: latest (0.9)
eclipse: latest (3.3)

Please provide any additional information below.
works fine as long as no listener is added, like in the Grid sample 2

Original issue reported on code.google.com by TheStie...@gmail.com on 24 Jul 2007 at 9:57

@GoogleCodeExporter
Copy link
Author

I was aware of this. I've temporarily fixed this by converting the data type to
String before passing to the callback but plan on changing the signature of the 
cells
value passing in the callback to be of type Object and not String. 

Original comment by sanjiv.j...@gmail.com on 24 Jul 2007 at 10:10

  • Changed state: Accepted
  • Added labels: Milestone-0_9_1

@GoogleCodeExporter
Copy link
Author

The callback methods of EditorGridListener now have the cell's oldValue and 
newValue
to be of type Object, with the actual type being that of the underlying 
datastore.
For example an int type will be passed as Integer, float as Float, boolean as 
Boolean
and date as java.util.Date.

Original comment by sanjiv.j...@gmail.com on 25 Jul 2007 at 12:16

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Checked out current trunk, works now with my code, thank you!
Btw: excellent work on gwt-ext !!

Original comment by TheStie...@gmail.com on 25 Jul 2007 at 8:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant