Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8368

Re: How to delete WD component usage?

$
0
0

Hello Jun.

 

 

I tried to use createComponent in this way:

unitUsage = wdThis.wdGetGenericSHComponentUsage();
unitUsage.createComponent();
IExternalGenericSHInterface intrfcUM = (IExternalGenericSHInterface)unitUsage.getInterfaceController()     .wdCastTo(IExternalGenericSHInterface.class);
IWDOVSContextNotificationListener listenerUM = intrfcUM.getListener(unitOVS);
WDValueServices.addOVSExtension(IPrivateIndexView.IIndexRecordElement.UNIT_MEASURE_TXT_SHORT,     new IWDAttributeInfo[]{nodeIndInfo.getAttribute(IPrivateIndexView.IIndexRecordElement.UNIT_MEASURE_TXT_SHORT)},     intrfcUM.getInputNode(),     intrfcUM.getOutputNode(),     listenerUM);
IWDComponentUsage phdWrkKndUsage = wdThis.wdGetGenericSHComponentUsage();
phdWrkKndUsage.createComponent();
IExternalGenericSHInterface intrfc = (IExternalGenericSHInterface)phdWrkKndUsage.getInterfaceController()     .wdCastTo(IExternalGenericSHInterface.class);
IWDOVSContextNotificationListener listener = intrfc.getListener(myOVSListener);
WDValueServices.addOVSExtension(IPrivateIndexView.IWorkKindsElement.WORK_KIND,     new IWDAttributeInfo[]{phdWrkKndInfo.getAttribute(IPrivateIndexView.IWorkKindsElement.WORK_KIND)},     intrfc.getInputNode(),     intrfc.getOutputNode(),     listener);

This method called everytime when ScreenView is called.

On the exit from ScreenView I try to delete usage:

if(phdWrkKndUsage != null){     phdWrkKndUsage.deleteComponent();
}
if(unitUsage != null){
unitUsage.deleteComponent();
}

(phdWorkKndUsage and unitUsage  are attributes of the ScreenView Comp Controller).

 

When I try to call ScreenView I'm faced with this exception:

ComponentUsage(com.acme.view.indexes.wd.comp.indexview.IndexView:GenericSH, createOnDemand=false, childComponent=com.acme.wd.searches.comps.genericsh.GenericSH): No active component must exist when creating a component.

This exception throwed at the line with phdWrkKndUsage.createComponent();

 

 

Thanks and regards

Lev

 

Message was edited by: Lev Kulaev Found an error in the previous version of the message.


Viewing all articles
Browse latest Browse all 8368

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>