@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();
name.setEnabled(createFlag);
final AjaxButton submit = new ClearIndicatingAjaxButton("apply", new ResourceModel("submit"), pageRef) {
private static final long serialVersionUID = -958724007591692537L;
@Override
protected void onSubmitInternal(final AjaxRequestTarget target, final Form form) {
DerivedSchemaTO schemaTO = (DerivedSchemaTO) form.getDefaultModelObject();
try {
if (createFlag) {
restClient.createDerivedSchema(kind, schemaTO);
} else {