Class CmsDirectEditMode
java.lang.Object
org.opencms.workplace.editors.directedit.CmsDirectEditMode
Constants to indicate which mode to use for placement of the HTML that generates
the direct edit buttons.
There are 3 basic options for the direct edit mode:
FALSE
: Direct edit is disabled.AUTO
: Direct edit button HTML is inserted automatically.MANUAL
: Direct edit button HTML is inserted manually by using <cms: editable mode="manual" /> tags.
AUTO
.
There is an additional constant TRUE
that means "use the default mode of the page / template".
It is possible to switch modes for an individual content loop. This is intended to use with XmlContents that require special placement of the direct edit HTML because the default placement does not give good results.
- Since:
- 6.2.3
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CmsDirectEditMode
Indicates automatic placement of direct edit HTML.static final CmsDirectEditMode
Indicates direct edit is disabled.static final CmsDirectEditMode
Indicates manual placement of direct edit HTML.static final CmsDirectEditMode
Indicates direct edit HTML is to be generated according to the default setting of the current page. -
Method Summary
Modifier and TypeMethodDescriptionint
getMode()
Returns this modes int value.boolean
Returnstrue
in case this mode indicates direct edit is enabled.toString()
static CmsDirectEditMode
valueOf
(boolean value) static CmsDirectEditMode
valueOf
(int mode) Returns the mode constant for the selected direct edit int mode.static CmsDirectEditMode
Returns the mode constant for the selected direct edit String mode description.
-
Field Details
-
AUTO
Indicates automatic placement of direct edit HTML. -
FALSE
Indicates direct edit is disabled. -
MANUAL
Indicates manual placement of direct edit HTML. -
TRUE
Indicates direct edit HTML is to be generated according to the default setting of the current page.
-
-
Method Details
-
valueOf
-
valueOf
Returns the mode constant for the selected direct edit int mode.The possible value are:
- Parameters:
mode
- the direct edit int mode to get the constant for- Returns:
- the mode constant for the selected direct edit int mode
-
valueOf
Returns the mode constant for the selected direct edit String mode description.For a mode instance
A
,toString()
returns the String mode description.- Parameters:
value
- the direct edit String mode description to get the constant for- Returns:
- the mode constant for the selected direct edit String mode description
-
getMode
Returns this modes int value.- Returns:
- this modes int value
- See Also:
-
isEnabled
Returnstrue
in case this mode indicates direct edit is enabled.Direct edit is enabled if this mode is not
FALSE
, which is identical to
.getMode()
> 0- Returns:
true
in case this mode indicates direct edit is enabled
-
toString
-