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);
}
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);
}
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"));
}
Aggregations