Class EditDataFormHandler<T extends Data>
- Type Parameters:
T- the type of the value being boxed
- All Implemented Interfaces:
JcmsConstants,JaliosConstants
- Author:
- Nicolas Dos Santos
-
Field Summary
FieldsFields inherited from class com.jalios.jcms.handler.JcmsUploadFormHandler
FAKE_ID_ADDITIONFields inherited from class com.jalios.jcms.handler.JcmsFormHandler
contextMap, csrfValidationEnabled, editFieldSet, noRedirect, noSendRedirect, op, openTabId, popupEdition, redirect, redirectOnClosePopup, workspaceForcedFields 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_MODULE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADERFields 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, workspaceFields 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_YEARFields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, 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, GENERATIONAL_STORE_DIRECTORY, 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, PHOTO_XLARGE, PHOTO_XLARGE_HEIGHT, PHOTO_XLARGE_PROP_PREFIX, PHOTO_XLARGE_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_XML, SUCCESS_MSG, SVG_ICON_PREFIX, SVGINLINE_ICON_PREFIX, SVGSPRITE_ICON_PREFIX, TEMPLATE_TAB, THEME_DIR, 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, TYPES_UNKNOWN_CLASS_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 -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 booleanprotected booleandoPerformCreate(T data, Member member) Creates the specifiedData.protected booleandoPerformDelete(T data, Member member) Deletes the specifiedData.protected booleanMethod used to save or update the Data.protected booleanprotected booleanprotected booleanprotected booleanprotected 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 booleanOverride this method to add custom actions.protected TgetData()protected TgetDataFromRequest(javax.servlet.http.HttpServletRequest request) protected StringReturns the parameter name used to get the Data id from the request.protected StringgetExtraData(String name) Returns the extraData value from the specified name, stored in the temporary extraData map with thesetExtraData(String, String)method.protected StringgetExtraDBData(String name) Returns the extraDBData value from the specified name, stored in the temporary extraDBData map with thesetExtraDBData(String, String)method.protected StringOverride 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.Method used to add hidden fields in the form.intRetrieve the current step of edition when invoking this form handler.intRetrieve the total number of steps used for edition when invoking this form handler.protected StringgetHiddenField(String name, Object value) protected StringgetHiddenFieldML(String name, Map<String, String[]> map) Adds hidden multivalued multilingual field.getMLMapArray(String[] array, boolean trim, boolean escape) Returns the ML map (i.e.protected booleanprotected booleanprotected booleanprotected booleanisOpNext()protected booleanprotected booleanvoidprepare(javax.servlet.http.HttpServletRequest request) Prepare the form handler before callingJcmsFormHandler.validate()method.final booleanMethod to be implemented to check/validate action to be performed and process them.protected StringremoveExtraData(String name) Removes an extraData from the temporary extraData map.protected StringremoveExtraDBData(String name) Removes an extraDBData from the temporary extraDBData map.voidsetData(javax.servlet.http.HttpServletRequest request) Initialize the Data Objectprotected voidsetExtraData(String name, String value) Stores a new extraData in the temporary extraData map.protected voidsetExtraDBData(String name, 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) voidprotected voidsetOpDelete(boolean opDelete) voidprotected voidsetOpFinish(boolean opFinish) voidsetOpFinish(String opFinish) protected voidsetOpNext(boolean opNext) voidprotected voidsetOpPrevious(boolean opPrevious) voidprotected voidsetOpRefresh(boolean opRefresh) voidvoidsetRequest(javax.servlet.http.HttpServletRequest request) Setter for the request.booleanCheck if the "Cancel" button should be displayed in step modal form.booleanCheck if the "Finish" button should be displayed in step modal form.booleanCheck if the "Next" button should be displayed in step modal form.booleanCheck if the "Previous" button should be displayed in step modal form.protected booleansupportsExtraData(String name) Override this method to specify the supported extraData, and remove the others.protected booleansupportsExtraDBData(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 booleanprotected abstract booleanvalidateData(T data) Validates the Data fields.protected booleanprotected booleanprotected booleanOverride 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 booleanprotected booleanprotected booleanMethods 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, validateUploadedFileDocumentMethods 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, getHiddenField, getHiddenFieldML, getMainLangValue, getMainLangValueArray, getMLMap, getModalRedirect, getMonolingualValue, getMonolingualValueArray, getMultilingualMainValue, getMultilingualMainValueArray, getMultilingualMLMap, getMultilingualMLMapArray, getOpenTabId, getRedirect, getRedirectOnClosePopup, getWorkspace, init, isFieldEdition, isFieldMissing, isFormStepClickable, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, mapStringArrayToMapStringList, mapStringListToMapStringArray, mustSendForbiddenOnCSRF, performFinish, performNext, performPrevious, processStatus, sanitize, sanitize, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setOpenTabId, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, startProcess, updateUploadedFields, validate, validateCSRFMethods inherited from class com.jalios.jcms.context.JcmsJspContext
addAvoidanceLink, addBodyAttributes, addCSSHeader, addCSSHeader, addCSSHeader, addCSSHeader, addCustomHeader, addHandlebarTemplate, addHttpEquivHeader, addHttpNameHeader, addJavaScript, addJavaScript, addJavaScript, addJavaScriptCode, addJavaScriptModule, addPrefetchHeader, addStyleHeader, addStyleHeader, addSvgSpriteIcon, addWebAssets, canAccessAdminArea, checkAccess, checkAccess, checkCSRF, debugDisplayContext, disablePacker, forceEditIcon, forceUpdate, getAjaxRequestAttribute, getAjaxRequestId, getAllHeadersDiffMap, getAllHeadersMap, getAvoidanceLinks, getBackOfficeCSSHeader, getBackOfficeJavaScriptSet, getBodyAttributes, getContentForm, getCSSHeaders, getCtxCategories, getCurrentCategory, getCustomHeaders, getDocType, getFinalCSSFooterMap, getFinalCSSMap, getFinalJavaScriptModuleSet, getFinalJavaScriptSet, getFrontOfficeCSSHeader, getFrontOfficeJavaScriptSet, getHandlebarTemplates, getHttpEquivHeaders, getHttpNameHeaders, getJavaScriptCodeSet, getJavaScriptModuleSet, getJavaScriptSet, getPageContext, getPageTitle, getPageZone, getPortal, getPortalCategory, getPortlet, getPublication, getStyleHeaders, getSvgSprites, getSvgSpritesHtml, getTemplateUsage, internalSetupEmptyHeader, isEditIcon, isEditIcon, isEditIconForPublish, isEditIconForPublish, isPrintView, registerDisplayContext, removeAjaxRequestAttribute, setAjaxRequestAttribute, setAjaxRequestId, setAllHeadersDiffMap, setDocType, setEditIcon, setPageContext, setPageTitle, setPageZone, setShowEditIcon, setTemplateUsage, showEditIcon, showEditIcon, showEditIconMethods inherited from class com.jalios.jcms.context.JcmsContext
addMsg, addMsg, addMsgSession, addMsgSession, addToastr, addToastr, addToastrSession, addToastrSession, applySelector, canAccessAdminArea, 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, getUploadedFiles, getUploadedFiles, getUrlWithCommonUpdatedParams, getUserCountry, getUserLang, getUserLocale, getUserZoneId, getWarningMsg, getWarningMsgList, getWarningMsgSession, getWarningMsgSessionList, glp, isAdmin, isAdminZone, isAjaxRequest, isDBMember, isDebug, isDebugTemplate, isInFrontOffice, isLogged, isWorkZone, removeMessage, removeMessage, removeMsg, 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 Details
-
FORM_HANDLER_ATTR
- See Also:
-
-
Constructor Details
-
EditDataFormHandler
public EditDataFormHandler() -
EditDataFormHandler
-
-
Method Details
-
getDataClass
-
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
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
-
doCreateData
Create a new Data object. This method is called in $setData(HttpServletRequest)when the Data is initialized.- Parameters:
request-HttpServletRequest- Returns:
Data
-
doInitData
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
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
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
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
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
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
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
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
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
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
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
Description 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:
IOException- IO Exception
-
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
- 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
- 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
-
validateCancel
protected boolean validateCancel() -
doPerformCancel
protected boolean doPerformCancel() -
isOpFinish
protected boolean isOpFinish() -
setOpFinish
protected void setOpFinish(boolean opFinish) -
setOpFinish
- 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
Creates the specifiedData. -
doPerformUpdate
Updates the specifiedData. -
isOpDelete
protected boolean isOpDelete() -
setOpDelete
protected void setOpDelete(boolean opDelete) -
setOpDelete
-
validateDelete
protected boolean validateDelete() -
doPerformDelete
Deletes the specifiedData. -
isOpRefresh
protected boolean isOpRefresh() -
setOpRefresh
protected void setOpRefresh(boolean opRefresh) -
setOpRefresh
-
validateRefresh
protected boolean validateRefresh() -
doPerformRefresh
- Throws:
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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
Method used to add hidden fields in the form.- Overrides:
getFormHiddenFieldsin classJcmsUploadFormHandler- Returns:
- String representing the input[hidden] to add in the form
-
getMLMapArray
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
Adds hidden multivalued multilingual field.- Parameters:
name- field namemap- map of values- Returns:
- String representing the hidden field
-
getHiddenField
-
validateData
Validates the Data fields.- Parameters:
data-Data- Returns:
trueif the given data has been validated,falseinstead
-