Posts

Showing posts from November, 2012

GAE BigTable datatypes and Vaadin Form Properties

As we already discussed, Vaadin provides easy way to edit JAVA POJO object using its com.vaadin.data.util.BeanItem  representation, that can be used in Vaadin forms, just out of the box. However we cannot expect that our Java POJO's will have only fields of Strings and some primitives/their wrappers. App Engine Datastore itself provides rich set of basic types - see here for complete reference. As we already show, it was very easy to use Vaadin to bind POJO fields (through Vaadin properties) to UI form elements. It worked great for Strings and primitives/their wrappers, but it will not work for other BigTable data types. The reason for that is that Vaadin does not know how to handle such classes as  com.google.appengine.api.datastore.Email , com.google.appengine.api.datastore.Category  or com.google.appengine.api.datastore.GeoPt . However if we look closer into it, we can assume that those types can be quite well represented by java.lang.String with very straightforward rules fo