New Interactive node

Hi, 

I am developing an Interactive view for a node, took as an example Bland-Altman plot. The problem is, that I can't find a place responsible for creating Interactive view for the node. How can I activate it? In all interactive views it is under "Encapsulate into a Wrapped Metanode", I thought if my node extends AbstractSVGWizardNodeModel then I will have this option avaliable, but looks like I am missing something. 

Thank you in advance. 

The "Encapsulate into a Wrapped Metanode" allows the interactive view visualization within the web portal, and it is not necessary if you only want to use interactive views in a KNIME client application.

In order to "enable" your node to interactive views, beyond having the node model to implement the WizardNode interface (such as extending AbstractSVGWizardNodeModel), it is also necessary to add the interactiveView tag in the NodeFactory.xml file of your node, like in this snippet

<interactiveView name="your interactive view name">
    Your interactive view description
</interactiveView>   

Furthermore, as your node will probably include some javascript/css files , they have to be defined as resources, by using webResourceBundle tags in the org.knime.js.core.webResources extension point of plugin.xml.

Finally, you need to declare the "entry point" of your javascript code, by using the  javascriptComponent tag of org.knime.js.core.javascriptComponents extension point of plugin.xml.

Please note that you should consider to add a "getSVG" method in your javascript class, required by AbstractSVGWizardNodeModel to export the web view in SVG.

The WizardNode interface needs 2 JSONViewContent classes to be created: one holding the view representation data and the other holding the view value data. .
These classes are JSON-serialized and passed as parameters to the javascript entry point function (the init method).
The view value class is then passed-back to the node and deserialized to store in the settings the values changed by the user in the view.

PS: KNIME has also added the somewhat 'dynamic' JS nodes infrastructure which should allow a more simple and quick development of interactive nodes, but I haven't looked at them so far, so I don't know how they work.

 


 

Hi, 

thank you so much! It helped. I forgot about plugin.xml, all problems were there with Extentions. 

Dynamic JS views are much more comfortable to work with, but in my case I needed to use the scheme of extending the AbstractSVGWizardNodeModel

Best regards, 

Anastasia

Can you please provide me step by step guide about how to develop custom node in javascript?