T
- The class of the edited objectRESULT
- The class of the object returned by the save method. This can be the same as the one
of the edited object. Then you could use the Editor.SimpleEditor
. In more complex situations the
backend called in the save method will do some business logic resulting in a different output object.public abstract class Editor<T,RESULT> extends Action
Modifier and Type | Class and Description |
---|---|
static class |
Editor.NewObjectEditor<T> |
protected class |
Editor.SaveAction |
static class |
Editor.SimpleEditor<T> |
Action.ActionChangeListener
Modifier and Type | Method and Description |
---|---|
void |
action() |
void |
cancel() |
protected boolean |
closeWith(RESULT result) |
protected List<Action> |
createAdditionalActions() |
protected abstract Form<T> |
createForm() |
protected abstract T |
createObject() |
protected void |
fillWithDemoData() |
protected void |
finished(RESULT result) |
protected Class<?> |
getEditedClass() |
protected Object[] |
getNameArguments() |
protected T |
getObject() |
String |
getTitle() |
protected void |
objectChanged() |
protected abstract RESULT |
save(T object) |
protected void |
validate(T object,
List<ValidationMessage> validationMessages) |
fireChange, getDescription, getName, getResourceName, isEnabled, setChangeListener, setDescription, setEnabled
public Editor()
public Editor(String actionName)
protected Object[] getNameArguments()
getNameArguments
in class Action
protected Class<?> getEditedClass()
public String getTitle()
protected abstract T createObject()
protected T getObject()
protected void validate(T object, List<ValidationMessage> validationMessages)
protected boolean closeWith(RESULT result)
protected void finished(RESULT result)
public void cancel()
protected void objectChanged()
protected void fillWithDemoData()
Copyright © 2019. All rights reserved.