MigCalendar bean wrapper released

I did get managed the bean to display on Windows XP but..
I have some rendering issues. (can’t change to 5 days view, and don’t see any appointment)

I think I have downloaded the wrong migcalendar.jar (rc2??)

Can you provide us the right link, which migcalendar.jar is working?
(there are a few on the website)

HJK:
I did get managed the bean to display on Windows XP but..
I have some rendering issues.quote]

Same for me…

Hello,

You should download the evaluation package. It contains the latest version of the migcalendar.jar.

Cheers,

oke, I downloaded that version, and in the beginning it works indeed!
(trying the servoy-solution of Fred)
But as soon, as I click around, select some categories, the bean ‘hangs’!

I can’t change to weekview or month-view and I get al kind of rendering issues.

I think this is the wrapper and not the bean itself that makes these problems since we (the bean creator) have had no such bug reports from the “normal” bean customers.

If you can report a case where this can be recreated 100% of the time then Fred can problably figure it out.

Cheers,

Release 1.0.1 details:

  • Added support for renaming the “users” filter node.
  • Deprecated the setDoctors method - replaced with setUsers
  • Modified users/categories so that categories and users can have the same identifier without overwriting and rendering issues.
  • Updated the category filtering logic to better filter categories.

Hello Fred,

thanks for the enhancements. I have played with it and still have some issues:

  1. I see no way of only selecting one user (I always see everybodys calendars). I would like to show only the current user’s calendar as default, but something like
elements.scheduleBean.setCategoriesChecked("Users", false);
elements.scheduleBean.setCategoriesChecked("Users/aUser", true);

or

elements.scheduleBean.setCategoriesChecked("aUser", true);

doesn’t seem to work.

  1. The scrollbar of the event filter are doesn’t work right. If you have 100 users, you can’t really scroll to the end (maybe not your problem).

  2. Somehow I have problems understanding those categories. It seems that if I check them all from the beginning, I can use them to filter out the ones that I don’t want to see. But if I uncheck them all, it works the other way round?!

Thanks and keep up working :-)
Patrick

patrick:

  1. I see no way of only selecting one user (I always see everybodys calendars). I would like to show only the current user’s calendar as default, but something like
elements.scheduleBean.setCategoriesChecked("Users", false);

elements.scheduleBean.setCategoriesChecked(“Users/aUser”, true);




or 

elements.scheduleBean.setCategoriesChecked(“aUser”, true);


doesn't seem to work.

Are you passing the ID of the category/user when calling setCategoriesChecked? That should work, but I will look into it. I will also add support for selecting/unselecting all categories/users.

I should have something available for download tonight (tomorrow am for your timezone ;))

patrick:
2. The scrollbar of the event filter are doesn’t work right. If you have 100 users, you can’t really scroll to the end (maybe not your problem).

I have had some problems with that scrollbar in the past. I will also look into that.

patrick:
3. Somehow I have problems understanding those categories. It seems that if I check them all from the beginning, I can use them to filter out the ones that I don’t want to see. But if I uncheck them all, it works the other way round?!

The filters are a bit complicated - I modified the way they work slightly from the original MigCalendar demo app… they are supposed to work this way:

The “Users” tree node controls which user’s events are visible. The “Categories” tree node controls which types of events you want to temporarily filter on. If you hover over the header above the tree that says “Event Filters” a tooltip will appear that explains it…

I have been thinking about modifying the filters to be more configurable, and including the original filter functionality as an option. If you have an idea of how you would like it to work, let me know. I can make it filter pretty much however you want, short of responding to voice commands :)

Harjo, you mentioned that you were having rendering issues. If you could let me know what type, and where I would be happy to resolve them. What would help is if you send a copy of the .log.txt file, or another output log that may contain error messages.

Thanks,
Fred

Hello Fred:

I think, the “categories” should work like that:

no matter how you want to call it (doctors, categories, users, rooms, beamers), you are talking about attributes of an event object. The user doesn’t have to be more logical than the category nor the doctor. It’s just a filter that is tied to a dataset column. If you check one, that column is queried. If you turn it off, that column will not be queried.

And in my eyes, these filters should not temporarily but permanent. I check it, I see it. I wouldn’t like the filters to go away if I change the moth or something like that.

Regarding this:

Are you passing the ID of the category/user when calling setCategoriesChecked?

To be honest: I haven’t even tried :cry:. Probably works that way.

I apologize - some issues came up that prevented me from updating last night. I will post fixes for the user node selection tonight.

In regards to the above suggestion Patrick, that is a good one and the way it originally worked… When I built the bean the requirements stipulated that I change it to work the way that it currently does with the separate logic for “Users” and “Categories”.

