}
public IAjaxCallDecorator getSaveDecorator() {
// we need to force CodeMirror to update the textarea contents (which it hid)
// before submitting the form, otherwise the validation will use the old contents
return new AjaxCallDecorator() {
@Override
public CharSequence decorateScript(CharSequence script) {
// textarea.value = codemirrorinstance.getCode()
String id = getTextAreaMarkupId();
return "if (document.gsEditors) { document.getElementById('" + id + "').value = document.gsEditors." + id + ".getValue(); }" + script;