This is a blank project, containing only all the necessary boilerplate stuff, for getting you started easily ...
- eclipse with appengine plugin
- Import this project into eclipse, disconnect it from git and rename it.
- Use the gen-persistencejs-sync task to create synced model and associated controller.
- Add fields to models as usual, use Sync annotation to mark fields for sync
- After generating setter/getter for new fields, insert at the setter body a meta function (which checks/sets a dirty field), see example below:
public class MyModel implements Serializable {
// ... [cutted out]
@Sync
private String foo;
// ... [cutted out]
public void setFoo(String foo) {
MyModelMeta.get().syncFoo(this, foo); // <<< ADD THIS !!!
this.foo = foo;
}
}