Make message key in application menu configurable

Instead of generated screens for each entity I want to implement a more generic approach: A generic browse screen should receive the entity meta class as parameter and display a generic table. E.g.: Instead of myapp$Vehicle.browse the screen GenericBrowser?entiyMetaClass=myapp$Vehicle should be called.

In the configurable application menu (web-menu.xml) its possible to add the generic screen and edit the params. But its currently not possible to edit the message key. It is fix set to menu-config.. Could it be possible to edit the message key?

Hi Stefan,

not a direct answer to your question, but anyways: Did you know there is already a generic entity screen? (Administration > Entity Inspector). Either it might be that you can use this one, or at least look at the source code to have a good starting point on how to implement this one… Just as a note.

Bye
Mario

Hi David,
thanks a lot for your hint. Thats the direction I want to go, but make the generic edit and browse screens a bit nicer (e.g. display the related collections in tabs on the entity editor page). I think for many entities the generic approach is sufficient and it would be great if CUBA would support it besides the screen generation approach.

Ideas: A default browse and edit view could be defined for each entity in CUBA studio. These default views are used by the generic screen. At same time it should be possible to order the attributes in a view to determine the column order in the generic screen.

Ah, sorry. I found out the solution: In screens.xml it is possible to assign multiple ScreenIds to a single generic template. Also params that are passed to the template can be defined.
So its not necessary to modify ScreenIds in the application menu, just the screens.xml need to be modified.

display the related collections in tabs on the entity editor page

I think this is a good idea, we’ll certainly consider it.