Hi Everyone,
I have an entity A which is master and enity B which is attribute of entity A which has composition relation with master(Similar to order and orderlines).
In the Master entity Editor screen when i click on a “submit button” i will have to create programmatically entity B and add it to a table.
I am not able to get the updated view of the table after clicking “Submit button”.
I am using collectionpropertycontainer as a datacontainer for table and the property is set accordingly.
Below is my code snippet for button submit action:
public void onBtnsubmitClick() {
entityB stchng = dataCnxt.create(entityB.class);
stchng.setSubmissionId(sub);
stchng.setStatus("Success");
stchng.setResult("Submitted");
entityBDc.getMutableItems().add(stchng);
entityBDc.setItem(stchng);
dataCnxt.addPreCommitListener((context -> {
context.getModifiedInstances().add(stchng);
}));
}
Please help me in resolving the issue.
Thanks in advance for the help.