@Override
public void setSchemaModalPage(final PageReference pageRef, final ModalWindow window,
AbstractBaseBean schema, final boolean createFlag) {
if (schema == null) {
schema = new DerivedSchemaTO();
}
final Form schemaForm = new Form("form");
schemaForm.setModel(new CompoundPropertyModel(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");
schemaForm.add(jexlHelp);
final AjaxLink questionMarkJexlHelp = JexlHelpUtil.getAjaxLink(jexlHelp, "questionMarkJexlHelp");
schemaForm.add(questionMarkJexlHelp);
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) {
DerivedSchemaTO schemaTO = (DerivedSchemaTO) form.getDefaultModelObject();
try {
if (createFlag) {
restClient.createDerivedSchema(kind, schemaTO);
} else {