@Override
public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
DerSchemaTO schema, final boolean createFlag) {
if (schema == null) {
schema = new DerSchemaTO();
}
final Form<DerSchemaTO> schemaForm = new Form<DerSchemaTO>(FORM);
schemaForm.setModel(new CompoundPropertyModel<DerSchemaTO>(schema));
final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
schema, "name"));
name.addRequiredLabel();
final AjaxTextFieldPanel expression = new AjaxTextFieldPanel("expression", getString("expression"),
new PropertyModel<String>(schema, "expression"));
expression.addRequiredLabel();
final WebMarkupContainer jexlHelp = JexlHelpUtil.getJexlHelpWebContainer("jexlHelp");
final AjaxLink<Void> questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
schemaForm.add(questionMarkJexlHelp);
questionMarkJexlHelp.add(jexlHelp);
name.setEnabled(createFlag);
final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
private static final long serialVersionUID = -958724007591692537L;
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form form) {
DerSchemaTO schemaTO = (DerSchemaTO) form.getDefaultModelObject();
try {
if (createFlag) {
schemaRestClient.createDerSchema(kind, schemaTO);
} else {