T - the PDO typeC - the controller typepublic class PdoViewer<T extends PersistentDomainObject<T>,C extends FxController & PdoHolder<T>> extends PdoEditor<T>
Example (in a GuiProvider):
@Override
public PdoEditor<Incident> createEditor() {
return new PdoViewer<Incident, IncidentView>(Fx.load(IncidentView.class));
}
@Override
public boolean isEditAllowed() {
return false; // disable the edit item in the context menu
}
| Constructor and Description |
|---|
PdoViewer(C viewController)
Creates a view wrapper.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getPdo() |
C |
getViewController()
Gets the view controller.
|
boolean |
isEditAllowed()
Returns whether the user has sufficient permissions to edit the PDO.
|
void |
requestInitialFocus()
Requests the initial focus after stage is shown.
|
void |
setPdo(T pdo) |
getDomainContext, getValidationMappers, getValidationPath, isChangeable, isNewAllowed, isRemoveAllowed, isViewAllowed, print, setChangeable, validateFormconfigure, createBinder, getBinder, getContainer, getDefaultScopes, getFXMLFields, getFXMLMethods, getStage, getView, initialize, setView, validateInjectionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waiton, oppublic PdoViewer(C viewController)
viewController - the view controllerpublic C getViewController()
public T getPdo()
public void setPdo(T pdo)
public void requestInitialFocus()
PdoEditorrequestInitialFocus in class PdoEditor<T extends PersistentDomainObject<T>>public boolean isEditAllowed()
PdoEditorisEditAllowed in class PdoEditor<T extends PersistentDomainObject<T>>Tentackle - distributed, domain- and model-driven