Search in sources :

Example 1 with WizardPageContent

use of org.knime.core.node.workflow.WebResourceController.WizardPageContent in project knime-core by knime.

the class SinglePageManager method createWizardPage.

/**
 * Creates a wizard page object from a given node id
 *
 * @param containerNodeID the node id to create the wizard page for
 * @return a {@link JSONWebNodePage} object which can be used for serialization
 * @throws IOException if the layout of the wizard page can not be generated
 */
public JSONWebNodePage createWizardPage(final NodeID containerNodeID) throws IOException {
    SinglePageWebResourceController sec = getController(containerNodeID);
    WizardPageContent page = sec.getWizardPage();
    return createWizardPageInternal(page);
}
Also used : SinglePageWebResourceController(org.knime.core.node.workflow.SinglePageWebResourceController) WizardPageContent(org.knime.core.node.workflow.WebResourceController.WizardPageContent)

Example 2 with WizardPageContent

use of org.knime.core.node.workflow.WebResourceController.WizardPageContent in project knime-core by knime.

the class WizardPageManager method createCurrentWizardPage.

/**
 * Creates a wizard page for the current subnode in wizard execution
 * @return a {@link JSONWebNodePage} object which can be used for serialization
 * @throws IOException if the layout of the wizard page can not be generated
 */
public JSONWebNodePage createCurrentWizardPage() throws IOException {
    WizardExecutionController wec = getWizardExecutionController();
    WizardPageContent page = wec.getCurrentWizardPage();
    return createWizardPageInternal(page);
}
Also used : WizardExecutionController(org.knime.core.node.workflow.WizardExecutionController) WizardPageContent(org.knime.core.node.workflow.WebResourceController.WizardPageContent)

Example 3 with WizardPageContent

use of org.knime.core.node.workflow.WebResourceController.WizardPageContent in project knime-core by knime.

the class TestSubnodeView method testExecuteAndCreateSubnodeView.

/**
 * Simple test if a combined view can succesfully be created and contains the layout and expected nodes for display
 * @throws Exception
 */
@Test
public void testExecuteAndCreateSubnodeView() throws Exception {
    initialExecute();
    SinglePageWebResourceController spc = new SinglePageWebResourceController(getManager(), m_subnodeID);
    assertTrue("Should have subnode view", spc.isSubnodeViewAvailable());
    WizardPageContent page = spc.getWizardPage();
    assertNotNull("Page content should be available", page);
    @SuppressWarnings("rawtypes") Map<NodeIDSuffix, WizardNode> pageMap = page.getPageMap();
    assertNotNull("Page map should be available", pageMap);
    assertEquals("Page should contain three nodes", 3, pageMap.size());
    String layout = page.getLayoutInfo();
    assertNotNull("Page layout should be available", layout);
    assertTrue("Layout should contain test string", layout.contains("testString"));
}
Also used : NodeIDSuffix(org.knime.core.node.workflow.NodeID.NodeIDSuffix) WizardNode(org.knime.core.node.wizard.WizardNode) WizardPageContent(org.knime.core.node.workflow.WebResourceController.WizardPageContent) Test(org.junit.Test)

Aggregations

WizardPageContent (org.knime.core.node.workflow.WebResourceController.WizardPageContent)3 Test (org.junit.Test)1 WizardNode (org.knime.core.node.wizard.WizardNode)1 NodeIDSuffix (org.knime.core.node.workflow.NodeID.NodeIDSuffix)1 SinglePageWebResourceController (org.knime.core.node.workflow.SinglePageWebResourceController)1 WizardExecutionController (org.knime.core.node.workflow.WizardExecutionController)1