Class FormThemeBean
java.lang.Object
de.xima.fc.gui.bean.form_theme.FormThemeBean
- All Implemented Interfaces:
Serializable
Bean for the backend, when editing
client form theme entities.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the UI mode for editing client form themes.Gets the view model foradvancededit mode.Get the view model forsimpleedit mode.Gets the URL to the elFinder connector, i.e. the URL to the file manager can call to communicate with the backend.Gets a list of file extensions that are allowed for files in the elFinder file explorer.Returns additional localized messages for the elFinder file explorer.booleanbooleanbooleanGets whether the user already has a stored preference for the edit mode.voidWhen there are unsaved changes and the user wishes to change to advanced edit mode, they are asked to confirm whether they want to discard their changes.voidCommand button callback that is invoked when the user wishes to create a new theme, either whenvoidvoidWhen the user clicks on the button to toggle the edit mode, either from simple to advanced or vice versa.voidRemote command invoked when the edit mode is advanced and the user change a detail of a client form theme via the file explorer.
-
Constructor Details
-
FormThemeBean
public FormThemeBean()
-
-
Method Details
-
getEditMode
Gets the UI mode for editing client form themes. This is used to determine which parts of the UI are shown to the user. Simple mode only shows two simple CSS editors for the form and HTML template CSS, advanced mode shows a full-fledged file explorer.- Returns:
- The UI mode for editing client form themes.
-
getEditModeAdvancedModel
- Returns:
- Additional data for the currently selected client form theme, null if no theme is selected.
-
getEditModeSimpleModel
- Returns:
- The list model.
-
getElFinderExtensions
Gets a list of file extensions that are allowed for files in the elFinder file explorer. This is a comma separated list of file extensions, each file extensions without the leading dot. E.g. "jpg,png,gif".- Returns:
- The allowed file extensions.
-
getElFinderMessages
Returns additional localized messages for the elFinder file explorer. This is a stringified JSON object with string keys and values. The keys are the messages keys, the values the localized messages.- Returns:
- The additional messages.
-
getElfinderConnectorUrl
Gets the URL to the elFinder connector, i.e. the URL to the file manager can call to communicate with the backend.- Returns:
- The URL to the elFinder connector.
-
isEditModeAdvanced
-
isEditModeSimple
-
isWasEditModeSet
public boolean isWasEditModeSet()Gets whether the user already has a stored preference for the edit mode. When false, the user gets shown a help dialog the first time they switch to advanced edit mode.- Returns:
- True if the user already set the edit mode, false otherwise.
-
onConfirmChangeToAdvancedEditMode
public void onConfirmChangeToAdvancedEditMode()When there are unsaved changes and the user wishes to change to advanced edit mode, they are asked to confirm whether they want to discard their changes. This method is called when the user confirms that they want to discard their changes. -
onCreateNewTheme
public void onCreateNewTheme() -
onGetThemeDetails
public void onGetThemeDetails()Remote command invoked when theedit modeis set toADVANCEDand the user clicks on the edit icon of a client form theme in the file explorer. Loads the additional details to show to the user, i.e. the name, description and parent theme of the selected client form theme; as well as the list of available options for the parent theme dropdown. -
onToggleEditMode
public void onToggleEditMode()When the user clicks on the button to toggle the edit mode, either from simple to advanced or vice versa. Checks whether there are unsaved changes and shows a confirmation dialog if necessary. Otherwise, switches directly to the requested mode. -
onUpdateThemeDetail
public void onUpdateThemeDetail()Remote command invoked when the edit mode is advanced and the user change a detail of a client form theme via the file explorer. Updates the client form theme with the provided data.
-