geoserver/geoserver — pull request #731 by lindsejs (2014-09-14 21:16:17+00:00)
Title: added scripting web UI docs, added docs for WFS TX and Filter Function h...

Added scripting web UI docs, added docs for WFS TX and Filter Function hooks.

I didn't succed in WFS TX preUpdate script to modify attributes, so did not include it in docs. Tryed this on state layer, it didn't change attributes:

from time import gmtime, strftime

def preUpdate(updated, props, req, context):
for f in updated.features():
f.setAttribute("STATE_NAME", strftime("%Y-%m-%d %H:%M:%S", gmtime()))
f.setAttribute("WATER_KM",f.getDefaultGeometry().getArea())
f.setAttribute("LAND_KM",f.getDefaultGeometry().getArea())