Skip to end of metadata
Go to start of metadata

We have used the Play framework for the ug prospectus (github) rewrite.

Version: 1.2.7 - download. Release notes are always in the documentation for that version, e.g. 1.2.4 release notes.

Brief notes

New project

It is worth telling subversion to ignoring the tmp and modules directory:

In the (vi-powered window) put:


Commit this change separately to the initial commit or madness will ensue.

Run the project

Use play run or play run --%local where local is the environment setting. Note that you can also use play id to set a default environment. Default environment is used if you do not specify an environment - basically saves you having to type the --%local flag. Out of the box default is blank.

Environment settings

Along with all other settings are in conf/application.conf - environment specific variables are prefixed with the environment name. To use the continuous integration server ensure there is a test-build id.

URL structure

Can be found in /conf/routes

After changing routes, need to restart Play.

Module management

Found in /conf/dependencies

After changing, need to run play dependencies to update local modules. If there is ever a problem with this, the dependencies stuff is cached by ivy2. Clear its cache (~/.ivy2/cache/ on linux) to force it to go back online.

So far we have used the inbuilt CRUD module and a CAS module. Neither work properly under Java5.

Preload data

Use Fixtures to load a yaml file. So far we have put this file in conf/ and loaded it into the model using Fixtures.loadModels("test-data.yml")

Note that the yaml file needs to be a particular syntax:

CRUD notes

Adding TinyMCE

See UG Prospectus TinyMCE Hacks and Configuration

Changing just the labels for listed objects in the Admin screens

Simply modify the toString method for that object.

Changing the field labels for an object

Modify conf/message

Hiding a field from CRUD

Use the @Hidden annotation (remember to import controllers.CRUD.Hidden)

  • No labels