Class EditDataFormHandler<T extends Data>
- java.lang.Object
-
- com.jalios.jcms.context.JcmsContext
-
- com.jalios.jcms.context.JcmsJspContext
-
- com.jalios.jcms.handler.JcmsFormHandler
-
- com.jalios.jcms.handler.JcmsUploadFormHandler
-
- com.jalios.jcms.handler.EditDataFormHandler<T>
-
- Type Parameters:
T- the type of the value being boxed
- All Implemented Interfaces:
JcmsConstants,JaliosConstants
public abstract class EditDataFormHandler<T extends Data> extends JcmsUploadFormHandler
This class is the super class of all FormHandlers which manage stored data.- Author:
- Nicolas Dos Santos
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFORM_HANDLER_ATTR-
Fields inherited from class com.jalios.jcms.handler.JcmsUploadFormHandler
FAKE_ID_ADDITION
-
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler
contextMap, csrfValidationEnabled, editFieldSet, noRedirect, noSendRedirect, op, popupEdition, redirect, redirectOnClosePopup, workspaceForced
-
Fields inherited from class com.jalios.jcms.context.JcmsJspContext
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_FOOTER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER
-
Fields inherited from class com.jalios.jcms.context.JcmsContext
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDBMember, isDebug, isDebugTemplatePath, isLogged, loggedMember, request, response, userCountry, userLang, userLocale, userZoneId, workspace
-
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
-
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, AJAX_MODE_ATTR, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, CLASS_PROPERTY, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, COUNTRY_SPRITE, CS_TYPOLOGY_ROOT_CAT_VID, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DATA_DIRECTORY, DEFAULT_PHOTO_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, GLYPH_ICON_PREFIX, ICON_ARCHIVE, ICON_ICON_PREFIX, ICON_LOCK, ICON_LOCK_STRONG, ICON_PREFIX_PROP, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, IS_IN_FRONT_OFFICE, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JCMS_TOASTR_COLLECTION, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LANG_SPRITE, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_CREATE_STR, OP_DEEP_COPY, OP_DEEP_COPY_STR, OP_DEEP_DELETE, OP_DEEP_DELETE_STR, OP_DELETE, OP_DELETE_STR, OP_MERGE, OP_MERGE_STR, OP_UPDATE, OP_UPDATE_STR, ORGANIZATION_ROOT_GROUP_PROP, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_PROP_PREFIX, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_PROP_PREFIX, PHOTO_LARGE_WIDTH, PHOTO_MINI, PHOTO_MINI_HEIGHT, PHOTO_MINI_PROP_PREFIX, PHOTO_MINI_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_PROP_PREFIX, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_PROP_PREFIX, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_PROP_PREFIX, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, RAW_CONTENT_ICON_PREFIX, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SECURITY_LOG_FILE, SESSION_AUTHORIZED_FILENAMES_SET, SPRITE_ICON_PREFIX, STATS_REPORT_DIR, STATUS_PROP, STORE_DIR, STORE_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, TTCARD_MEDIA_HEIGHT, TTCARD_MEDIA_WIDTH, TYPES_ICON_ALT_PROP, TYPES_ICON_SUFFIX_PROP, TYPES_ICON_TITLE_PROP, TYPES_PREFIX_PROP, TYPES_THUMB_SUFFIX_PROP, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, UPLOAD_PERMISSION_COUNT_PROP_PREFIX, UPLOAD_PERMISSION_SIZE_PROP_PREFIX, URL_REGEXP, VID_LOGGED_MEMBER, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
-
-
Constructor Summary
Constructors Constructor Description EditDataFormHandler()EditDataFormHandler(java.lang.Class<T> dataClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TdoCreateData(javax.servlet.http.HttpServletRequest request)Create a new Data object.protected voiddoInitData(T data, javax.servlet.http.HttpServletRequest request)Prepare the temporary extra(DB)Data maps, it's possible to initialize the given data before calling the setters of the request parameters.protected booleandoPerformCancel()protected booleandoPerformCreate(T data, Member member)Creates the specifiedData.protected booleandoPerformDelete(T data, Member member)Deletes the specifiedData.protected booleandoPerformFinish()Method used to save or update the Data.protected booleandoPerformMandatoryRequirements()protected booleandoPerformNext()protected booleandoPerformPrevious()protected booleandoPerformRefresh()protected booleandoPerformUpdate(T data, Member member)Updates the specifiedData.protected TdoPrepareData(T data, javax.servlet.http.HttpServletRequest request)Initialize data after calling the setters of the request parameters.
This method is called inprepare(HttpServletRequest)method.protected booleandoProcessAction()Override this method to add custom actions.java.lang.StringgetAvailableMainLanguage()protected TgetData()protected java.lang.Class<T>getDataClass()protected TgetDataFromRequest(javax.servlet.http.HttpServletRequest request)protected java.lang.StringgetDataParamId()Returns the parameter name used to get the Data id from the request.protected java.lang.StringgetExtraData(java.lang.String name)Returns the extraData value from the specified name, stored in the temporary extraData map with thesetExtraData(String, String)method.protected java.lang.StringgetExtraDBData(java.lang.String name)Returns the extraDBData value from the specified name, stored in the temporary extraDBData map with thesetExtraDBData(String, String)method.protected java.lang.StringgetFormHandlerRequestAttributeKey()Override this method to set another request attribute key for the FormHandler than the default.
If it returnsnull, the form handler will not be stored in request attribute.java.lang.StringgetFormHiddenFields()Method used to add hidden fields in the form.intgetFormStep()Retrieve the current step of edition when invoking this form handler.intgetFormStepCount()Retrieve the total number of steps used for edition when invoking this form handler.protected java.lang.StringgetHiddenField(java.lang.String name, java.lang.Object value)protected java.lang.StringgetHiddenFieldML(java.lang.String name, java.util.Map<java.lang.String,java.lang.String[]> map)Adds hidden multivalued multilingual field.protected java.util.HashMap<java.lang.String,java.lang.String[]>getMLMapArray(java.lang.String[] array, boolean trim, boolean escape)Returns the ML map (i.e.protected booleanisOpCancel()protected booleanisOpDelete()protected booleanisOpFinish()protected booleanisOpNext()protected booleanisOpPrevious()protected booleanisOpRefresh()voidprepare(javax.servlet.http.HttpServletRequest request)Prepare the form handler before callingJcmsFormHandler.validate()method.booleanprocessAction()Method to be implemented to check/validate action to be performed and process them.protected java.lang.StringremoveExtraData(java.lang.String name)Removes an extraData from the temporary extraData map.protected java.lang.StringremoveExtraDBData(java.lang.String name)Removes an extraDBData from the temporary extraDBData map.voidsetData(javax.servlet.http.HttpServletRequest request)Initialize the Data Objectprotected voidsetExtraData(java.lang.String name, java.lang.String value)Stores a new extraData in the temporary extraData map.protected voidsetExtraDBData(java.lang.String name, java.lang.String value)Stores a new extraData in the temporary extraDBData map.voidsetFormStep(int step)Set the current step of edition when invoking this form handler.voidsetFormStepCount(int formStepCount)Set the total number of steps used for edition when invoking this form handler.protected voidsetOpCancel(boolean opCancel)voidsetOpCancel(java.lang.String v)protected voidsetOpDelete(boolean opDelete)voidsetOpDelete(java.lang.String v)protected voidsetOpFinish(boolean opFinish)voidsetOpFinish(java.lang.String opFinish)protected voidsetOpNext(boolean opNext)voidsetOpNext(java.lang.String v)protected voidsetOpPrevious(boolean opPrevious)voidsetOpPrevious(java.lang.String v)protected voidsetOpRefresh(boolean opRefresh)voidsetOpRefresh(java.lang.String v)voidsetRequest(javax.servlet.http.HttpServletRequest request)Setter for the request.booleanshowCancelButton()Check if the "Cancel" button should be displayed in step modal form.booleanshowFinishButton()Check if the "Finish" button should be displayed in step modal form.booleanshowNextButton()Check if the "Next" button should be displayed in step modal form.booleanshowPreviousButton()Check if the "Previous" button should be displayed in step modal form.protected booleansupportsExtraData(java.lang.String name)Override this method to specify the supported extraData, and remove the others.protected booleansupportsExtraDBData(java.lang.String name)Override this method to specify the supported extraDBData, and remove the others.
By default, this method has the same behavior assupportsExtraData(String).protected booleanvalidateCancel()protected abstract booleanvalidateData(T data)Validates the Data fields.protected booleanvalidateDelete()protected booleanvalidateFinish()protected booleanvalidateMandatoryRequirements()Override this method whether any mandatory requirements must be defined and checked before any actions.
If the this method returnfalse, doPerformMandatoryRequirements() is called, and the processing stops at the end of the call to this latter.protected booleanvalidateNext()protected booleanvalidatePrevious()protected booleanvalidateRefresh()-
Methods inherited from class com.jalios.jcms.handler.JcmsUploadFormHandler
createUploadedFileDocument, createUploadedFileDocument, createUploadedFileDocument, createUploadedFileDocument, doPrepareFileDocuments, getFakeUniqueId, getFileDocument, getFileDocumentClass, getFileDocumentClass, getFileDocuments, getFileDocuments, getFileDocumentsML, getFormStepHiddenFields, getFormUniqueId, getTemporaryDir, isFakeUniqueId, removeFileDocuments, setFileDocuments, setFileDocuments, setFileDocuments, setFileDocuments, setFileDocuments, setFileDocuments, setFileDocumentsML, setFileDocumentsML, setFileDocumentsML, setFormUniqueId, validateUploadedFileDocument, validateUploadedFileDocument
-
Methods inherited from class com.jalios.jcms.handler.JcmsFormHandler
afterValidation, canStartProcess, checkMissingField, getBackgroundProcess, getClosePopupUrl, getControllerContext, getEditFieldSet, getFormStepFinishLabel, getFormStepLabels, getFormStepPrefixProp, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenField, getHiddenFieldML, getMainLangValue, getMainLangValueArray, getMLMap, getModalRedirect, getMonolingualValue, getMonolingualValueArray, getMultilingualMainValue, getMultilingualMainValueArray, getMultilingualMLMap, getMultilingualMLMapArray, getRedirect, getRedirectOnClosePopup, getWorkspace, init, isFieldEdition, isFieldMissing, isFormStepClickable, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, mapStringArrayToMapStringList, mapStringListToMapStringArray, mustSendForbiddenOnCSRF, performFinish, performNext, performPrevious, processStatus, sanitize, sanitize, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, startProcess, updateUploadedField, updateUploadedFields, updateUploadedFields, validate, validateCSRF
-
Methods inherited from class com.jalios.jcms.context.JcmsJspContext
addAvoidanceLink, addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHandlebarTemplate, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addPrefetchHeader, addStyleHeader, addStyleHeader, addWebAssets, checkAccess, checkAccess, checkCSRF, debugDisplayContext, disablePacker, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getAvoidanceLinks, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSFooterMap, getFinalCSSMap, getFinalJavaScriptSet, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getHandlebarTemplates, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptSet, getJSONBridge, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isEditIcon, isEditIconForPublish, isEditIconForPublish, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, showEditIcon, showEditIcon, workaroundBrowserBaseHrefBug
-
Methods inherited from class com.jalios.jcms.context.JcmsContext
addCookie, addMsg, addMsg, addMsgSession, addMsgSession, addToastr, addToastr, addToastrSession, addToastrSession, applySelector, copyMsgListToMsgSessionList, forceWorkspaceUpdate, getBaseUrl, getBrowser, getCaddy, getContextPath, getErrorMsg, getErrorMsgList, getErrorMsgSession, getErrorMsgSessionList, getInfoMsg, getInfoMsgList, getInfoMsgSession, getInfoMsgSessionList, getLoggedMember, getMsgList, getMsgSessionList, getRequest, getResponse, getSession, getSuccessMsg, getSuccessMsgList, getSuccessMsgSession, getSuccessMsgSessionList, getToastrCollection, getToastrSessionCollection, getUploadedFile, getUploadedFileList, getUploadedFiles, getUploadedFiles, getUrlWithCommonUpdatedParams, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAdminZone, isAjaxRequest, isDBMember, isDebug, isDebugTemplate, isInFrontOffice, isLogged, isWebdavAccess, isWorkZone, removeMessage, removeMessage, removeMsg, retrieveUploadedFile, select, sendError, sendError, sendForbidden, sendForbidden, sendRedirect, sendRedirect, sendRedirect, setErrorMsg, setErrorMsg, setErrorMsgSession, setErrorMsgSession, setInfoMsg, setInfoMsg, setInfoMsgSession, setInfoMsgSession, setLoggedMember, setResponse, setSuccessMsg, setSuccessMsg, setSuccessMsgSession, setSuccessMsgSession, setWarningMsg, setWarningMsg, setWarningMsgSession, setWarningMsgSession, updateWorkspace, validateRegexp, validateSchedule
-
-
-
-
Field Detail
-
FORM_HANDLER_ATTR
public static final java.lang.String FORM_HANDLER_ATTR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EditDataFormHandler
public EditDataFormHandler()
-
EditDataFormHandler
public EditDataFormHandler(java.lang.Class<T> dataClass)
-
-
Method Detail
-
getDataClass
protected java.lang.Class<T> getDataClass()
-
getData
protected T getData()
-
setRequest
public void setRequest(javax.servlet.http.HttpServletRequest request)
Setter for the request. Will initialize all the variable of the JcmsContext if available in the request. (Therefore, it must be called after all the treatements done in doInitPage)
Overridden to set form handler in the Request Attribute 'formHandler'.
- Overrides:
setRequestin classJcmsContext- Parameters:
request- the HttpServletRequest from twhich to retrieve all jcms context information.
-
getFormHandlerRequestAttributeKey
protected java.lang.String getFormHandlerRequestAttributeKey()
Override this method to set another request attribute key for the FormHandler than the default.
If it returnsnull, the form handler will not be stored in request attribute.- Returns:
- request attribute key
-
setData
public void setData(javax.servlet.http.HttpServletRequest request)
Initialize the Data Object- Parameters:
request-HttpServletRequest
-
getDataFromRequest
protected T getDataFromRequest(javax.servlet.http.HttpServletRequest request)
-
doCreateData
protected abstract T doCreateData(javax.servlet.http.HttpServletRequest request)
Create a new Data object. This method is called in $setData(HttpServletRequest)when the Data is initialized.- Parameters:
request-HttpServletRequest- Returns:
Data
-
doInitData
protected void doInitData(T data, javax.servlet.http.HttpServletRequest request)
Prepare the temporary extra(DB)Data maps, it's possible to initialize the given data before calling the setters of the request parameters.- Parameters:
data-Datarequest-HttpServletRequest
-
getExtraData
protected java.lang.String getExtraData(java.lang.String name)
Returns the extraData value from the specified name, stored in the temporary extraData map with thesetExtraData(String, String)method.- Parameters:
name- extraData name- Returns:
- extraData value
-
setExtraData
protected void setExtraData(java.lang.String name, java.lang.String value)Stores a new extraData in the temporary extraData map. If the map previously contained a mapping for the name, the old value is replaced by the specified value.- Parameters:
name- extraData namevalue- extraData value
-
removeExtraData
protected java.lang.String removeExtraData(java.lang.String name)
Removes an extraData from the temporary extraData map.- Parameters:
name- extraData name- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated
-
supportsExtraData
protected boolean supportsExtraData(java.lang.String name)
Override this method to specify the supported extraData, and remove the others.- Parameters:
name- extraData name- Returns:
trueif the given extraData name is supported,falseinstead
-
getExtraDBData
protected java.lang.String getExtraDBData(java.lang.String name)
Returns the extraDBData value from the specified name, stored in the temporary extraDBData map with thesetExtraDBData(String, String)method.- Parameters:
name- extraDBData name- Returns:
- extraDBData value
-
setExtraDBData
protected void setExtraDBData(java.lang.String name, java.lang.String value)Stores a new extraData in the temporary extraDBData map. If the map previously contained a mapping for the name, the old value is replaced by the specified value.- Parameters:
name- extraDBData name
-
removeExtraDBData
protected java.lang.String removeExtraDBData(java.lang.String name)
Removes an extraDBData from the temporary extraDBData map.- Parameters:
name- extraData name- Returns:
- previous value associated with specified name, or
nullif there was no mapping for name. Anullreturn can also indicate thatnullwas associated
-
supportsExtraDBData
protected boolean supportsExtraDBData(java.lang.String name)
Override this method to specify the supported extraDBData, and remove the others.
By default, this method has the same behavior assupportsExtraData(String).- Parameters:
name- extraDBData name- Returns:
trueif the given extraDBData name is supported,falseinstead
-
getDataParamId
protected java.lang.String getDataParamId()
Returns the parameter name used to get the Data id from the request. This method is called in $setData(HttpServletRequest)when we get the Data from its id found in the request.- Returns:
- parameter name of the data id
-
prepare
public void prepare(javax.servlet.http.HttpServletRequest request)
Prepare the form handler before callingJcmsFormHandler.validate()method. Call this method in the JSP before calling theJcmsFormHandler.validate()method.- Parameters:
request-HttpServletRequest
-
doPrepareData
protected T doPrepareData(T data, javax.servlet.http.HttpServletRequest request)
Initialize data after calling the setters of the request parameters.
This method is called inprepare(HttpServletRequest)method.- Parameters:
data- data to updaterequest-HttpServletRequest- Returns:
- updated data
-
processAction
public final boolean processAction() throws java.io.IOExceptionDescription copied from class:JcmsFormHandlerMethod to be implemented to check/validate action to be performed and process them.Default implementation is to return false. No need to call super method.
This method may NOT be invoked at all if security validation are not met.
You must ensure your handler and JSP can work properly without any code invoked in this method.
- Overrides:
processActionin classJcmsFormHandler- Returns:
- false if no redirection is needed, true otherwise
- Throws:
java.io.IOException- IO Exception
-
getAvailableMainLanguage
public java.lang.String getAvailableMainLanguage()
- Overrides:
getAvailableMainLanguagein classJcmsFormHandler- Returns:
- the main language of the publication.
-
validateMandatoryRequirements
protected boolean validateMandatoryRequirements()
Override this method whether any mandatory requirements must be defined and checked before any actions.
If the this method returnfalse, doPerformMandatoryRequirements() is called, and the processing stops at the end of the call to this latter.- Returns:
truemandatory requirements are all valids,false. Default method returnstrue
-
doPerformMandatoryRequirements
protected boolean doPerformMandatoryRequirements()
-
isOpPrevious
protected boolean isOpPrevious()
-
setOpPrevious
protected void setOpPrevious(boolean opPrevious)
-
setOpPrevious
public void setOpPrevious(java.lang.String v)
- Overrides:
setOpPreviousin classJcmsFormHandler
-
validatePrevious
protected boolean validatePrevious()
- Overrides:
validatePreviousin classJcmsFormHandler
-
doPerformPrevious
protected boolean doPerformPrevious()
-
isOpNext
protected boolean isOpNext()
-
setOpNext
protected void setOpNext(boolean opNext)
-
setOpNext
public void setOpNext(java.lang.String v)
- Overrides:
setOpNextin classJcmsFormHandler
-
validateNext
protected boolean validateNext()
- Overrides:
validateNextin classJcmsFormHandler
-
doPerformNext
protected boolean doPerformNext()
-
isOpCancel
protected boolean isOpCancel()
-
setOpCancel
protected void setOpCancel(boolean opCancel)
-
setOpCancel
public void setOpCancel(java.lang.String v)
-
validateCancel
protected boolean validateCancel()
-
doPerformCancel
protected boolean doPerformCancel()
-
isOpFinish
protected boolean isOpFinish()
-
setOpFinish
protected void setOpFinish(boolean opFinish)
-
setOpFinish
public void setOpFinish(java.lang.String opFinish)
- Overrides:
setOpFinishin classJcmsFormHandler
-
validateFinish
protected boolean validateFinish()
- Overrides:
validateFinishin classJcmsFormHandler
-
doPerformFinish
protected boolean doPerformFinish()
Method used to save or update the Data. This method callsdoPerformCreate(Data, Member)to save anddoPerformUpdate(Data, Member)to update.- Returns:
trueif the save/update action was performed successfully
-
doPerformCreate
protected boolean doPerformCreate(T data, Member member)
Creates the specifiedData.
-
doPerformUpdate
protected boolean doPerformUpdate(T data, Member member)
Updates the specifiedData.
-
isOpDelete
protected boolean isOpDelete()
-
setOpDelete
protected void setOpDelete(boolean opDelete)
-
setOpDelete
public void setOpDelete(java.lang.String v)
-
validateDelete
protected boolean validateDelete()
-
doPerformDelete
protected boolean doPerformDelete(T data, Member member)
Deletes the specifiedData.
-
isOpRefresh
protected boolean isOpRefresh()
-
setOpRefresh
protected void setOpRefresh(boolean opRefresh)
-
setOpRefresh
public void setOpRefresh(java.lang.String v)
-
validateRefresh
protected boolean validateRefresh()
-
doPerformRefresh
protected boolean doPerformRefresh() throws java.io.IOException- Throws:
java.io.IOException
-
doProcessAction
protected boolean doProcessAction()
Override this method to add custom actions.- Returns:
trueif the action was performed successfully,falseinstead
-
showCancelButton
public boolean showCancelButton()
Check if the "Cancel" button should be displayed in step modal form.
The default implementation of this method is to always return true.
- Overrides:
showCancelButtonin classJcmsFormHandler- Returns:
- true to display the "Cancel" button, false to hide it
- See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
showNextButton
public boolean showNextButton()
Check if the "Next" button should be displayed in step modal form.
- Overrides:
showNextButtonin classJcmsFormHandler- Returns:
- true to display the "Next" button, false to hide it
- See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
showPreviousButton
public boolean showPreviousButton()
Check if the "Previous" button should be displayed in step modal form.
The default implementation of this method is to return true if the current step (as returned by
getFormStep()is higher than 0.- Overrides:
showPreviousButtonin classJcmsFormHandler- Returns:
- true to display the "Previous" button, false to hide it
- See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
showFinishButton
public boolean showFinishButton()
Check if the "Finish" button should be displayed in step modal form.
The default implementation of this method is to return true if the current step (as returned by
getFormStep()is the last one (as compared withgetFormStepCount().- Overrides:
showFinishButtonin classJcmsFormHandler- Returns:
- true to display the "Finish" button, false to hide it
- See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
getFormStepCount
public int getFormStepCount()
Retrieve the total number of steps used for edition when invoking this form handler.
The default implementation of this method is to return 1, corresponding to one step (which means only 1 screen being displayed).
- Overrides:
getFormStepCountin classJcmsFormHandler- Returns:
- the total number of steps in this form handler
- See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
setFormStepCount
public void setFormStepCount(int formStepCount)
Set the total number of steps used for edition when invoking this form handler.
- Parameters:
formStepCount- the total number of steps in this form handler
-
getFormStep
public int getFormStep()
Retrieve the current step of edition when invoking this form handler.- Overrides:
getFormStepin classJcmsFormHandler- Returns:
- the current steps in this form handler (starting at 0 and ending at
)getFormStepCount()- 1 - See Also:
- "jcore/doStepButtons.jspf for use of this method."
-
setFormStep
public void setFormStep(int step)
Set the current step of edition when invoking this form handler.- Overrides:
setFormStepin classJcmsFormHandler- Parameters:
step- the current step (0 being the first one andbeing the last one)getFormStepCount()- 1
-
getFormHiddenFields
public java.lang.String getFormHiddenFields()
Method used to add hidden fields in the form.- Overrides:
getFormHiddenFieldsin classJcmsUploadFormHandler- Returns:
- String representing the input[hidden] to add in the form
-
getMLMapArray
protected java.util.HashMap<java.lang.String,java.lang.String[]> getMLMapArray(java.lang.String[] array, boolean trim, boolean escape)Description copied from class:JcmsFormHandlerReturns the ML map (i.e. the additionnal languages) filled with the values contained in the given array (multivalued ML fields).- Overrides:
getMLMapArrayin classJcmsFormHandler- Parameters:
array- the arraytrim- if true trim the valuesescape- if true escape the values- Returns:
- the ML map filled with the values contained in the given array.
-
getHiddenFieldML
protected java.lang.String getHiddenFieldML(java.lang.String name, java.util.Map<java.lang.String,java.lang.String[]> map)Adds hidden multivalued multilingual field.- Parameters:
name- field namemap- map of values- Returns:
- String representing the hidden field
-
getHiddenField
protected java.lang.String getHiddenField(java.lang.String name, java.lang.Object value)
-
-