I have a situation similar to the entity inheritance sample.
The solution works, as long as the superclass of the entities is not abstract.
The CreateAction creates a new instance based on the datasource of the associated table.
Entity item = dataservice.newInstance(datasource.getMetaClass());
perhaps the instanciation could be delagated to a template method so we can override it.
krivopustov
(Konstantin Krivopustov)
March 19, 2019, 6:53am
#2
It’s possible in the new actions API , would look like:
@Subscribe("customersTable.create")
protected void onCustomersTableCreate(Action.ActionPerformedEvent event) {
Customer customer = // ...
screenBuilders.editor(customersTable)
.newEntity(customer)
.build()
.show();
}
Ok, so I assume this will not be supported in the legacy api?
I have made multiple attempts at migrating and even starting v7 applications but always run into issues. Because of this I had to downgrade.
I would love to go to v7 but it seems the platform is not stable enough yet.
krivopustov
(Konstantin Krivopustov)
March 20, 2019, 10:22am
#4
We wouldn’t like to touch the legacy API if there is a workaround for solving an issue. As I understand, the problem you faced is specific just to some point in your app, so you could for example just create a copy of the CreateAction and fix it locally.
krivopustov
(Konstantin Krivopustov)
March 20, 2019, 2:50pm
#5
As there is one more independent vote for the feature, I’ve created issue .