Thanks to everyone for the feedback on this bean. It has really helped in making improvements. Now that I have a bit more time I hope to finish up the remaining planned enhancements and release it as 1.1.
As always, please send me any bug reports or feature requests.
I have been doing tests using version 1.0.4 yesterday and just tested the latest release (although it still says “…v1.0.3 evaluation version”).
I have quite some problems:
What if an event has no category at all (NULL)? I have changed my query to return in those cases something like 99999 and added a category 99999, but that is quite a hassle. I think the whole thing should work without categories, if they are not used or only sometimes used.
Checking/unchecking a user has no effect. If I uncheck the whole user node, I would expect to see no events at all. Instead, all events are still there.
Unchecking a category, gives me this:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.miginfocom.calendar.category.CategoryFilter.accept(Unknown Source)
at com.miginfocom.calendar.activity.ActivityList.getActivityViewLists(Unknown Source)
at com.miginfocom.calendar.activity.ActivityDepository.getActivityViewLists(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.recreateActivityViews(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.getDateGrid(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.getPreferredSize(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.getPreferredScrollableViewportSize(Unknown Source)
at javax.swing.ViewportLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at java.awt.GridBagLayout.GetLayoutInfo(Unknown Source)
at java.awt.GridBagLayout.getLayoutInfo(Unknown Source)
at java.awt.GridBagLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at java.awt.BorderLayout.preferredLayoutSize(Unknown Source)
at java.awt.Container.preferredSize(Unknown Source)
at java.awt.Container.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at javax.swing.RepaintManager.validateInvalidComponents(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.miginfocom.calendar.category.CategoryFilter.accept(Unknown Source)
at com.miginfocom.calendar.activity.ActivityList.getActivityViewLists(Unknown Source)
at com.miginfocom.calendar.activity.ActivityDepository.getActivityViewLists(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.recreateActivityViews(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.paintActivities(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea$ActivityViewDecorator.doPaint(Unknown Source)
at com.miginfocom.calendar.decorators.DecoratorSupport.paintDecorations(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.paintComponent(Unknown Source)
at com.miginfocom.calendar.datearea.ThemeDateArea.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at com.servoybeans.migcalendar.scheduler.ScheduleView$4.paint(ScheduleView.java:258)
at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown Source)
at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
When I move the mouse over an event, I get lots of this:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.mozilla.javascript.Undefined
at com.servoybeans.migcalendar.scheduler.ScheduleCalendar$ScriptedToolTipProvider.configureToolTip(ScheduleCalendar.java:1771)
at com.miginfocom.calendar.datearea.DefaultDateArea.A(Unknown Source)
at com.miginfocom.calendar.datearea.DefaultDateArea.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Then some general ideas about the implementation:
In my case, I have up to 100 users, with lots of events, some of them are categorized
Usually, if you want to see your calendar, you only want to see yours. It’s cool that you can also see other’s, but that’s not the normal situation. So I think it should be possible to uncheck all users but one as a default. With my 100 users, you would always have to deselect all and then select yourself first. Or I have to loop over all users and uncheck them by method. In my eyes, the users node should behave upside down. Default is all unchecked and I have a method that let’s me select one.
It should be possible to use the system without categories if there are none.
Because of the exceptions thrown, I am currently not able to use this but would like to be
I know what is causing the problem with the tooltips, and I will fix that… a dumb mistake on my part. Like you said though, if you remove the setToolTipTextCallback method from your script it will work ok for now.
I will look at the case of an event having no categories this evening. The release I posted last night (1.0.5) fixed a lot of the category filtering problems, but I did not test for an event having no categories… I’ll add that to my test cases.
In regards to being able to select users, that does seem to be an important feature and I will include it in the next release. I’ll add some methods and/or properties to allow you to check or uncheck each root node.
The migCalendar looks interesting on its own but unable to get it to run within Servoy. As instructed I installed both the migCalendar.jar and ScheduleCalendar.jar in the Servoy plugins directory, imported the CalendarDemo.servoy.
I’m getting this error:
Could not perform form method ‘initialize Calendar’. Bean missing com.servoybeans.migcalendar.scheduler.ScheduleCalendar
Installing the migcalendarbean.jar also in the Servoy plugins directory doesn’t resolve it.
there seem to be some problem with the migcalendar bean on Mac OS X. I have yet to get it to work. Can’t get the ScheduleeCalendar bean to show in the list of beans. I think the ScheduleCalendar bean has problems locating the migcalendar.jar, possibly because migcalendar.jar can’t locate itself. Then I noticed that the migcalendar demo failed too (both the download and the java webstart versions)
Have been emailing Mikael the developer, he has tried to help out, – but we not got to the bottom of the problem. It runs fine on a Mac Mini he has borrowed.
I have 3 Macs all running 10.4.4, with Java 1.5.0_5. The migcalendar demo works on one of them – an old G4 Cube, but fails on the two others, a Powerbook G4 and a PowerMac Dual G4 ---- all running the same system and java versions.
As Christian is correctly stating there seems to be a problem in certain situations with the MiG Calendar Demo application on one or more combinations of OS X 10.4.x and Java 1.5.0_x.
It would be great if you OS X guys can just try to run the Demo Application from our site and post your exact OS X /Java version combination and whether it worked or not.
The problem here is that the bean is 100% pure Java and the exact same web started application has been verified on PC and Linux. The error that Christian is getting is a NoSuchField error and that should be exatly the same on all platforms, or Java is in trouble..
This has lead me to the conclution that this is a fault in the OS X JVM or somthing similar. It can also be some kind of classpath problem only related to OS X.
If you can provide any more details on the versions used and any other relevant details maybe we can even track down the exact combination that is not working and avoid it or maybe go around the problem.
not sure if it a bug or not…
but in your demo solution and also in my solution…the top-user (the user at the top of the user-node) is always unchecked…
I saw in the past that there is a way to check and uncheck the users and/or categories…but cant seem to find it anymore on your site.
Not sure how elements.scheduleBean.setUserChecked(Object identifier, boolean checked) works
As Christian is correctly stating there seems to be a problem in certain situations with the MiG Calendar Demo application on one or more combinations of OS X 10.4.x and Java 1.5.0_x.
It would be great if you OS X guys can just try to run the Demo Application from our site and post your exact OS X /Java version combination and whether it worked or not.
The problem here is that the bean is 100% pure Java and the exact same web started application has been verified on PC and Linux. The error that Christian is getting is a NoSuchField error and that should be exatly the same on all platforms, or Java is in trouble..
This has lead me to the conclution that this is a fault in the OS X JVM or somthing similar. It can also be some kind of classpath problem only related to OS X.
If you can provide any more details on the versions used and any other relevant details maybe we can even track down the exact combination that is not working and avoid it or maybe go around the problem.
Cheers,
This issue is exactly the same that presented by the Media Manager Bean. If you install the Mig calendar bean on Servoy 2.2.1 and not 2.2.3 its likely it will work. There were earlier problems with the class path issue that seemed to be fixed in 2.2.1 and appear to have regressed in this iteration. I hope someone can identify this problem quickly as its effectively made the Media Manger and it would appear Mig Cal beans difficult if not impossible to install on te Mac OSX10.4. IF anyone has a work around that will get theas beans to even show in the dialogue I would be very interested to hear!