Class EditUtil
java.lang.Object
net.sf.basedb.clients.web.extensions.edit.EditUtil
Utility class for handling edit-dialog related extensions. This class
handler both the tab-control extension points in the edit-dialog and
the on-save extension points when saving the changes.
- Since:
- 2.17
- Author:
- Nicklas
- Last modified
- $Date: 2018-08-06 14:46:45 +0200 (må, 06 aug 2018) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
registerEditTab
(Registry registry, String id, String name) static void
registerExtensionPoints
(Registry registry) Registers tabcontrol and on-save extension points with the given registry.private static void
registerOnSave
(Registry registry, String id, String name, RethrowErrorHandlerFactory ehf) static ExtensionsInvoker<TabAction>
useEditExtensions
(JspContext jspContext) Use edit-dialog extensions for a given gui context.private static ExtensionsInvoker<?>
useExtensions
(String prefix, JspContext jspContext) static ExtensionsInvoker<OnSaveAction>
useOnSaveExtensions
(JspContext jspContext) Use on-save extensions for a given gui context.
-
Field Details
-
EDIT_ITEMS
An array containing all items that we are registering extension points for. The extension point id for an item is constructed as: EP_PREFIX_EDIT/EP_PREFIX_SAVE + Item.name().toLowerCase() -
EP_PREFIX_EDIT
ID prefix for tabcontrol extension points on edit pages. -
EP_PREFIX_SAVE
ID prefix for tabcontrol extension points on edit pages.
-
-
Constructor Details
-
EditUtil
public EditUtil()
-
-
Method Details
-
useOnSaveExtensions
Use on-save extensions for a given gui context. This method will assemble all specific and generic extension points and then callExtensionsControl.useExtensions(JspContext, String...)
.- Parameters:
jspContext
- The current jsp context- Returns:
- An invoker instance
-
useEditExtensions
Use edit-dialog extensions for a given gui context. This method will assemble all specific and generic extension points and then callExtensionsControl.useExtensions(JspContext, String...)
.- Parameters:
jspContext
- The current jsp context- Returns:
- An invoker instance
-
useExtensions
-
registerExtensionPoints
Registers tabcontrol and on-save extension points with the given registry. Called at application startup. -
registerEditTab
-
registerOnSave
private static void registerOnSave(Registry registry, String id, String name, RethrowErrorHandlerFactory ehf)
-