Hello! I ahve a question. I try to create a custom node with WebDriver object type on output port. But I receivedCaused by: java.lang.IllegalArgumentException: No renderer available Any suggestions?
..
I solve this.
Hello, i also have the same issue when trying to load new Type, can you tell me how you fix your issue?. Thanks in advance.
Hi,
So you should implement a renderer class for your custom type (java class that will be extended fromimport org.knime.core.data.renderer.DefaultDataValueRenderer;)
public final class MyCustomValueRenderer extends DefaultDataValueRenderer {
protected void setValue(Object value) {
Object newValue = value;
if (value instanceof MyCustomValue) {
newValue = value.toString();
}
super.setValue(newValue);
}
public static final class MyCustomValueRendererFactory
extends AbstractDataValueRendererFactory {
public String getDescription() {
return "MyCustomValue";
}
public DataValueRenderer createRenderer(DataColumnSpec colSpec) {
return new MyCustomValueRenderer ();
}
}
}
and register this class in plugin.xml
<extension
point="org.knime.core.DataValueRenderer">
<dataValue
valueClass="mypackage.com.MyCustomValue">
<renderer
rendererFactoryClass="mypackage.com.MyCustomValueRenderer$MyCustomValueRendererFactory"
suggestAsDefault="true">
</renderer>
</dataValue>
</extension>
That's all!