Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Blank project for slim3 (java/appengine) based serverside for persistencejs
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.externalToolBuilders
.settings
lib
libsrc
src
test/WEB-INF/appengine-generated
war
.classpath
.factorypath
.gitignore
.project
README.md
build.properties
build.xml

README.md

Serverside sync (in Java / on appengine) for persistencejs - blank project

This is a blank project, containing only all the necessary boilerplate stuff, for getting you started easily ...

Requirements:

  • eclipse with appengine plugin

How to:

  • 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;
    }
}

Links:

Something went wrong with that request. Please try again.