cancel
Showing results for 
Search instead for 
Did you mean: 

When DCs refer each other

Former Member
0 Kudos

Hi experts.

Presently I'm facing an interesting issue I'd like to discuss..

So, I have

1) Main DC - let's name it "Doc viewer", it has "Save" and "History" buttons, and ViewContainerUIElement - here we'll put views from other DCs.

2) Child DCs - each stands for particular document type.

The scenario is:

1) To the Main DC the system says "let's display the document #123 of type T",

2) The Mainf DC defines the type of child DC it's have to activy to display type T, and switch to it's View, passing the document # to it.

Here the problem comes:

When I press a button on the Main DC, I'd like to pass the event to the child DC. I can pass events fom used DC to user DC perfectly, but how to pass Event from user DC to used DC???

-


Perhaps the example is too far-fetched, the question simply speaking is how to pas events in used and user DCs BOTH WAYS???

Thanks in advance, WBR

Accepted Solutions (1)

Accepted Solutions (1)

former_member186016
Active Contributor
0 Kudos

Hi,

Recursive dependency between DC are not allowed becuase it will give build problems.It is completly not supported from CE.

About the problem: There is always solution to cycles, my moving the part for which dependency is required to a third location.

Hence for your problem you can do following:

MainDC

MainComponent

Event1

methodToUpdateThe(Event)

ChildDC - dependency to MainDC

ChildComponent - Usage to self and MainComponent

Event2

Event1Handler

Event2Handler which call the method methodToUpdateThe(Event).

Regards,

Ashwani Kr Sharma

Answers (4)

Answers (4)

Former Member
0 Kudos

Andrey,

Right, but to unify the way of communication I think it's nice to use portal events both ways....

thanks for reply

Former Member
0 Kudos

Hi Oleg,

There is no need in event in communication between Main DC and Child DC in case source of interaction is Main DC.

Interface methods of Child can be and should be called in this case.

Event is needed only in case Child whants to initiate some processing in Main component.

Regards,

Andrei.

Former Member
0 Kudos

Eventing works alright within DCs. But if you try to test it directly from nwdi - you'll fail - it seems like not working . In order to make it work - place your app on a portal page. It also works when called from gp

nice technology ::)

Former Member
0 Kudos

Alright, I was thinking about more beautiful solution and came with idea to use WDPortalEventing. The tutorials on the subject say that sending adn receiving application should be on the same page in order to work. But I can't get it working if the sender and receiver is the same application! I have two DCs, both displayed on the same application page, and use WDPortalEventing.fire and WDPortalEventing.subscrive. Doesn't work... Is there restrictions of the technology?... well, keep on trying...