dataLoadCoordinator pass parameter to loader on onContainerItemChanged from collection value Object

Hi Team ,

Can you guide me how to pass parameter using dataLoadCoordinator to another dataLoader on onContainerItemChanged

Sample
Consider CProject collection which will be loaded on beforeShowEvent

And Another StoreStock collection which has reference to Project store value object

I want to pass project store to collection StoreStock to be refresh

 <loader id="cProjectsDl">
   <query>
         <![CDATA[select e from CProject e order by e.code asc , e.name asc]]>
   </query>
<loader id="storesStocksDl">
      <query>
          <![CDATA[select e from vtower_MainStoreStock e  where e.store =:store order by e.costItem.code asc , e.costItem.description asc]]>
      </query>

store parameter is value object inside Project class

Thanks

DataLoadCoordinator does not support traversing of object graphs, so you can use only the Project entity itself as a parameter value.
In case you need a property, add a ItemChangeEvent listener to the projects container and reload storesStocksDl after setting its parameter programmatically.

Regards,
Konstantin

1 Like

Thanks @knstvk ,

This is the same approach we are following , I think it may be good feature to be implemented