public interface UILabelRendererContext extends UIBodyWriter
UILabelRenderer| Modifier and Type | Method and Description |
|---|---|
String |
displayOccurrenceValue(Path aPath,
boolean useLabels)
Returns a user-friendly representation of the specified value,
according the current locale.
|
String |
getLabelFromDefaultPattern()
Returns the localized label as specified by the default pattern.
|
Locale |
getLocale()
Returns the current locale of the user session.
|
Adaptation |
getOccurrence()
Returns the current record that is being displayed.
|
Session |
getSession()
Returns the current user session.
|
String |
getURLForResource(ResourceType aResourceType,
String aResourceName)
Returns the URL of the specified web resource, in the current module and for the current
session locale.
|
String |
getURLForResource(ResourceType aResourceType,
String aResourceName,
Locale aLocale)
Returns the URL of the specified web resource, in the current module (that is, the module of
the current adaptation).
|
String |
getURLForResource(String aModuleAliasOrName,
ResourceType aResourceType,
String aResourceName,
Locale aLocale)
Returns the URL of the specified web resource.
|
boolean |
isHTMLForbidden()
Returns
true if the HTML tags in the label are escaped,
false if they are interpreted. |
add_cr, add_cr, add, add, add, addSafeAttribute, addSafeAttribute, addSafeInnerHTML, addSafeInnerHTMLLocale getLocale()
RuntimeException - if this method is called by a renderer defined inside a foreign key constraint.String getURLForResource(ResourceType aResourceType, String aResourceName)
null if called outside the context of an
HTTP request (for instance through Adaptation.getLabel(Locale)).UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).ModuleNotFoundException - if the alias or name specified does not correspond to a module.getURLForResource(ResourceType, String, Locale),
getLocale()String getURLForResource(ResourceType aResourceType, String aResourceName, Locale aLocale)
null if called outside the context of an
HTTP request (for instance through Adaptation.getLabel(Locale)).UnsupportedOperationException - if the resource type is internal (not accessible from HTTP).ModuleNotFoundException - if the alias or name specified does not correspond to a module.String getURLForResource(String aModuleAliasOrName, ResourceType aResourceType, String aResourceName, Locale aLocale) throws ModuleNotFoundException
null if called outside the context of an
HTTP request (for instance through Adaptation.getLabel(Locale)).RuntimeException - if the resource type is internal (not accessible from HTTP).ModuleNotFoundException - if the alias or name specified does not correspond to a module.Adaptation getOccurrence()
String displayOccurrenceValue(Path aPath, boolean useLabels)
A value can have be displayed differently from a standard XML formatted value
since it can take into account locale-dependent formatting for numbers and dates and also,
if useLabels is true for specific value labeling.
For more information, see value display section.
aPath - specifies the value to display in the record (a relative path is interpreted
based on the root node of this context).useLabels - If true and labeling is enabled (see above), specifies that the label
associated with the value must be returned. Otherwise, the formatted value is returned.IllegalStateException - if this node is not for a record (see getOccurrence()).RuntimeException - if this method is called by a renderer defined inside a foreign key constraint.SchemaNode.formatToXsString(Object),
SchemaNode.displayOccurrence(Object, boolean, ValueContext, Locale)String getLabelFromDefaultPattern()
<defaultLabel [xml:lang="..."]> which are specified
by the table definition.Session getSession()
boolean isHTMLForbidden()
true if the HTML tags in the label are escaped,
false if they are interpreted.
If this method returns true, HTML tags in the label will not be interpreted and will
thus be displayed as plain text.