Interface TableRefDisplay
For example, a data model contains the following:
where<xs:annotation> <xs:appinfo> <osd:otherFacets> <osd:tableRef> <tablePath>../catalog</tablePath> <display osd:class="com.foo.CatalogRenderer"> <param1>...</param1> <param2>...</param2> </display> </osd:tableRef> </osd:otherFacets> </xs:appinfo> </xs:annotation>
com.foo.CatalogRenderer
is
the fully qualified name of the class that implement this interface.
The declaration may use parameters, param1
and param2
in the example,
which are are JavaBean properties of the com.foo.CatalogRenderer
class.
For more information, see the JavaBean specification.
Life cycle
- When the data model is loaded:
- the specified class is instantiated through its default constructor and its JavaBean property
setters are called (in the example above, the setter methods would be
setParam1(...)
andsetParam2(...)
); - the method
setup(TableRefDisplayContext)
is called on the new instance.
- the specified class is instantiated through its default constructor and its JavaBean property
setters are called (in the example above, the setter methods would be
- During the operational phase: the method
displayOccurrence(Adaptation, Locale)
is called each time an associated element is to be displayed.
-
Method Summary
Modifier and TypeMethodDescriptiondisplayOccurrence
(Adaptation aRecord, Locale aLocale) Returns an end-user label for the specified record.void
setup
(TableRefDisplayContext aContext) This method is called when the data model is loaded, to check and prepare this instance.
-
Method Details
-
setup
This method is called when the data model is loaded, to check and prepare this instance.This method can also declare a specific sort criteria.
-
displayOccurrence
Returns an end-user label for the specified record.Internationalization strategy
This method returns
null
if the specified locale is not handled by the current implementation. The container tries several locales when handling a partial internationalization of this method's implementation and/or a mismatch between the locales declared by the associated module and the locales supported by EBX®. In such cases, locales are tried in the following order:- User's preferred locale for the data model
(see
Session.getLocaleForSchemaNode(SchemaNode)
); - Session's current locale;
- Default locale declared in the file
module.xml
;
Multi-threading
For a single instance of this interface, this method may be called concurrently by several threads.
- Parameters:
aRecord
- The record to be displayed, nevernull
.aLocale
- The current locale, nevernull
. see Internationalization strategy above.- Throws:
InvalidSchemaException
- if a dynamic condition in the data model prevents the execution of this method.
- User's preferred locale for the data model
(see
-