Hi,
i am trying to create an outbound plug in runtime dynamically, is it possible?
I have found out how to create the outbound plug in wdDoModifyView: "<b>view.getViewInfo().createOutboundPlug()</b>"
but the problem is how do i set the plug name, and how do i create it's navigation link to bind him to an inbound plug in another view.
Thanks,
Carmit
Hi Carmit,
the following code snippet creates a link between a newly created outbound plug (outbound plug name is not really necessary) and an already existing inbound plug:
/* targetViewInfo is the IWDAbstractViewInfo of navigation target srcViewInfo is the IWDAbstractViewInfo of navigation source Find inbound plug, must exist */ IWDInboundPlugInfo targetPlug = targetViewInfo.findInInboundPlugs(inboundPlugName); /* Create outbound plug with "automatic" name */ IWDOutboundPlugInfo srcPlug = srcViewInfo.createOutboundPlug(); /* Create link from out to in */ IWDNavigationTargetReferenceInfo targetReferenceInfo = srcViewUsage.createNavigationTarget(srcPlug.getName(), targetViewUsage, targetPlug.getName()); /* Fire srcPlug somewhere...*/
Hope that helps.
Regards
Stefan
Add a comment