Since the filters will need to work in different ways for each developer/solution, I need to design a process for enabling different filter configurations without the need for branching the development tree.

I will post some options for feedback soon, but if you have ideas please let me know.

patrick:
And in my eyes, these filters should not temporarily but permanent. I check it, I see it. I wouldn’t like the filters to go away if I change the moth or something like that.

I agree. I believe that they currently do remain permanent until they are changed, but I will do some testing to be sure.

Fred

I released a small fix last night for setting the a users node checked state. It is available at http://www.servoybeans.com/ScheduleCalendar.jar

I have been doing a lot of testing on the bean, and realize that there are still a few problems with the event filtering. I am in the process of rewriting that logic to be sure that it is clean and that it works correctly. It shouldn’t take too long, but at the moment I am unwilling to commit to a specific timeframe. When I am finished the filters will initially work in one of two configurations: The first configuration will separate the filter logic between Users and Categories as is currently the case (but without bugs). The second configuration will act exactly like the demo MigCalendar application that ships with the migcalendar.jar where all categories are handled the same. It will work on a pluggable architecture so that additional filter types can be created and used quite easily.

I am updating all documentation as well which should be available at about the same time as the new event filters.

Thanks,
Fred

Hi Fred,
I have downloaden today everything (22th november) and I have some questions and I am not sure if it a bug, or something i’m doing wrong

I downloaded also the Servoy solution of yours.

I have 3 events in a week, I only can move one or two of them to another location(date). And sometimes it changes the duration of the event

With the Mig_calendar solo I can create an event with a right-click of the mouse, in the wrapper it seems to be impossible.

And what does the setDoctors do? Been toying with it, but I dont see it.

Further, I need to congratulate you on this wrapper, it is a great addition

Hi Tweetie,

tweetie:
I have 3 events in a week, I only can move one or two of them to another location(date). And sometimes it changes the duration of the event

I’m not sure why one of the events doesn’t move, I’ll look into that. One thing to remember about the events (and this might be one of the reasons you notice the duration change) is that they are draggable to another location, and also resizable to change the duration. The cursor arrows that appear over the event will determine how the event acts.

Also, the calendar displays a full 24 hours, but the hours before 9am and after 5pm are by default condensed so that events in that time frame appear smaller than they really are. If you drag an event that is in that area into the main time frame (between 9am and 5pm) it will appear to expand, but it really is the same.

tweetie:
With the Mig_calendar solo I can create an event with a right-click of the mouse, in the wrapper it seems to be impossible.

In the wrapper you need to program it to add an event. I didn’t put an example of that in the sample solution - I will update that soon, but basically you will need to add a popup menu item that says something like “Add Event” to the bean, and then listen for it with the registered callback. When it is clicked you can display your events form and then add the event to the bean.

It has been slow going, I know, but I will soon have some more examples up on the site.

tweetie:
And what does the setDoctors do? Been toying with it, but I dont see it.

setDoctors adds event owners to the event filter tree. I am going to remove this method in the future, and replace it with setUsers or setOwners instead.

I will definitely have some more information available by Monday, but if you have any other questions please ask.

Thanks for using the bean :)
Fred

Where is calendar data persisted ?

The data for the calendar comes from your solution’s database. I tried to create the bean so that most of the logic and data manipulation happens inside your Servoy forms. This way you have more control as a developer over how your data is handled.

For example, in your solution you would create a table called “events”, or “activities” or something that has colums that look something like this:

table events (
eventsid - integer PK
label - text
ownerid - integer
categoryid - integer,
summary - text
)

You could also have two other tables that look something like this:

table users ( // or ‘owners’ or ‘doctors’, etc…
usersid - integer PK
name - text
hexcolor - text
)
table categories ( // or ‘event_types’, etc…
categoriesid - integer PK
label - text
hexcolor - text
)

Then you can open your events form when a user double-clicks on an event and load in the eventid…

For example, in your calendar form’s onShow method:

elements.scheduleBean.setEventOpenedCallback(onEventOpened);

then in your onEventOpened method:

var eventid = arguments[0];  // the bean passes the identifier of the event that was double-clicked.

forms.my_events_form.showRecords(databaseManager.convertToDataSet(eventid));

Then after the user edits the event record, you could call an updateEvents method that did a query on your events table and set those events in the bean.

I hope this makes sense… I’ve been awake for far too long :shock: but I hope that this is what you meant in regards to the data. If not let me know.

Thanks,
Fred

it is :)

thanks, J

fdoddridge:
Hi Tweetie,

