Package lumis.doui.control.htmleditor
Class HtmlEditorControl
- java.lang.Object
-
- lumis.doui.control.Control
-
- lumis.doui.control.DataControl
-
- lumis.doui.control.DataBoundControl<Source<?>>
-
- lumis.doui.control.htmleditor.HtmlEditorControl
-
- All Implemented Interfaces:
Observer
,VariableResolver
,IControl
,IDataBoundControl
,IDataControl
,IRenderer
public class HtmlEditorControl extends DataBoundControl<Source<?>>
Control for editing html content.- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
-
Fields inherited from class lumis.doui.control.DataControl
FORCE_CASE_LOWER, FORCE_CASE_NONE, FORCE_CASE_UPPER, forceCase, requestParameterName, UNKNOWN_DATA_TYPE, value, valuePreviouslySet
-
Fields inherited from class lumis.doui.control.Control
childControls, controlContainer, controlDefinitionNode, controlResource, douiContext, hasValidatorSubControls, isValid, locale, ON_EVENT_CLOSE_WINDOW, ON_EVENT_LINK, ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE, ON_EVENT_POPUP_RUNTIME_INTERFACE, ON_EVENT_PROCESS_ACTION, ON_EVENT_RENDER_ACTION, ON_EVENT_REPLACE_INTERFACE, ON_EVENT_SCRIPT, ON_EVENT_VALIDATE, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
-
-
Constructor Summary
Constructors Constructor Description HtmlEditorControl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buildSubControls()
static String
decodeEditorFormatToHtml(String html)
static String
encodeHtmlForEditor(String html, IWebsite currentWebsite, boolean baseSecure)
protected boolean
fixedIdentifierRequired()
IResource
getControlResource()
String
getPrepareForReadScript()
static List<String>
getPreviewCsss(ServiceInstanceConfig siConfig)
Returns the CSS to be used when previewing the HTML for a content in the given service instance.protected Map<String,String>
getStringsToLocalize()
protected Class<?>
getValueClass()
Returns the class the possible values of this control are assignable to.void
init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl)
void
loadFromRequest()
void
setProcessActionHandlerParameters(IProcessActionHandler processActionHandler)
Sets the control value as a process action handler parameter.void
setRenderData()
-
Methods inherited from class lumis.doui.control.DataBoundControl
autoAddDateTimeValueValidator, autoAddDoubleValueValidator, autoAddFileSizeValidator, autoAddIntegerValueValidator, autoAddLengthValidator, autoAddLongValueValidator, autoAddRequiredValueValidator, autoAddValidators, createConverter, createDataType, getDataId, getFieldName, getProcessActionHandlerParameterName, getReload, getRequestHelpDefinition, getRuntimeDefaultSource, getSource, getSourceById, getSourceContext, getUnboundedConverter, setDefaultValue, setRawValue, setReload, setSourceParameter, setValid, setValueFromSource, setValueFromSource, update
-
Methods inherited from class lumis.doui.control.DataControl
convertValueToControlValue, getConverter, getDataType, getDefaultValue, getParameterValue, getProcessActionIds, getRequestParameterName, getValue, getValue, initProcessActionIds, isTrim, loadSubControlFromRequest, loadSubControlsFromRequest, setProcessActionHandlerParameter, setProcessActionHandlerParameter, setSourceParameter, setSourceParameters, setTrim, setValue, valueIsArray
-
Methods inherited from class lumis.doui.control.Control
appendSubControl, appendSubControls, applyOnEventScripts, convertToStandardValue, createContainer, disconnect, generateControlId, generateControlIdPrefix, getAdditionalParameters, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getId, getLocale, getName, getNamespace, getParentControl, getRenderData, getResources, getScriptActionValidation, getType, getValidationScript, getWindowProperties, getWindowProperties, isRequired, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setName, setRuntimeAttributes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.doui.control.IControl
createContainer, disconnect, getChildControls, getId, getName, getParentControl, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes
-
Methods inherited from interface lumis.doui.control.IDataControl
getConverter, getProcessActionIds, getValue, getValue, setValue
-
Methods inherited from interface lumis.doui.render.IRenderer
getResources
-
-
-
-
Method Detail
-
init
public void init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl) throws PortalException
- Specified by:
init
in interfaceIControl
- Overrides:
init
in classDataBoundControl<Source<?>>
- Throws:
PortalException
-
fixedIdentifierRequired
protected boolean fixedIdentifierRequired()
- Overrides:
fixedIdentifierRequired
in classControl
-
getValueClass
protected Class<?> getValueClass() throws PortalException
Description copied from class:DataControl
Returns the class the possible values of this control are assignable to.This default implementation uses
IDouiDataType.getValueClass()
of the data type of this control.- Overrides:
getValueClass
in classDataControl
- Returns:
- the class the possible values of this control are assignable to.
- Throws:
PortalException
-
encodeHtmlForEditor
public static String encodeHtmlForEditor(String html, IWebsite currentWebsite, boolean baseSecure) throws PortalException
- Throws:
PortalException
-
loadFromRequest
public void loadFromRequest() throws PortalException
- Specified by:
loadFromRequest
in interfaceIDataControl
- Overrides:
loadFromRequest
in classDataBoundControl<Source<?>>
- Throws:
PortalException
-
setProcessActionHandlerParameters
public void setProcessActionHandlerParameters(IProcessActionHandler processActionHandler) throws PortalException
Description copied from class:DataControl
Sets the control value as a process action handler parameter.- Specified by:
setProcessActionHandlerParameters
in interfaceIDataControl
- Overrides:
setProcessActionHandlerParameters
in classDataControl
- Throws:
PortalException
-
setRenderData
public void setRenderData() throws PortalException
- Specified by:
setRenderData
in interfaceIControl
- Overrides:
setRenderData
in classDataBoundControl<Source<?>>
- Throws:
PortalException
-
getPreviewCsss
public static List<String> getPreviewCsss(ServiceInstanceConfig siConfig) throws PortalException
Returns the CSS to be used when previewing the HTML for a content in the given service instance.- Parameters:
siConfig
- the service instance.- Returns:
- a list with the CSS hrefs or an empty list if there is no CSS to be used.
- Throws:
PortalException
- Since:
- 14.2.0
-
getPrepareForReadScript
public String getPrepareForReadScript() throws PortalException
- Specified by:
getPrepareForReadScript
in interfaceIControl
- Overrides:
getPrepareForReadScript
in classControl
- Throws:
PortalException
-
buildSubControls
public void buildSubControls() throws PortalException
- Specified by:
buildSubControls
in interfaceIControl
- Overrides:
buildSubControls
in classDataBoundControl<Source<?>>
- Throws:
PortalException
-
getControlResource
public IResource getControlResource() throws PortalException
- Specified by:
getControlResource
in interfaceIControl
- Overrides:
getControlResource
in classControl
- Throws:
PortalException
-
getStringsToLocalize
protected Map<String,String> getStringsToLocalize()
- Overrides:
getStringsToLocalize
in classControl
-
-