public interface UILabelRendererForHierarchyContext extends 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).
UILabelRendererForHierarchy| Modifier and Type | Method and Description |
|---|---|
void |
addPreviewLink(String aURL,
String aLabel)
Adds a preview link to the node.
|
Object |
getEnumerationValue()
Returns the current enumeration value if this is an
enumeration node. |
HierarchyNode |
getHierarchyNode()
Returns the current hierarchy node being displayed.
|
String |
getLabelFromDefaultPattern()
Returns the localized label, as specified by the current hierarchy configuration.
|
Adaptation |
getOccurrence()
Returns the current record being displayed.
|
String |
getURLForAjaxComponent(String ajaxComponentName)
This inherited method is not supported.
|
String |
getURLForAjaxComponent(String ajaxComponentName,
Map<String,String> parameters)
This inherited method is not supported.
|
String |
getURLForSelectingCurrentNode()
Returns the URL for selecting the hierarchy node of the current record.
|
boolean |
isDefaultLinkEnabled()
Returns
true if using the default behavior for node selection,
false otherwise. |
boolean |
isEnumerationNode()
Returns
true if the current node is an enumeration node,
false otherwise. |
boolean |
isOrphansParent()
Returns
true if the current node is the container parent node of orphan
nodes, false otherwise. |
boolean |
isRoot()
Returns
true if the current node is the root of the hierarchy,
false otherwise. |
boolean |
isTarget()
Returns
true if the current record is a target
table record, false otherwise. |
boolean |
isTerminal()
Returns
true if the current record has no children in the hierarchy,
false otherwise. |
void |
setDefaultIconDisplayed(boolean isDefaultIconDisplayed)
Sets whether or not to use the default icon for hierarchy nodes.
|
void |
setDefaultLinkEnabled(boolean isDefaultLinkEnabled)
Sets whether or not to use the default behavior for node selection.
|
displayOccurrenceValue, getLocale, getSession, getURLForResource, getURLForResource, getURLForResource, isHTMLForbiddenadd_cr, add_cr, add, add, add, addSafeAttribute, addSafeAttribute, addSafeInnerHTML, addSafeInnerHTMLcreateWebComponentForRootSession, createWebComponentForSubSession, getURLForPerspectiveSelection, getURLForPerspectiveSelection, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForRest, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForViewSelectionAdaptation getOccurrence()
Warning: this method returns null
if the current node is a root node, the
container parent node for orphan nodes, or an
enumeration node.
getOccurrence in interface UILabelRendererContextObject getEnumerationValue()
enumeration node.
Otherwise, this method returns null.getOccurrence()HierarchyNode getHierarchyNode()
String getLabelFromDefaultPattern()
If the configuration does not specify a label pattern, this method returns the localized label according to the default pattern.
The default pattern is looked up on the elements
<defaultLabel [xml:lang="..."]>, which are specified
by the table definition.
getLabelFromDefaultPattern in interface UILabelRendererContextboolean isEnumerationNode()
true if the current node is an enumeration node,
false otherwise.
An enumeration corresponds to an xs:enumeration element
in the data model.
In this case, the method getOccurrence() returns null.
getEnumerationValue()boolean isOrphansParent()
true if the current node is the container parent node of orphan
nodes, false otherwise.
In this case, the method getOccurrence() returns null.
boolean isRoot()
true if the current node is the root of the hierarchy,
false otherwise.
In this case, the method getOccurrence() returns null.
boolean isTarget()
true if the current record is a target
table record, false otherwise.
The target table is the table from which the hierarchy was built.
boolean isTerminal()
true if the current record has no children in the hierarchy,
false otherwise.boolean isDefaultLinkEnabled()
true if using the default behavior for node selection,
false otherwise.
Default is true.
setDefaultLinkEnabled(boolean)void setDefaultLinkEnabled(boolean isDefaultLinkEnabled)
If false, any selection links must be explicitly generated
using this label renderer, for example by adding specific HTML a tags
with the href attribute.
Default is true.
getURLForSelectingCurrentNode()void setDefaultIconDisplayed(boolean isDefaultIconDisplayed)
If false, 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 an img HTML tag.
The recommended icon size is 16x16 px. For proper vertical
alignment, set vertical-align: -3px;.
For example:
<img src="path/of/my/icon/redBullet16x16.png" style="vertical-align: -3px;"/>
Default is true.
String getURLForSelectingCurrentNode()
String getURLForAjaxComponent(String ajaxComponentName)
getURLForAjaxComponent in interface UIResourceLocatorajaxComponentName - name of the Ajax component declared either in the data model or in the module.UnsupportedOperationException - if called.UIAjaxComponentString getURLForAjaxComponent(String ajaxComponentName, Map<String,String> parameters)
getURLForAjaxComponent in interface UIResourceLocatorajaxComponentName - 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 example module_name@ajax_component_name.parameters - map defining HTTP parameters that are passed in the Ajax request.
It maps HTTP parameter names with their values.UnsupportedOperationException - if called.UIAjaxComponentvoid addPreviewLink(String aURL, String aLabel)
Recommendations concerning the specified URL:
Note:
UILabelRendererForHierarchyContext.createWebComponentForSubSession.getURLForSelection methods from UIResourceLocator
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.aURL - the URL of the page to open.aLabel - the label of the link.UIResourceLocator.createWebComponentForSubSession(),
UIComponentWriter.buildButtonPreview(String, UserMessage)