Skip to content
Snippets Groups Projects
Commit 82298e40 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Continued with the integration of the FlowEditor.

parent 2e29f74e
No related branches found
No related tags found
No related merge requests found
......@@ -615,6 +615,8 @@ public final class CurrentAnalysisEditorBeanV2 {
final RequestContext context = RequestContext.getCurrentInstance();
// Make sure that the graph exists in the first place
context.execute(CurrentAnalysisEditorBeanV2.JS_CMD_INIT_GRAPH);
// Initialize the listener for the clicks on the components
context.execute("graph.addListener(\"onClick\", function(node,info,e){document.getElementById('hiddenNode:clickedNodeID').value = node.id;document.getElementById('hiddenNode:link').click();});");
// Paint all necessary components
this.initializeGraphPlugins();
......@@ -640,6 +642,22 @@ public final class CurrentAnalysisEditorBeanV2 {
// TODO Now the connections between filters and repositories
}
public void setClickedNodeID(final String id) {
System.out.println("clicked: " + id);
}
public String getClickedNodeID() {
return "";
}
public void setClickedNodeType(final String type) {
System.out.println("clicked: " + type);
}
public String getClickedNodeType() {
return "";
}
/**
* This method initializes the modified jit-graph by delivering the necessary javascript commands to paint the repository components.
*/
......
......@@ -36,6 +36,11 @@
<f:ajax event="click" listener="#{currentAnalysisEditorBeanV2.initializeGraph()}" />
</h:commandLink>
</h:form>
<h:form id="hiddenNode" style="display:none">
<h:inputHidden id="clickedNodeID" value="#{currentAnalysisEditorBeanV2.clickedNodeID}"/>
<h:inputHidden id="clickedNodeType" value="#{currentAnalysisEditorBeanV2.clickedNodeType}"/>
<p:commandButton id="link" ajax="true" value="submit"/>
</h:form>
<p:layout id="layout" fullPage="true">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment