Interface UILabelRendererForHierarchyContext
- All Superinterfaces:
UIBodyWriter
,UILabelRendererContext
,UIResourceLocator
Warning: if the node is a
root
node, the
container parent node for orphan nodes
, or an
enumeration node
,
it does not correspond to a table record
(that is, method getOccurrence()
returns null
).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPreviewLink
(String aURL, String aLabel) Adds a preview link to the node.Returns the current enumeration value if this is anenumeration node
.Deprecated.Returns the current hierarchy node being displayed.Returns the label resolved from the configured pattern.com.orchestranetworks.hierarchy.Member
Returns the current hierarchy member being displayed.Returns the current record being displayed.getURLForAjaxComponent
(String ajaxComponentName) This inherited method is not supported.getURLForAjaxComponent
(String ajaxComponentName, Map<String, String> parameters) This inherited method is not supported.Returns the URL for selecting the hierarchy node of the current record.boolean
Returnstrue
if using the default behavior for node selection; otherwise, it returnsfalse
.boolean
Returnstrue
if the current node is an enumeration node; otherwise, it returnsfalse
.boolean
Returnstrue
if the current node is the container parent node of orphan nodes; otherwise, it returnsfalse
.boolean
isRoot()
Returnstrue
if the current node is the root of the hierarchy; otherwise, it returnsfalse
.boolean
isTarget()
Returnstrue
if the current record is a target table record; otherwise, it returnsfalse
.boolean
Returnstrue
if the current record has no children in the hierarchy; otherwise, it returnsfalse
.void
setDefaultIconDisplayed
(boolean isDefaultIconDisplayed) Sets whether to use the default icon for hierarchy nodes.void
setDefaultLinkEnabled
(boolean isDefaultLinkEnabled) Sets whether to use the default behavior for node selection.Methods inherited from interface com.orchestranetworks.ui.UIBodyWriter
add, add, add, add_cr, add_cr, addSafeAttribute, addSafeAttribute, addSafeInnerHTML, addSafeInnerHTML
Methods inherited from interface com.orchestranetworks.ui.UILabelRendererContext
displayOccurrenceValue, getCurrentPerspective, getCustomViewContext, getLocale, getSession, getURLForResource, getURLForResource, getURLForResource, isHTMLForbidden
Methods inherited from interface com.orchestranetworks.ui.UIResourceLocator
createWebComponentForRootSession, createWebComponentForSubSession, getURLForPerspectiveSelection, getURLForPerspectiveSelection, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForRest, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForViewSelection
-
Method Details
-
getOccurrence
Adaptation getOccurrence()Returns the current record being displayed.Warning: this method returns
null
if the current node is aroot node
, thecontainer parent node for orphan nodes
, or anenumeration node
.- Specified by:
getOccurrence
in interfaceUILabelRendererContext
-
getEnumerationValue
Object getEnumerationValue()Returns the current enumeration value if this is anenumeration node
. Otherwise, this method returnsnull
.- See Also:
-
getHierarchyNode
Deprecated.Returns the current hierarchy node being displayed. -
getMember
com.orchestranetworks.hierarchy.Member getMember()Returns the current hierarchy member being displayed. -
getLabelFromDefaultPattern
String getLabelFromDefaultPattern()Returns the label resolved from the configured pattern.If the hierarchy level configuration defines a pattern, then the returned label is resolved according to this pattern.
Otherwise, if the table definition in the data model defines a pattern, then the returned label matches this pattern.
The default pattern is looked up on the elements
<defaultLabel [xml:lang="..."]>
, which are specified by the table definition.If no pattern is defined, then the returned label is the formatted primary key. (The localized value of each node of the primary key separated by white spaces.)
- Specified by:
getLabelFromDefaultPattern
in interfaceUILabelRendererContext
- See Also:
-
isEnumerationNode
boolean isEnumerationNode()Returnstrue
if the current node is an enumeration node; otherwise, it returnsfalse
.An enumeration corresponds to an
xs:enumeration
element in the data model.In this case, the method
getOccurrence()
returnsnull
.- See Also:
-
isOrphansParent
boolean isOrphansParent()Returnstrue
if the current node is the container parent node of orphan nodes; otherwise, it returnsfalse
.In this case, the method
getOccurrence()
returnsnull
. -
isRoot
boolean isRoot()Returnstrue
if the current node is the root of the hierarchy; otherwise, it returnsfalse
.In this case, the method
getOccurrence()
returnsnull
. -
isTarget
boolean isTarget()Returnstrue
if the current record is a target table record; otherwise, it returnsfalse
.The target table is the table from which the hierarchy was built.
-
isTerminal
boolean isTerminal()Returnstrue
if the current record has no children in the hierarchy; otherwise, it returnsfalse
. -
isDefaultLinkEnabled
boolean isDefaultLinkEnabled()Returnstrue
if using the default behavior for node selection; otherwise, it returnsfalse
.The default is
true
.- Since:
- 5.2.0
- See Also:
-
setDefaultLinkEnabled
void setDefaultLinkEnabled(boolean isDefaultLinkEnabled) Sets whether to use the default behavior for node selection.If
false
, then any selection links must be explicitly generated using this label renderer, for example, by adding specific HTMLa
tags with thehref
attribute.The default is
true
.- Since:
- 5.2.0
- See Also:
-
setDefaultIconDisplayed
void setDefaultIconDisplayed(boolean isDefaultIconDisplayed) Sets whether to use the default icon for hierarchy nodes.If
false
, then the content of the line shifts left to where the icon would have been. It is then possible to add a custom icon by adding animg
HTML tag. The recommended icon size is 16x16 px. For proper vertical alignment, setvertical-align: -3px;
.For example:
<img src="path/of/my/icon/redBullet16x16.png" style="vertical-align: -3px;"/>
The default is
true
.- Since:
- 5.4.1
-
getURLForSelectingCurrentNode
String getURLForSelectingCurrentNode()Returns the URL for selecting the hierarchy node of the current record.- Since:
- 5.2.0
-
getURLForAjaxComponent
This inherited method is not supported.- Specified by:
getURLForAjaxComponent
in interfaceUIResourceLocator
- Parameters:
ajaxComponentName
- name of the Ajax component declared either in the data model or in the module.- Throws:
UnsupportedOperationException
- if called.- Since:
- 5.2.0
- See Also:
-
getURLForAjaxComponent
This inherited method is not supported.- Specified by:
getURLForAjaxComponent
in interfaceUIResourceLocator
- Parameters:
ajaxComponentName
- name of the Ajax component declared either in the data model or in the module. If the Ajax component is declared in the module, the name should be prefixed by the module's name and '@' for examplemodule_name@ajax_component_name
.parameters
- map defining HTTP parameters that are passed in the Ajax request. It maps HTTP parameter names with their values.- Throws:
UnsupportedOperationException
- if called.- Since:
- 5.2.0
- See Also:
-
addPreviewLink
Adds a preview link to the node. Clicking on the link displays the the specified URL in a standard modal inner pop-up.Recommendations concerning the specified URL:
Note:
- It is recommended to use
UILabelRendererForHierarchyContext.createWebComponentForSubSession
. - The inner pop-up uses an iFrame, so external URLs may not work.
- The
getURLForSelection
methods fromUIResourceLocator
should not be used, as the returned URLs change the state of the current session. Such URLs must only be invoked in the current window, never in a pop-up.
- Parameters:
aURL
- the URL of the page to open.aLabel
- the label of the link.- Since:
- 5.2.2
- See Also:
- It is recommended to use
-