Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Integrating GWT-Cal to Vaadin as a Vaadin Component
This is my first post. I have mediocre knowledge on the Vaadin Platform.
One of my requirements in building a Vaadin Application is to create an advanced callendar application. So I have discovered the gwt-cal (which can be found here : http://code.google.com/p/gwt-cal/) which fits my needs perfectly. Thus, I would to create a Vaadin component which actually is using similar functionality or the gwt-cal itself. The functionality that i am looking for is similar with the following snipset
Panel p = new Panel(); p.addComponent(new GWTCalendar()); ....
Any help would be appreciated.
Thx in advance!
I made a quick experiment and I think it easier to pass you with the source code along trying to explain what is needed. So, see attached files first.
Used the gwt-cal version 0.8.2 and followed the instructions here: http://code.google.com/p/gwt-cal/wiki/GettingStartedv08
Assuming you are using Vaadin with Eclipse:
- Create a new Vaadin Eclipse Project
- Create a new Vaadin widget
- Put calendar.jar to WEB-INF/lib
- Edit the project widgetset (the CalendarWidgetset.gwt.xml file) to inherit the the package
- Implement VCalendar (client-side) and Calendar (server-side) classes. Try to keep the state at the server-side.
- Design a good API for the Calendar class and implement a small sample application :)
As you might guess, this quick widget integration here does not do much (just shows the calendar), but it should help you to get further with the integration. I put some TODO notes into code along the way.
Thank you very much for the fast reply!
I ll try it as soon as i can and i keep you posted.
I'm going to use this guide for others components!
Sami, the widget came out beautifuly!
Thx for your help!
Now, I ll look into how I can make it functional (Adding appointments etc..).
Thx again for your time!
Have you managed to get any further with creating a Vaadin component based on the gwt-cal widget?
Thanks for a wonderful instruction, I tried this with a different gwt component (http://sourceforge.net/projects/gwt2swf/), and it doesn't seem to work, only show the default theme background. However, using it in a GWT application works as expected.
Are there any restriction in Vaadin on dealing with this particular component?