public 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.
setParam1(...)
and
setParam2(...)
);setup(TableRefDisplayContext)
is called on the new instance.displayOccurrence(Adaptation, Locale)
is called each time an associated element is to be displayed.
Modifier and Type | Method and Description |
---|---|
String |
displayOccurrence(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.
|
void setup(TableRefDisplayContext aContext)
This method can also declare a specific sort criteria.
String displayOccurrence(Adaptation aRecord, Locale aLocale) throws InvalidSchemaException
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:
Session.getLocaleForSchemaNode(SchemaNode)
);module.xml
;For a single instance of this interface, this method may be called concurrently by several threads.
aRecord
- The record to be displayed, never null
.aLocale
- The current locale, never null
. see
Internationalization strategy
above.InvalidSchemaException
- if a dynamic condition in the data model prevents the execution of this method.