public interface PresentationElement extends Serializable
PresentationPool
bean, which
owns a single root group (PresentationElement
), accessed via its rootElement
property.
This root group is usually called the grid}.
You can determine what kind of a section page component a PresentationElement
represents
by testing its properties:
PresentationElement
has contents in its getKeys()
,
getAreas()
and getType()
properties.
PresentationElement
has contents in its getItems()
and getType()
properties.
PresentationElement
has contents in its getFields()
and getContent()
properties.
title
field of a summary in the first area of
the header
group of a section page. The section page is held in a variable called page
:
${page.rootElement.areas.header.items[0].fields.title}
In this expression:
page
is the PresentationPool
object representing the section page.
page.rootElement
is a PresentationElement
object representing the root group or grid.
page.rootElement.areas.header
is a PresentationElement
object representing the grid's
header
area.
page.rootElement.areas.header.items[0]
is a PresentationElement
object representing
the first summary in the header
area.
page.rootElement.areas.header.items[0].fields.title
is the summary's title field.
Modifier and Type | Method and Description |
---|---|
Map<String,PresentationElement> |
getAreas()
Returns the areas in a
PresentationElement that represents
a group. |
PresentationArticle |
getContent()
Returns the content item referenced by a
PresentationElement that represents
a summary. |
Map<String,PresentationProperty<?>> |
getFields()
Returns all the fields in a
PresentationElement that represents a summary. |
List<PresentationElement> |
getItems()
Returns the summaries in a
PresentationElement that represents
an area. |
List<String> |
getKeys()
Returns the names of the areas in a
PresentationElement that represents
a group. |
String |
getLabel()
Returns the label of the
PresentationElement if the
PresentationElement representas a group or area. |
Map<String,Object> |
getOptions()
Returns a
Map of options for this PresentationElement . |
PresentationElement |
getParent()
Returns the parent of this element.
|
String |
getType()
Returns the type of the
PresentationElement . |
PresentationArticle getContent()
PresentationElement
that represents
a summary.Map<String,PresentationElement> getAreas()
PresentationElement
that represents
a group. If this property has zero length then the PresentationElement
represents an area or a summary, not a group.Map<String,Object> getOptions()
Map
of options for this PresentationElement
.map
containing all options for this PresentationElement
. Will never be null
.List<PresentationElement> getItems()
PresentationElement
that represents
an area. If this property has zero length then the PresentationElement
represents a group or a summary, not an area.List<String> getKeys()
PresentationElement
that represents
a group. The names are returned in the order they are defined in the
layout-group
resource. If this property has zero length then the
PresentationElement
represents an area or a summary, not a group.Map<String,PresentationProperty<?>> getFields()
PresentationElement
that represents a summary.
If this property has zero length then the PresentationElement
represents a group or an area, not a summary.
The actual type of the Java Object
s representing the fields depends upon
field type as follows:
Field type | Java Object |
---|---|
BASIC | String |
NUMBER | a subclass of Number |
COMPLEX | Map |
BOOLEAN | Boolean |
ENUMERATION | a String or List of Strings |
URI | URI |
LINK | Link |
DATE | Date |
SCHEDULE | PresentationSchedule |
PresentationElement getParent()
Teaser
, ListTeaser
: The parent is always an Area
Area
: The parent is always a Group
Group
: The parent is always either an Area
or null
when the group is a
root group.PresentationElement
may not follow this rule if it is not a part of the section
page.PresentationElement
. If this element has no parent, then null
is
returned.String getType()
PresentationElement
. For a PresentationElement
representing a group or area, this will be the name of the group or area definition
on which it is based. Groups and areas are defined in the layout-group
resource
file. For a PresentationElement
representing a summary, no value is returned.String getLabel()
PresentationElement
if the
PresentationElement
representas a group or area. If the element
represents a different object, null
will be returned.
This comes from the <ui:label/>
inside the XML
element of the layout-group
resource file. If no such XML
element has been defined, the name of the element capitalised
will be retuned.© 1998- 2018 Stibo DX