In the second case column functionality will be limited if there is no corresponding attribute in an entity, for example it will be non sortable and grouping of such a column is not supported. But in generated columns you can use UI context and values entered by user in UI:
Still referring to the example in the quick start part 4, I was trying to @Inject CollectionDatasource for Order entity but in the init method is null, even though I do not understand why …
However, if I want to calculate in browserOrder the total order for each row in the table, which depends on the sum of the order lines, how would you do?
Be patient, I am at the beginning and a little confused.
I’ve checked quick start part 4 and everything works as expected. Could you please attach small demo project where you have null CollectionDatasource in the init method?
In case of simple calculation of totals I would use simple meta property with one getter method defined in an Entity class, because I will be able to use this logic in all my screens and services and this formula is small enough to not extract it to a separate class/service.
I was able to calculate the total I requested to you, both with my java class, either with a ServiceBean by different methods, both with EntityManager, either with DataManager, both using getLines of the Order entity.
I am very satisfied and I am continuing to study your documentation.