FlowUI - Query not executed on ViewDescriptor

Hi All (again).
I made a screen where a telephone line number is requested and with that number a screen with the technical data of the line should be opened.
The problem is that the technical data screen (ViewDescriptor vprs-ot-detail-view.xml) shows all the fields empty.
I made a screen called InputLineView.java where the line number is requested. This screen opens the view VprsOtDetailView.java (ViewController) passing it the line number as a parameter and it should show the data with the ViewDescriptor (vprs-ot-detail-view.xml).
The technical data is in the entity VprsOt.
It is as if the section of the ViewDescriptor was not being executed.
Maybe I’m missing something that I can’t detect.
InputLineView.java (1.8 KB)
VprsOtDetailView.java (570 Bytes)
vprs-ot-detail-view.xml (1.8 KB)

TIA

German Turriziani

Hi

Instance container loader in detail view is not intended to work with queries.
If you want to open detail view for some entity you need to explicitly pass this entity to the builder.
So it can look like this in your button handler code (null handling omitted for the entity):

        VprsOt entity = dataManager.load(VprsOt.class)
                .query("select e from VprsOt e where e.otLinea=:nroLinea").parameter("nroLinea", nroLinea)
                .one();

        DialogWindow<VprsOtDetailView> window = dialogWindows
                .detail(this, VprsOt.class)
                .withViewClass(VprsOtDetailView.class)
                .editEntity(entity)
                .build();

Thank you very much @gaslov !!!