MappingMedium data type
Value range of the MappingMedium data type
In FirstSpirit it is possible to specify mouse-sensitive areas for a picture (also called link-sensitive graphics). The IMAGEMAP input component can be used to provide a picture with mouse-sensitive areas. The input component returns an object of the data type MappingMedium. This object can be used to generate the HTML source code for an image map.
For further information on the MappingMedium data type, see API documentation: de.espirit.firstspirit.access.editor.value.MappingMedium
For further information about the output of imagemaps see also data type Area.
Definition using the standard input components
Different input components can be defined in the form area of a page or section template. These form elements can then be used to insert the actual editorial contents into the page. The Standard input components supported by FirstSpirit return different data types.
The following standard input components return an object of data type MappingMedium :
Then, with the help of a $CMS_VALUE(...)$ instruction, methods can then be applied to this object:
$CMS_VALUE(IDENTIFIER.METHOD)$
Under IDENTIFIER, the resultname parameter, defined in the input component, must be specified.
Methods on MappingMedium objects
The table below lists all methods which can be invoked on objects of data type MappingMedium.
The object is generated by the following form objects: |
---|
CMS_INPUT_IMAGEMAP |
compareTo(Comparable)
Method name | Return type | Available since |
---|---|---|
compareTo(Comparable) | int |
equals(Object)
Method name | Return type | Available since |
---|---|---|
equals(Object) | boolean |
getAltText
The .getAltText() (in Bean syntax: .altText) method returns the value stored in the input component for the comment field.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
getAltText | String |
getAreas
The hot-spots or active areas of a CMS_INPUT_IMAGEMAP input component can be output using the getAreas() (in Bean syntax: .areas) method.
As several hot-spots or active areas can be entered within a CMS_INPUT_IMAGEMAP input component, the instruction $CMS_FOR(...)$ is used to enable the attributes of each individual area to be output:
$CMS_FOR(AREA, st_imagemap.getAreas())
Several different methods can be applied to the AREA variable.
Method name | Return type | Available since |
---|---|---|
getAreas | List |
getClass
The .getClass() (in Bean syntax: .class) method returns the class of the invoking object (cf. java.lang.Class).
Invocation:
$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$
Output:
java.lang.String
Method name | Return type | Available since |
---|---|---|
getClass | Class |
getComment
The .getComment() (in Bean syntax: .comment) method returns the value stored in the input component for the comment field.
The returned object is a character string (see java.lang.String).
The method is a synonym for the method: .getAltText(). The method has been installed for compatibility reasons and may well be dropped in a subsequent version. |
Method name | Return type | Available since |
---|---|---|
getComment | String |
getElement
Method name | Return type | Available since |
---|---|---|
getElement | Referenceable |
getElementName
Method name | Return type | Available since |
---|---|---|
getElementName | String |
getFile
Method name | Return type | Available since |
---|---|---|
getFile | File |
getFolder
Method name | Return type | Available since |
---|---|---|
getFolder | MediaFolder |
getHeight
The .getHeight() (in Bean syntax: .height) method returns the height of the medium stored in the input component (cf. Input Component IMAGEMAP).
The returned object is an integer (see java.lang.Integer).
Method name | Return type | Available since |
---|---|---|
getHeight | int |
getImage
Method name | Return type | Available since |
---|---|---|
getImage | Media |
getLanguage
Method name | Return type | Available since |
---|---|---|
getLanguage | Language |
getMedium
The .getMedium() (in Bean syntax: .medium) method returns the medium selected in the input component (labelling: Reference).
The returned object is a medium (see de.espirit.firstspirit.access.store.mediastore.Media).
The medium can be used in a $CMS_REF(...)$ instruction for determination of the URL:
<a href="$CMS_REF(referenzname)$">Text</a>
Method name | Return type | Available since |
---|---|---|
getMedium | Media |
getPicture
Method name | Return type | Available since |
---|---|---|
getPicture | Picture |
getRemoteName
The .getRemoteName() (in Bean syntax: .remoteName) method returns the value stored in the input component the stored name of the remote project.
The value is stored in the input component if an element (e.g. page reference, picture, file, etc.) from a remote project was selected.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
getRemoteName | String |
getResolution
The .getResolution() (in Bean syntax: .resolution) method returns the selected resolution of the stored medium in the input component (cf. Input Components IMAGEMAP).
The resolution can be selected when choosing the picture from the media store.
The returned object is a resolution (see de.espirit.firstspirit.access.project.Resolution).
The resolution can be used in a $CMS_REF(...)$ instruction for determination of the URL:
<img src="$CMS_REF(st_cmsImagemap.medium, res:st_cmsImagemap.resolution)$">
Method name | Return type | Available since |
---|---|---|
getResolution | Resolution |
getType
Method name | Return type | Available since |
---|---|---|
getType | BinaryMedium$Type |
getWidth
The .getWidth() (in Bean syntax: .width) method returns the width of the medium stored in the input component (cf. Input Component IMAGEMAP).
The returned object is an integer (see java.lang.Integer).
Method name | Return type | Available since |
---|---|---|
getWidth | int |
isCase(Object)
Method name | Return type | Available since |
---|---|---|
isCase(Object) | boolean |
isEmpty
The .isEmpty() (in Bean syntax: .isEmpty) method checks whether an expression or object is empty, e.g. storeElement.isEmpty(). The result of the semantic check depends on the expression or object, e.g. a character string is empty if it does not contain any characters. In the case of objects with complex values or objects, the object decides when it is empty. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isEmpty() returns a Boolean value as the check result. true is the check result if the expression or object is empty and false if not.
Method name | Return type | Available since |
---|---|---|
isEmpty | boolean |
isNull
The .isNull() (in Bean syntax: .isNull) method checks whether an expression or object is null , e.g. storeElement.isNull(). In the case of objects with complex values or objects, the object decides when it is null. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isNull() returns a Boolean value as the check result. true is the check result if the expression or object is null and false if not.
Method name | Return type | Available since |
---|---|---|
isNull | boolean |
Method name | Return type | Available since |
---|---|---|
void |
set(String, Object)
Method name | Return type | Available since |
---|---|---|
set(String, Object) | Object |
setAltText(String)
Method name | Return type | Available since |
---|---|---|
setAltText(String) | void |
setAreas(List)
Method name | Return type | Available since |
---|---|---|
setAreas(List) | void |
setComment(String)
Method name | Return type | Available since |
---|---|---|
setComment(String) | void |
setElementName(String)
Method name | Return type | Available since |
---|---|---|
setElementName(String) | void |
setFolder(MediaFolder)
Method name | Return type | Available since |
---|---|---|
setFolder(MediaFolder) | void |
setMedium(Media)
Method name | Return type | Available since |
---|---|---|
setMedium(Media) | void |
setRemoteName(String)
Method name | Return type | Available since |
---|---|---|
setRemoteName(String) | void |
setResolution(Resolution)
Method name | Return type | Available since |
---|---|---|
setResolution(Resolution) | void |
toJson
Convert to JSON string representtion (only handles Maps, Collections, Arrays, Numbers, and Strings)Method name | Return type | Available since |
---|---|---|
toJson | String | 4.2.14 |
toString
Method name | Return type | Available since |
---|---|---|
toString | String |
type
Method name | Return type | Available since |
---|---|---|
type | String |