Also ,if the user saves the page after browsing DCR in first component,then DCR path is available as ext attribute for the page.Then LSCS queries could be utilized to retrieve the DCR path value and leverage it for the second component.
One of the ways we could think of is getting the DCR path value in first component external and setting it in page scope.Then retrieving it in the external of the second component.Also we can save the dcr path in another lookup kind of a DCR with name value pairs- page-id/page-name against the DCR path and leverage this information in the second component.
If I read this right, you're saying SitePub will automatically create a dependency on the selected DCR in component1, so you want to push that information to LSCS and have component2 read that value to know the DCR that was selected?Yes, this could work but the edge cases worry me. What happens if component1 isn't on the page? What happens if you have a second instance of component2 -- should it also load the same DCR? What happens if you have two instances of component1, or any other component that also requires a DCR -- how will component2 know which DCR dependency to use?Maybe you can control the edge cases by "guaranteeing" that you'll always have exactly those two components on a page together (e.g. via the use of a Template perhaps), or maybe the edge cases are limited by your actual business scenario.. in any case, this implementation strategy is easily 'breakable' so make sure to properly document it, lest another developer come along 6mo from now and attempt to make it do something it can't.