diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBeanV2.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBeanV2.java index f0a92869ede8d54388bf3d990703465468426d81..9815160c6aaa54c08244b020ad72f343ba983564 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBeanV2.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentAnalysisEditorBeanV2.java @@ -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. */ diff --git a/Kieker.WebGUI/src/main/webapp/AnalysisEditor_V2.xhtml b/Kieker.WebGUI/src/main/webapp/AnalysisEditor_V2.xhtml index 6761853592a4ca0db3092348c18f593d2ddf4953..b999aa2833c9dd041e91967eb52d4dfd6b7e850d 100644 --- a/Kieker.WebGUI/src/main/webapp/AnalysisEditor_V2.xhtml +++ b/Kieker.WebGUI/src/main/webapp/AnalysisEditor_V2.xhtml @@ -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">