Java Snippet on Server

Hi everyone,

When I use Java Snippet node for showing a pop up message, it works in Analytics Platform. But, when I run this workflow on knime server the pop up screen does not open like doesn’t exists. Can anyone have idea?

Best,

Hi @KKERROXXX . Are you by chance using JOptionPane from within Java Snippet to show a popup dialog? If so, JOptionPane is part of the Java Swing UI framework, which in this scenario only works on the KNIME desktop client, not in a web browser such as in the KNIME web portal.

2 Likes

Hi @dnaki,

Thank you for the quick response. Yes, I use JOptionPane within Java Snippet. I wonder that Is there an another solution to show up a popup message on KNIME Server?

Best,

Hi @KKERROXXX

there is a KNIME way of doing this: Components!
You can set up components with multiple interactive views and widgets.
Here is the documentation KNIME Components Guide and a short how-to video on youtube.

These offer easy to build, yet very powerful data visualizations, that can also be shared and reused :slight_smile:

Kind regards
Marvin

2 Likes

Hello Marvin,
would that mean that its not possible to implement method #4 from this forum entry on the server with a popup when executing the workflow?

That would be great if that would work.

BR
Cornelius

Hi @enr0c , the popup that you are referring to in the other thread can be implemented on the server, however, this popup only works on the back-end (that is via Knime AP), not on the front-end (web portal).

For front-end, you can use interactive nodes

1 Like

Hi Cornelius (@enr0c),

it is as @bruno29a says. Plain Java views won’t be shown in the WebPortal. There, you can use the blue visualization nodes and combine them into components in order to create a page on the WebPortal (one page per component). More details on the WebPortal can be found here: KNIME WebPortal User Guide

Note that we offer a generic JavaScript view node that can be used to code your own visualizations (see also examples on the hub):

Kind regards
Marvin

ps. if you want to use custom CSS code, see also CSS Styling for JavaScript Views and Widget/Quickform Nodes (Legacy).

2 Likes

Many thanks @marvin.kickuth
We have designed a solution using JavaScript view node including CSS.
Works just fine.
Thank you

1 Like