Hi Guys
I'm trying to use MiniDateRangeItem and I am heaving some problems.
I'm using it for some custom filtering. Once user makes a date selection and clicks the Filter button I execute this code:
What happens after is this Client Side exception:
Why is that happening? Am I doing something wrong?
I'm stuck at this at the moment and don't know how to move on!
I create my Range selection like this:
Version of SmartGWT is 2.2.
I'm trying to use MiniDateRangeItem and I am heaving some problems.
I'm using it for some custom filtering. Once user makes a date selection and clicks the Filter button I execute this code:
Code:
private Date getDateFrom(MiniDateRangeItem dateRange) { if (dateRange != null) { return dateRange.getValue().getStartDate(); } return new Date(); }
What happens after is this Client Side exception:
Code:
2010-07-02 16:43:25,253 [btpool0-37] INFO com....server.LogAllRPCCallsRemoteServiceServlet - RPC Call: void serverSideLog(String null<br/><pre style='border: 1pt solid red'>java.lang.Class.cast(Class.java:2990) com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:169) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:57) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.smartgwt.client.widgets.form.fields.MiniDateRangeItem.getValue(MiniDateRangeItem.java) com....client.exceptions.FilterButtonHandler.getDateFrom(FilterButtonHandler.java:46) com....client.exceptions.FilterButtonHandler.buildFilter(FilterButtonHandler.java:34) com....client.exceptions.FilterButtonHandler.getFilter(FilterButtonHandler.java:62) com....client.exceptions.ExceptionsPanel$FilteringForm.getFilter(ExceptionsPanel.java:157) com....client.exceptions.ActiveExceptionsQuery.getFilter(ActiveExceptionsQuery.java:41) com....client.exceptions.ActiveExceptionsQuery.fetch(ActiveExceptionsQuery.java:28) com....client.services.GWTRPCPagedDataSource.executeFetch(GWTRPCPagedDataSource.java:49) com....client.services.GWTRPCPagedDataSource.transformRequest(GWTRPCPagedDataSource.java:32) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.google.gwt.core.client.impl.Impl.apply(Impl.java) com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) sun.reflect.GeneratedMethodAccessor837.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107) com.smartgwt.client.widgets.grid.ListGrid.fetchData(ListGrid.java) com....client.exceptions.ExceptionsPanel$FilteringForm$1.onClick(ExceptionsPanel.java:107) com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:96) com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1) com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65) com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53) com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178) com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:67) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713) com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165) com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120) com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507) com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264) com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91) com.google.gwt.core.client.impl.Impl.apply(Impl.java) com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188) sun.reflect.GeneratedMethodAccessor837.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) java.lang.Thread.run(Thread.java:619) )
I'm stuck at this at the moment and don't know how to move on!
I create my Range selection like this:
Code:
MiniDateRangeItem dateRange = new MiniDateRangeItem("dateRange", ""); dateRange.setShouldSaveValue(true); DynamicForm dateRangeFilter = buildFilterFormWithGroupTitleAndNumberOfColumns("Date range", 1, dateRange); private DynamicForm buildFilterFormWithGroupTitleAndNumberOfColumns(String title, int numberOfColumns, FormItem formItem) { DynamicForm filter = new DynamicForm(); filter.setNumCols(numberOfColumns); filter.setTitleOrientation(TitleOrientation.TOP); filter.setIsGroup(true); filter.setGroupTitle(title); filter.setHeight(100); filter.setFields(formItem); return filter; }
Comment