In my Knime routine I’m launching a REST API. This call may take anywhere from 1-15 minutes to complete. What I want to do is deploy a component that will display a “Still Running…” screen while it loops waiting for a signal that the API has completed. Once I receive the signal, I would like the component to finish and move on to the next.
The issue I have is the user has to press the “Next” button in the webportal. Is there anyway to move to the next screen automatically? Or can I disable the “next” button until the signal is received?
Thanks! I just started reading about this last night on how to customize the webportal using the gold miner sample template. Within that documentation I saw all these could be set but these examples will be very useful to get me started. Again thank you.
I searched the webportal documentation and I can’t find any additional information about topics like this enabling and disabling buttons. Is there a reference page somewhere that shows the names of other elements in the portal that are available for customization and actions. For example I’d love to change the contents of one screen field based on a value selected in another. But I can’t see any documentation on events and objects in the server refernce.
Hi,
I am afraid this is currently not documented as it is not really a supported functionality, but more a side product of being able to execute JavaScript in the Generic JavaScript View. I always use the Chrome Developer Tools to find out about element and class names on the KNIME WebPortal.
Kind Regards,
Alexander
Is there any additional code needed or libraries needed? I used a Generic Java Script View with the single line of code to disable the next button as you suggested.
Hi,
this should work, as it is vanilla JavaScript. It might be that the iFrame with the Generic JavaScript View is loaded before the button is inserted into the page and querySelector therefore returns null. What you can maybe try is attach a listener on the load event to the window.top of the Generic Java Script View:
If that does not work, you might have to check if the button itself is also in an iFrame and try something like window.parent.parent.
Kind regards,
Alexander
Your suggestion for looking for the load event worked. However The code does not disable the button. When I look at the web elements its very unusual. They don’t look like typical web buttons.
I created a simple workflow. One node. Two lines of code. Could you look at this and see if you can see what might be the issue? I tried running on different browsers including Chrome, Firefox, IE. No luck.Test NEXT Button disable.knwf (155.2 KB)
to give the button a disabled look. However, clicking on it will still trigger the action. To avoid that, you can set the CSS property “pointer-events” to “none”. When you want to enable the button again, use removeClass(“v-disabled”) and set pointer-events to “auto”.
Kind regards,
Alexander