I'm trying to form a post with this format:
There are two parts that I'm focusing on, the "criteria" attribute and the value array. The values are coming to be me as doubles. I've tried creating criteria something like this:
(the grid section isn't relevent for this discussion)
Unfortunately the asAdvancedCriteria turns it into a big OR, which isn't what I'm looking for, I want to actually end up with an array.
So I've tried turning the incoming data into an array of floats so I can use advanced criteria:
On fetch data this fails:
Though if I replace the array with an array of integers it doesn't fail.
I have one question with a few parts:
The central question is: is there a way to achieve the intended format given above with doubles as the input?
I'm fine converting to floats. Related: Is there a bug with arrays of floats that is stopping advanced criteria from working, if so is there a workaround.
Code:
data :{ criteria: [ {fieldname.. operator... value: [2.34355345, 33.23423423...] ] }
Code:
mapCriteria.addCriteria("map_bounds", new Double[]{3.324655, 3.34342423}); criteria.buildCriterionFromList(OperatorId.AND, new Criterion[]{mapCriteria.asAdvancedCriteria(), grid.getCriteria().asAdvancedCriteria()});
Unfortunately the asAdvancedCriteria turns it into a big OR, which isn't what I'm looking for, I want to actually end up with an array.
So I've tried turning the incoming data into an array of floats so I can use advanced criteria:
Code:
AdvancedCriteria mapCriteria = new AdvancedCriteria("map_bounds", OperatorId.EQUALS, new Float[]{2f,3f,2f,1f});
Code:
Caused by: com.google.gwt.core.client.JavaScriptException: (null): null at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) at com.smartgwt.client.widgets.grid.ListGrid.fetchData(ListGrid.java)
I have one question with a few parts:
The central question is: is there a way to achieve the intended format given above with doubles as the input?
I'm fine converting to floats. Related: Is there a bug with arrays of floats that is stopping advanced criteria from working, if so is there a workaround.
Comment