tweetie:
I have 3 events in a week, I only can move one or two of them to another location(date). And sometimes it changes the duration of the event

One thing to remember about the events (and this might be one of the reasons you notice the duration change) is that they are draggable to another location, and also resizable to change the duration. The cursor arrows that appear over the event will determine how the event acts.

I remembered it :smiley: but still i cant move them, and sometimes an appointment with duration 2 hours would change in the duration of the other appointments.

I have a couple of other questions:
-what happens if an appointment has more than 1 user…ie an appointment has a n-n relation with users(tables: events, users, events_to_users). If so, what happens if you drag such an appointment to another date.Would it still be possible to check if overlapping of appointments would occur with all the users in 1 appointment? With the right SQL-queries it wouldn’t be a problem to show the appointments, but I wonder if I can drag 1 appointment with multiple users to another date and still check every users if the appointment overlap
-is it possible to disable dragging the events, I want some users only to look at it and not touch. With scripting you could prevent the user from actually changing the date’s…but I would preffer to disabling the dragging to prevent confusion.
-how about changing the skins and the shapes, like in Mig-calendar (especially something to show graphically the availability of a user when making an appointment)…check the attachment
-how about separating the components, especially the calendar on the left-lower part
-any idea about the pricing??

You wonder why so much questions…Welll I made something in Servoy with calendar/agenda…and it looked quit nice but a couple of things that i couldn’t solve that could be solved with mig+wrapper
The problems i had:
-no dragging
-didn’t work out how to show overlapping appointments, so I just didn’t allow them
-it was a static agenda, meaning you could make max 40 appoitnments a day, and you could show agenda of max 7 people at the same time. If I wanted more I was forced to make addiotional forms.

tweetie:
I remembered it :D but still i cant move them, and sometimes an appointment with duration 2 hours would change in the duration of the other appointments.

Sorry for delay in replying… life has been busy. I have never seen this behavior before, but I think it may be related to event or category id conflicts… I’ll look at it some more.

As for the other questions, all of the features you asked about are possible, but only a few of them are currently implemented.

I am just about finished separating some of the filter logic so that you can add more than one owner to an event and have act the way you want. It will always check for overlapping events and display the overlap effect.

Disabling the drag and drop is possible, but I haven’t added that to the features list yet.

As for changing the skins and shapes, that is definitely possible, but I haven’t added support in the bean for that either…

I am planning to create separate beans for each of the components, such as the calendar on the bottom left along with many others but they are not available at the moment.

I will update the pricing for the current ScheduleCalendar bean on the site tonight. I apologize for the hasty reply, I will try to get some more information to you soon.

Thanks,
Fred

I have put out a new build at http://www.servoybeans.com/ScheduleCalendar.jar

This one fixes some of the issues that tweetie reported about resizing/rescheduling events, as well as some other small issues related to tooltips and toolbar buttons.

I also updated the demo solution to show how to use most of the features in the bean ( http://www.servoybeans.com/CalendarDemo.zip ). The solution uses the sample crm database, just adding a few tables as necessary.

Also of note: if you have used the bean in a solution and have attempted to connect to that solution with a client machine running Java 1.5 you should upgrade to Servoy R2 2.2.3 or it may not work. See http://forum.servoy.com/viewtopic.php?t=5456 for more details.

Thanks,
Fred

Thaknx for the update…
I stumbled on a problem (maybe a bug)

SetupCategories
elements.scheduleBean.setCategoriesNodeLabel("Event Type");
var query = "select * from event_categories";
var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, -1);
if (dataset.getMaxRowIndex() > 0) {
	elements.scheduleBean.setCategories(dataset, "event_categoriesid", "label", "color");
}
elements.scheduleBean.addCategory("blah", "Some other category", "#fa7733");
elements.scheduleBean.updateCategoryTree();

Here you setup the categories. You have 2 categories in a table: Task and Meetings. In the method you add one category manually: Some other category.
In the form you only see: Tasks and Some other category.
If I put an event on Meetings, and try to see to show the calendar Servoy freezes up.
I also tried to change elements.scheduleBean.addCategory(“blah”, “Some other category”, “#fa7733”); into elements.scheduleBean.addCategory(3, “Some other category”, “#fa7733”);…I also added a record in the eventscategory table…
but it still only shows 2 categories.

If I do an additional elements.scheduleBean.addCategory(“test”, “test category”, “#fa7733”); it adds the category to the filter

Thought you might wanna know…
Gonna test it further and try to implement it our solution.

I found the error…
There is no ‘#’ in the table…you need to add ‘#’ before the color at some point.