Hi,
I am playing with the entity-inheritance sample to try a couple of things.
I have created a Browse screen for the Customers. I am adding a BeforeActionPerformedHandler to the Edit Action. What I want to do is check what Customer they have selected and open the appropriate screen if it is a Company or a Person. This seems like a logical thing to want to do.
As the Discriminator column is called DTYPE in the example I was hoping I could do something like the following.
customersTableEdit.setBeforeActionPerformedHandler(new Action.BeforeActionPerformedHandler() {
@Override
public boolean beforeActionPerformed() {
String discriminator = customersTable.getSingleSelected().getDType();
return false;
}
});
I can’t seem to find a way to get the Discriminator value anywhere. I’ve tried a couple of things like a transient column and read only columns of the same name but these mess CUBA up.
I’m sure you guys at CUBA have got something hidden away I can find.
Any help greatly appreciated.