Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Runtime type of criteria values in filter editor

    I use
    JSOHelper.convertToMap((JavaScriptObject) criteriaObject);
    to convert criteria entered into the ListGrid filterEditor into java maps.
    However, the runtime type of the criteria value always seems to be of type String (except for dates) even when the corresponding field type is set to e.g. Float:
    Code:
    ListGrid.setType(ListGridFieldType.FLOAT);
    Shouldn't this generate a criteria value of type Float when mapped to Java?
    Setting the editor of the corresponding field to the respective type (e.g. IntegerItem) also does not help.

    Another related issue: With a float type editor, i.e.
    Code:
    ListGridField.setFilterEditorType(new FloatItem());
    The grid even causes the following error when the column is selected to be show by the user:
    Code:
    00:03:09,860 [ERROR] 19:48:45.475:MUP2:WARN:DynamicForm:isc_DynamicForm_1:Problem initializing item: {width: null, record: null, rowNum: 0, colNum: 6, name: "maxSpeed", valueMap: undef, valueIcons: undef, imageURLPrefix: undef, imageURLSuffix: undef, baseURL: undef, imgDir: undef, textAlign: "right", valueIconLeftPadding: 2, valueIconRightPadding: 2, autoCompleteCandidates: undef, uniqueMatch: undef, containerWidget: [GridBody ID:isc_TrackWindow$1_0filterEditor_body], grid: [RecordEditor ID:isc_TrackWindow$1_0filterEditor], handleChanged: [o]TextItem.handleChanged(), keyDown: anonymous(), inactiveEditorMouseDown: anonymous(), type: "float", editorType: "float", elementFocus: [o]TextItem.elementFocus(), canTabToIcons: false, focusInItem: [o]TextItem.focusInItem(), height: 22, allowEmptyValue: true, actOnKeypress: undef, operator: "greaterOrEqual", changed: [a]TextItem.changed()} - derived FormItem class is: float. Please make sure the relevant module is loaded
    com.smartgwt.client.core.JsObject$SGWT_WARN: 19:48:45.475:MUP2:WARN:DynamicForm:isc_DynamicForm_1:Problem initializing item: {width: null,
    record: null,
    rowNum: 0,
    colNum: 6,
    name: "maxSpeed",
    valueMap: undef,
    valueIcons: undef,
    imageURLPrefix: undef,
    imageURLSuffix: undef,
    baseURL: undef,
    imgDir: undef,
    textAlign: "right",
    valueIconLeftPadding: 2,
    valueIconRightPadding: 2,
    autoCompleteCandidates: undef,
    uniqueMatch: undef,
    containerWidget: [GridBody ID:isc_TrackWindow$1_0filterEditor_body],
    grid: [RecordEditor ID:isc_TrackWindow$1_0filterEditor],
    handleChanged: [o]TextItem.handleChanged(),
    keyDown: anonymous(),
    inactiveEditorMouseDown: anonymous(),
    type: "float",
    editorType: "float",
    elementFocus: [o]TextItem.elementFocus(),
    canTabToIcons: false,
    focusInItem: [o]TextItem.focusInItem(),
    height: 22,
    allowEmptyValue: true,
    actOnKeypress: undef,
    operator: "greaterOrEqual",
    changed: [a]TextItem.changed()} - derived FormItem class is: float.  Please make sure the relevant module is loaded 	at sun.reflect.GeneratedConstructorAccessor20.newInstance(Unknown Source) 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) 	at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) 	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) 	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) 	at java.lang.Thread.run(Thread.java:619)
    When it is show right from the start, this error is raised:
    Code:
    00:09:50,438 [ERROR] 19:55:26.052:WARN:Log:TypeError: _1[i] is undefined DynamicForm.itemsMoved() GridBody.parentMoved(_1=>{Obj}, _2=>5, _3=>10004) Canvas._fireParentMoved({Obj}, 5, 10004) Canvas.parentMoved(_1=>{Obj}, _2=>5, _3=>10004) Canvas._fireParentMoved({Obj}, 5, 10004) Canvas.parentMoved(_1=>{Obj}, _2=>5, _3=>10004) Canvas._fireParentMoved({Obj}, 5, 10004) Canvas.parentMoved(_1=>{Obj}, _2=>5, _3=>10004) Canvas._fireParentMoved({Obj}, 5, 10004) Canvas._completeMoveBy() Canvas.moveBy(_1=>5, _2=>10004, _3=>undef, _4=>undef) Canvas.moveTo(_1=>5, _2=>5) Layout.stackMembers(_1=>[object Array], _2=>[object Array]) Layout.layoutChildren(_1=>"resized", _2=>16, _3=>16) Canvas._completeResizeBy() Canvas.moveBy(_1=>0, _2=>0, _3=>undef, _4=>true) Canvas.moveTo(_1=>0, _2=>24, _3=>undef, _4=>true) Canvas.setRect(_1=>0, _2=>24, _3=>1400, _4=>839) TabSet.fixLayout() TabSet.layoutChildren(_1=>"resized", _2=>16, _3=>16) Canvas._completeResizeBy() Canvas.moveBy(_1=>0, _2=>0, _3=>undef, _4=>true) Canvas.moveTo(_1=>null, _2=>null, _3=>undef, _4=>true) Canvas.setRect(_1=>null, _2=>null, _3=>"100%", _4=>"100%") Canvas._resolvePercentageSize() Canvas.pageResize(=>null, undefined=>undef) [c]Page.handleEvent(_1=>null, _2=>"resize") EventHandler._pageResize() [c]Page.finishedLoading(=>null, undefined=>undef) [c]Page.handleEvent(_1=>null, _2=>"load") [c]EventHandler.handleLoad(_1=>[object Event]) unnamed() 
    com.smartgwt.client.core.JsObject$SGWT_WARN: 19:55:26.052:WARN:Log:TypeError: _1[i] is undefined     DynamicForm.itemsMoved()     GridBody.parentMoved(_1=>{Obj},  _2=>5,  _3=>10004)     Canvas._fireParentMoved({Obj}, 5, 10004)     Canvas.parentMoved(_1=>{Obj},  _2=>5,  _3=>10004)     Canvas._fireParentMoved({Obj}, 5, 10004)     Canvas.parentMoved(_1=>{Obj},  _2=>5,  _3=>10004)     Canvas._fireParentMoved({Obj}, 5, 10004)     Canvas.parentMoved(_1=>{Obj},  _2=>5,  _3=>10004)     Canvas._fireParentMoved({Obj}, 5, 10004)     Canvas._completeMoveBy()     Canvas.moveBy(_1=>5,  _2=>10004,  _3=>undef,  _4=>undef)     Canvas.moveTo(_1=>5,  _2=>5)     Layout.stackMembers(_1=>[object Array],  _2=>[object Array])     Layout.layoutChildren(_1=>"resized",  _2=>16,  _3=>16)     Canvas._completeResizeBy()     Canvas.moveBy(_1=>0,  _2=>0,  _3=>undef,  _4=>true)     Canvas.moveTo(_1=>0,  _2=>24,  _3=>undef,  _4=>true)     Canvas.setRect(_1=>0,  _2=>24,  _3=>1400,  _4=>839)     TabSet.fixLayout()     TabSet.layoutChildren(_1=>"resized",  _2=>16,  _3=>16)     Canvas._completeResizeBy()     Canvas.moveBy(_1=>0,  _2=>0,  _3=>undef,  _4=>true)     Canvas.moveTo(_1=>null,  _2=>null,  _3=>undef,  _4=>true)     Canvas.setRect(_1=>null,  _2=>null,  _3=>"100%",  _4=>"100%")     Canvas._resolvePercentageSize()     Canvas.pageResize(=>null, undefined=>undef)     [c]Page.handleEvent(_1=>null,  _2=>"resize")     EventHandler._pageResize()     [c]Page.finishedLoading(=>null, undefined=>undef)     [c]Page.handleEvent(_1=>null,  _2=>"load")     [c]EventHandler.handleLoad(_1=>[object Event])     unnamed()  	at sun.reflect.GeneratedConstructorAccessor31.newInstance(Unknown Source) 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) 	at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) 	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) 	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) 	at java.lang.Thread.run(Thread.java:619)
    To me it seems there is a layouting problem when a FloatItem is involved...

    Cheers
    fatzopilot
Working...
X