Announcement

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

    Calendar and Start and End

    I Want show many many events for the Calendar!

    Which way can i do to show the Calendar for the current view (for exeample for jan 2008).

    So I show only the events which can be show!

    Thank

    #2
    This is what the Calendar already does - it only shows the events in the current date range.

    Comment


      #3
      I hope so! But which event can i overwrite to set the event dynamic

      for example:

      The Calendar show the events for jan and the user navigate to feb. So the Calendar ask a method which events are for the feb. I must generat the events dynamicly. I have events which are showed every week

      Comment


        #4
        The event is there in SmartClient (Calendar.dateChanged()) so you could get to it via JSNI for now, we'll see that it's added in a nightly build.

        Comment


          #5
          Build 12-17-2008 has Calendar.addDateChangedHandler(..).

          Sanjiv

          Comment


            #6
            Thanks

            super, but who can I get the Chosen Date Area (for example 01.01.08-30.01.08 or 12.12.08-19.12.08) or 12.12.08

            calendar.getChosenDate(); call an Exception
            com.google.gwt.dev.shell.HostedModeException: Calling method 'toDate': JS value of type JavaScript object, expected double
            at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:71)
            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:155)
            at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
            at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
            at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
            at org.eclipse.swt.internal.ole.win32.COM.VtblCall(Native Method)
            at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke(IDispatch.java:64)
            at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:493)
            at org.eclipse.swt.ole.win32.OleAutomation.invoke(OleAutomation.java:417)
            at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow(ModuleSpaceIE6.java:67)
            at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke(ModuleSpaceIE6.java:152)
            at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:447)
            at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:228)
            at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
            at com.smartgwt.client.widgets.BaseWidget.getPropertyAsDate(BaseWidget.java)
            at com.smartgwt.client.widgets.BaseWidget.getAttributeAsDate(BaseWidget.java:306)
            at com.smartgwt.client.widgets.calendar.Calendar.getChosenDate(Calendar.java:115)
            at de.groupa.client.pages.OverviewRoom$1.onDateChanged(OverviewRoom.java:62)
            at com.smartgwt.client.widgets.calendar.events.DateChangedEvent.dispatch(DateChangedEvent.java:99)
            at com.smartgwt.client.widgets.calendar.events.DateChangedEvent.dispatch(DateChangedEvent.java:1)
            at com.google.gwt.event.shared.HandlerManager$JavaHandlerRegistry.fireEvent(HandlerManager.java:81)
            at com.google.gwt.event.shared.HandlerManager$JavaHandlerRegistry.access$1(HandlerManager.java:76)
            at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:371)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
            at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126)
            at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155)
            at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
            at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
            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:720)
            at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
            at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
            Last edited by eraser; 17 Dec 2008, 11:12.

            Comment


              #7
              sorry about that, I made a change that broke in the 12-17-2008 build. This has been fixed in the 12-18-2008 build.

              Sanjiv

              Comment


                #8
                smartgwt 3.0

                this handler works if the date is via date picker or prev or next. But when the TAB is changed the handler doesn't work. How to bring the dynamic data????

                Comment


                  #9
                  Start and end Date form the current view

                  I made my own control buttons and i would like to display a label (like the control bar) that show the current date range, but i don't see a java or native method that get the start date and end date.

                  regards.

                  Comment


                    #10
                    If you want to display the range outside of the Calendar, you can combine a DateChanged handler with getChosenDate() and getCurrentViewName() to calculate the shown date range.

                    Comment


                      #11
                      We've added new APIs - getVisibleStart/EndDate() and getPeriodStart/EndDate() which return the extremes of the visible calendar, and the extremes of the current week or month respectively.

                      These should hit the nightlies for 11/8

                      Comment


                        #12
                        This API is exactly what I need, do you have any idea when it will be available? Can we get it from svn?

                        Also can you please add a click handler that will fire every time the user clicks on a tab, so that we can fetch data accordingly because addDateChangedHandler does not fire if someone goes and change the tab from date to month?

                        Comment


                          #13
                          This API is in 3.1d - builds are available from smartclient.com/builds.

                          You should be loading events on demand at the month granularity regardless of what tab is showing. There's no point introducing a series of round trips if the user flips through a few days.

                          Comment


                            #14
                            Thanks for the quick reply,

                            Actually in some cases I may have more than 200 events per day with many custom fields so I want to avoid month view and only use day and maybe weekview, how is this possible?

                            Can I completely disable the MonthView Tab and how?

                            Thanks again

                            Comment


                              #15
                              If you don't want to show the month view set showMonthView to false.

                              At that point you'd load events per week, but still no point in loading them for individual days unless the day view is the only thing the user can see.

                              Comment

                              Working...
                              X