Class TemplatesBean

    • Constructor Detail

      • TemplatesBean

        public TemplatesBean()
    • Method Detail

      • hasAvailableExportFunctionality

        public boolean hasAvailableExportFunctionality()
      • onBulkDeleteRequested

        public void onBulkDeleteRequested()
        When the button to delete or reset all selected templates was clicked. Checks which templates must be deleted and which must be reset, and opens the confirmation dialog.

        System templates must be reset, all other templates created by the user must be deleted.

      • onBulkDeleteConfirmed

        public void onBulkDeleteConfirmed()
        When the confirmation button to delete or reset all selected templates was clicked, see also onBulkDeleteRequested(). Resets all selected system templates, and deletes all selected user templates.
      • uploadAndPersist

        public void uploadAndPersist​(org.primefaces.event.FileUploadEvent event)
        Uploads a template export and imports it as a new template if possible. If the export has the same UUID as an existing template, the upload is remembered as a conflict that the user resolves once all uploads have completed, see IAssetImportConflictHandler.showAssetImportConflicts().
        Parameters:
        event - FileUploadEvent containing the new template
      • getTextRteContentsCss

        public String getTextRteContentsCss()
        Creates the CSS URLs for CKEditor's contentsCss option, i.e. the CSS stylesheets that should be included inside the editor's editing area (which is an encapsulated iframe).
        Returns:
        The CSS URLs for CKEditor's contentsCss option.
      • getTemplateBodyStyleClass

        public String getTemplateBodyStyleClass()
      • updateModel

        public void updateModel()
      • reset

        public void reset()
        Resets the currently selected template to its default value. This is only possible for system templates. For non-system templates, this method should never be called, but if it is: does nothing. The default value is the value provided by the formcycle app.
      • resetSingle

        public void resetSingle()
        (I18N variables only) Resets the selected grid cells to their default value. The default value is the value provided by the formcycle app.
      • getLocaleBean

        public LocaleBean getLocaleBean()
      • getPreviewFormTheme

        public FormThemeReference getPreviewFormTheme()
        Only for HTML text templates: sets the form theme to use for previewing the selected text template.
      • getPreviewFormThemeOptions

        public List<javax.faces.model.SelectItem> getPreviewFormThemeOptions()
        Only for HTML text templates: gets the options that can be selected in the form theme dropdown for previewing the selected text template, see
      • getBulkDeleteModel

        public TemplatesBean.TemplateBulkDeleteModel getBulkDeleteModel()
        Gets the model for the bulk delete confirmation dialog, when the user selects multiple templates and wants to delete or reset them.
      • setLocaleBean

        public void setLocaleBean​(LocaleBean localeBean)
      • setAssetManagementService

        public void setAssetManagementService​(IAssetManagementService assetManagementService)
      • setPreviewFormTheme

        public void setPreviewFormTheme​(FormThemeReference previewFormTheme)
        Only for HTML text templates: sets the form theme to use for previewing the selected text template.
      • setPreviewFormThemeOptions

        public void setPreviewFormThemeOptions​(List<javax.faces.model.SelectItem> previewFormThemeOptions)
        Only for HTML text templates: gets the options that can be selected in the form theme dropdown for previewing the selected text template, see
      • setViewContext

        public void setViewContext​(ViewContextBean viewContext)
      • setTemplatesSheetBean

        public void setTemplatesSheetBean​(TemplatesSheetBean templatesSheetBean)
      • setTemplateKeywordsBean

        public void setTemplateKeywordsBean​(TemplateKeywordsBean templateKeywordsBean)
      • setViewEventBusBean

        public void setViewEventBusBean​(ViewEventBusBean viewEventBusBean)
      • setBulkDeleteModel

        public void setBulkDeleteModel​(TemplatesBean.TemplateBulkDeleteModel bulkDeleteModel)
        Gets the model for the bulk delete confirmation dialog, when the user selects multiple templates and wants to delete or reset them.