Views custom config file

Hi,

I am trying to create a new views file just for certain entity.
So currently I have the views.xml and it is registered with:
cuba.viewsConfig = +com/company/app-name/views.xml

I want to create a new, ex. person-views.xml and how can I add it in the app.properties?
Would it be something like:
cuba.viewsConfig = +com/company/app-name/views.xml, +com/company/app-name/person-views.xml

Hi,

It should be:

cuba.viewsConfig = +com/company/app-name/views.xml com/company/app-name/person-views.xml

Only one + is required to concatenate this value with the values from app components.

1 Like

Is there a way to show the additional views in the GUI, since I would want to access them from the Cuba Studio?
Or is only the views.xml registered in here?

Hi @zuco_ivan,

The way pointed by @artamonov will be understood by the Studio, so it will show views from all listed files in the cuba.viewsConfig property. Just one additional note, specify this property in both web-app and app.properties.

Regards,
Aleksey

1 Like