Hello everyone,
I have such structure of Entities Patient->Diagnosis; Patient->Event->Relapse; Patient->Therapy->Protocol; Patient->Therapy->Tc_99 and so on. All connected Entities are edited on the same screen. I look equals topics, but don’t find anything useful.
My datasource looks like:
<dsContext>
<datasource id="patientDs"
class="com.company.pandora.entity.Patient"
view="patientFullViewe">
<datasource id="diagnosDs"
property="diagnos"/>
<datasource id="treatmentDs"
property="treatment">
<datasource id="ear_ratingDs"
property="ear_rating"/>
</datasource>
<datasource id="therapyDs"
property="therapy">
<datasource id="protocolDs"
property="protocol"/>
<datasource id="tc99_scintigraphyDs"
property="tc99_scintigraphy"/>
<datasource id="myelogramDs"
property="myelogram"/>
</datasource>
<datasource id="eventDs"
property="event">
<datasource id="relapseDs"
property="relapse"/>
</datasource>
<datasource id="surgeryDs"
property="surgery"/>
</datasource>
</dsContext>
I create objects in controller:
> @Override
protected void initNewItem(Patient item) { item.setDiagnos(metadata.create(Diagnosis.class)); item.setTherapy(metadata.create(Therapy.class)); item.setSurgery(metadata.create(Surgery.class)); item.setTreatment(metadata.create(TreatmentRating.class)); item.setEvent(metadata.create(Event.class)); item.getEvent().setRelapse(metadata.create(Relapse.class)); item.getTreatment().setEar_rating(metadata.create(EarRating.class)); item.getTherapy().setProtocol(metadata.create(Protocol.class)); item.getTherapy().setTc99_scintigraphy(metadata.create(Tc99Scintigraphy.class)); item.getTherapy().setMyelogram(metadata.create(Myelogram.class)); }
When I click OK, I see the following error: