initialize() method not propogating to child types reference via possible attribute in Type annotati [message #1740007] |
Mon, 08 August 2016 05:11  |
Jason Pell Messages: 55 Registered: February 2011 |
Member |
|
|
I have a model which basically models a xsd choice by using the following Type annotation:
@Type(base = TemplateData.class, possible = { FlatTemplateData.class, XmlTemplateData.class })
@XmlElementBinding(path = "templateData", mappings = {
@XmlElementBinding.Mapping(element = "flatTemplateData", type = FlatTemplateData.class),
@XmlElementBinding.Mapping(element = "xmlTemplateData", type = XmlTemplateData.class)
})
@Label(standard = "Template Data")
ElementProperty PROP_TEMPLATE_DATA = new ElementProperty(TYPE, "TemplateData");
ElementHandle<TemplateData> getTemplateData();
And this all works fine in the UI, except for when I call initialize() on the root type, this event is not being called on the FlatTemplateData or XmlTemplateData, so that InitialValues, etc are not being setup for an instance of FlatTemplateData or XmlTemplateData
I am working around this by explicitly calling the initialize() method on the getTemplateData().content()
Is this a bug or do I need to do something else to get the initialize process to correctly propogate to the correct child class?
[Updated on: Mon, 08 August 2016 05:11] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01300 seconds