cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to Create dynamic outbound plug and it's navigation link?

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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