Package ch.autumo.beetroot.handler.users
Class ExtUsersEditHandler
- All Implemented Interfaces:
Handler,RouterNanoHTTPD.UriResponder
Users edit handler for extended roles.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.autumo.beetroot.handler.BaseHandler
BaseHandler.IfSectionHandler -
Field Summary
Fields inherited from class ch.autumo.beetroot.handler.BaseHandler
action, columns, emptyBean, entity, htmlData, htmlHead, initialValues, insertServletNameInTemplateRefs, MSG_TYPE_ERR, MSG_TYPE_INFO, MSG_TYPE_WARN, PRECISION_INPUT_TYPES, servletName, TAG_PREFIX_LANG, transientFields, uniqueFields -
Constructor Summary
ConstructorsConstructorDescriptionExtUsersEditHandler(String entity) ExtUsersEditHandler(String entity, String errMsg) -
Method Summary
Modifier and TypeMethodDescriptionextractCustomSingleInputDiv(BeetRootHTTPSession session, String val, ResultSetMetaData rsmd, String columnName, String guiColName, int idx) Overwrite this method, if you need to add a custom field (HTML 'div'); e.g. when multiple user roles are used; in this case the 'div' is more likely consisting of 2 role assignment boxes instead of a simple input-'div' or use it for any custom 'div'.Class<?>Overwrite to get the right re-route/redirect index handler after modifying data.voidrender(BeetRootHTTPSession session) Overwrite to set your template variables.updateData(BeetRootHTTPSession session, int id) Update data in DB.Methods inherited from class ch.autumo.beetroot.handler.users.UsersEditHandler
getBeanClass, getTitleMethods inherited from class ch.autumo.beetroot.handler.DefaultEditHandler
extractSingleInputDiv, extractSingleInputDiv, formatSingleValueForDB, formatSingleValueForGUI, getResource, getSelectValues, isSelect, prepare, readDataMethods inherited from class ch.autumo.beetroot.handler.BaseHandler
addCheckBox, addErrorMessage, addHtmlDataLine, addHtmlHeadLine, addSuccessMessage, addWarningMessage, columns, columnsSize, deleteData, get, getColumn, getColumnsForSql, getColumnsForSql, getCurrentEntityDbId, getCurrentSession, getCustomizedExceptionInformation, getData, getEmptyBean, getEntity, getHandlerClass, getHtmlData, getHtmlHead, getInsertValues, getLayout, getMessageType, getMimeType, getNewScanner, getNewScanner, getPaginator, getSimpleManagementUserRoles, getStatus, getTableExport, getTemplateEngineErrorMessage, getTemplateEngineErrorTitle, getText, getText, getTransientFields, getUpdateSetClause, getUpdateSetClause, hasAccess, hasExternalLinks, hasNoColumnsConfig, initialize, initialValue, initValuesSize, isCurrentUserUpdate, isCustomResponse, isNoContentResponse, isNoContentResponseButRoute, isPrecisionInputType, isRetryCall, loginMarker, parseAssociatedEntities, parseUnassociatedEntities, patchInputValue, readSnippetResource, redirectedMarker, refreshUserRoles, registerDisplayField, registerRoutes, renderAll, saveData, setCurrentEntityDbId, setMessageType, setVar, setVarAll, showLangMenu, showMenu, uniqueFields, uniqueTestMethods inherited from class org.nanohttpd.router.RouterNanoHTTPD.DefaultStreamHandler
delete, other, post, put
-
Constructor Details
-
ExtUsersEditHandler
-
ExtUsersEditHandler
-
-
Method Details
-
updateData
Description copied from class:BaseHandlerUpdate data in DB. Override for edit handlers.- Overrides:
updateDatain classUsersEditHandler- Parameters:
session- HTTP sessionid- db record id- Returns:
- response or null, null means success, response's status must be checked!
- Throws:
Exception- exception
-
extractCustomSingleInputDiv
public String extractCustomSingleInputDiv(BeetRootHTTPSession session, String val, ResultSetMetaData rsmd, String columnName, String guiColName, int idx) throws Exception Description copied from class:DefaultEditHandlerOverwrite this method, if you need to add a custom field (HTML 'div'); e.g. when multiple user roles are used; in this case the 'div' is more likely consisting of 2 role assignment boxes instead of a simple input-'div' or use it for any custom 'div'. The 'div' is guaranteed to be inserted in the column-order as defined in the 'columns.cfg'.
The return value of this method is essential:
- Returns the data (including an empty character string): The HTML data is inserted into the template and further parsing of the columns for the HTML input elements is completed.
- If 'null' is returned, the search for matching input elements for the current columns is continued, even if it is a transient column! Transient columns should be parsed in this method!
- Overrides:
extractCustomSingleInputDivin classDefaultEditHandler- Parameters:
session- HTTP sessionval- repost data (only available in retry case)rsmd- result set meta datacolumnName- column name as configured in 'web/<entity>/columns.cfg'guiColName- GUI column name as configured in 'web/<entity>/columns.cfg'idx- SQL result set column index- Returns:
- html data extract <div>...</div>, empty string or null
- Throws:
Exception- exception
-
render
Description copied from class:BaseHandlerOverwrite to set your template variables. Only use the pure names without bracket-limiters and $-sign; e.g., In template '{$name}' -> 'name' as variable. Example:setVar("name", "Gandalf").- Overrides:
renderin classBaseHandler- Parameters:
session- HTTP session
-
getRedirectHandler
Description copied from class:BaseHandlerOverwrite to get the right re-route/redirect index handler after modifying data. It must be of the same entity as the last executing handler!- Overrides:
getRedirectHandlerin classUsersEditHandler- Returns:
- redirect index handler
-