JPQL :param functionality in v7?

I am translating a v6 application to v7. I have a screen with this dsContext:

<dsContext>
	<collectionDatasource id="offerCostsDs"
			      class="com.paslists.rade.entity.OfferCost"
			      view="offerCost-view">
		<query>
			<![CDATA[select e from rade$OfferCost e
where e.offer.id = :param$offer.id]]>
		</query>
	</collectionDatasource>
</dsContext>

With this code to open the screen:

openWindow("rade$OfferCost.browse",
		WindowManager.OpenType.DIALOG,
		ParamsMap.of("offer", offersDs.getItem() )
);

How do I do the same thing with a v7 screen definition?

1 Like

We’ve just added an example to the docs, please check it out: Using Screen Parameters in Loaders.

Perfect! Thank you very much.

Out of interest, what is the preferred way of linking together two tables, such as order and orderliness, so that clicking on an order in the first table automatically loads the corresponding lines in the second table?

For a composition, when you load OrderLines together with Order by defining an appropriate view, use property containers.

Otherwise, the common approach is to use loader parameters as described in Dependencies Between Data Components. It can be made more declarative and less verbose with the help of a screen mixin, see an example here.