If a local type declaration with a schema defined directly in the model, is declaring an
element with the type defined in another model as an external reference,
the client using that type declaration ( via ((SchemaType) typeDeclaration.getXpdlType()).getSchema())
must ensure that the client side schema is properly resolved.
This can be achieved by installing a custom schema resolver in the corresponding model before the type declaration is obtained.
The following code shows an example installing a custom schema resolver in a model:
if (model instanceof ModelDetails)
{
((ModelDetails) model).setSchemaLocatorAdapter(new ModelDetails.SchemaLocatorAdapter()
{
protected Model getModel(long oid)
{
return ... the model corresponding to the oid argument ...;
}
});
}