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

Modified the updating within the connection dialog.

parent 13371ed9
No related branches found
No related tags found
No related merge requests found
......@@ -7,94 +7,89 @@
xmlns:c="http://java.sun.com/jsp/jstl/core">
<!-- ******************************************************************************** -->
<p:dialog id="connectionDialog" header="Manage Connections" resizable="false"
modal="true" widgetVar="connectionDialog">
<h:form id="connectionDialogForm">
<c:if test="#{not empty selectedMainProjectBean.mainProject}">
<p:commandButton value="Add Connection" ajax="true" action="#{selectedMainProjectBean.addConnection()}" update=":connectionDialogForm"/>
<br/><br/>
<p:dataTable value="#{selectedMainProjectBean.connections}" var="connection" paginator="true" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
<p:column headerText="Source" style="width:125px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{connection.source.name}"/>
</f:facet>
<f:facet name="input">
<h:selectOneMenu converter="kieker.webgui.converter.MIPluginToStringConverter" value="#{connection.source}">
<f:selectItems value="#{selectedMainProjectBean.mainProject.plugins}"
var="plugin"
itemLabel="#{plugin.name}"
itemValue="#{plugin}"/>
<p:ajax event="change" update=":connectionDialogForm"></p:ajax>
</h:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:dialog id="connectionDialog" header="Manage Connections" resizable="false" modal="true" widgetVar="connectionDialog">
<h:form id="connectionDialogForm" rendered="#{not empty selectedMainProjectBean.mainProject}">
<p:commandButton value="Add Connection" ajax="true" action="#{selectedMainProjectBean.addConnection()}" update=":connectionDialogForm"/>
<br/><br/>
<p:dataTable value="#{selectedMainProjectBean.connections}" var="connection" paginator="true" rows="10" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
<p:column headerText="Output Port" style="width: 125px">
<p:cellEditor>
<f:facet name="output" rendered="#{not empty connection.outputPort}">
<h:outputText value="#{connection.outputPort.name}"/>
</f:facet>
<f:facet name="input">
<h:selectOneMenu converter="kieker.webgui.converter.MIPortToStringConverter" value="#{connection.outputPort}">
<f:selectItems value="#{connection.source.outputPorts}"
var="port"
itemLabel="#{port.name}"
itemValue="#{port}"/>
</h:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Source" style="width:125px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{empty connection.source ? 'N/A' : connection.source.name}"/>
</f:facet>
<f:facet name="input">
<p:selectOneMenu converter="kieker.webgui.converter.MIPluginToStringConverter" value="#{connection.source}" effectDuration="100">
<f:selectItem value="#{null}" itemLabel="N/A" itemValue="#{null}"/>
<f:selectItems value="#{selectedMainProjectBean.mainProject.plugins}" var="plugin" itemLabel="#{plugin.name}" itemValue="#{plugin}"/>
<p:ajax event="change" update="validColumn outputPortsList"/>
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Destination" style="width:125px">
<p:cellEditor>
<f:facet name="output" rendered="#{not empty connection.destination}">
<h:outputText value="#{connection.destination.name}"/>
</f:facet>
<f:facet name="input">
<h:selectOneMenu converter="kieker.webgui.converter.MIPluginToStringConverter" value="#{connection.destination}">
<f:selectItems value="#{selectedMainProjectBean.mainProject.plugins}"
var="plugin"
itemLabel="#{plugin.name}"
itemValue="#{plugin}"/>
<p:ajax event="change" update=":connectionDialogForm"></p:ajax>
</h:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Output Port" style="width:125px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{empty connection.outputPort ? 'N/A' : connection.outputPort.name}"/>
</f:facet>
<f:facet name="input">
<h:form id="outputPortsList">
<p:selectOneMenu rendered="#{not empty connection.source}" converter="kieker.webgui.converter.MIPortToStringConverter" value="#{connection.outputPort}" effectDuration="100">
<f:selectItem value="#{null}" itemLabel="N/A" itemValue="#{null}"/>
<f:selectItems value="#{connection.source.outputPorts}" var="port" itemLabel="#{port.name}" itemValue="#{port}"/>
<p:ajax event="change" update="validColumn"/>
</p:selectOneMenu>
</h:form>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Destination" style="width:125px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{empty connection.destination ? 'N/A' : connection.destination.name}"/>
</f:facet>
<f:facet name="input">
<p:selectOneMenu converter="kieker.webgui.converter.MIPluginToStringConverter" value="#{connection.destination}" effectDuration="100">
<f:selectItem value="#{null}" itemLabel="N/A" itemValue="#{null}"/>
<f:selectItems value="#{selectedMainProjectBean.mainProject.plugins}" var="plugin" itemLabel="#{plugin.name}" itemValue="#{plugin}"/>
<p:ajax event="change" update="validColumn inputPortsList"/>
</p:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Input Port" style="width: 125px">
<p:cellEditor>
<f:facet name="output" rendered="#{not empty connection.inputPort}">
<h:outputText value="#{connection.inputPort.name}"/>
</f:facet>
<f:facet name="input">
<h:selectOneMenu converter="kieker.webgui.converter.MIPortToStringConverter" value="#{connection.inputPort}">
<f:selectItems value="#{connection.destination.inputPorts}"
var="port"
itemLabel="#{port.name}"
itemValue="#{port}"/>
</h:selectOneMenu>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Input Port" style="width:125px">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{empty connection.inputPort ? 'N/A' : connection.inputPort.name}"/>
</f:facet>
<f:facet name="input">
<h:form id="inputPortsList">
<p:selectOneMenu rendered="#{not empty connection.destination}" converter="kieker.webgui.converter.MIPortToStringConverter" value="#{connection.inputPort}" effectDuration="100">
<f:selectItem value="#{null}" itemLabel="N/A" itemValue="#{null}"/>
<f:selectItems value="#{connection.destination.inputPorts}" var="port" itemLabel="#{port.name}" itemValue="#{port}"/>
<p:ajax event="change" update="validColumn"/>
</p:selectOneMenu>
</h:form>
</f:facet>
</p:cellEditor>
</p:column>
<p:column headerText="Valid" style="width:50px" >
<h:outputText rendered="#{connection.valid}" value="True"/>
<h:outputText rendered="#{not connection.valid}" value="False"/>
</p:column>
<p:column id="validColumn" headerText="Valid" style="width:50px">
<h:outputText rendered="#{connection.valid}" value="#{connection.valid ? 'True' : 'False'}"/>
</p:column>
<p:column headerText="Options" style="width:50px">
<p:rowEditor />
</p:column>
</p:dataTable>
<br/>
<hr/>
<div style="text-align: right">
<p:commandButton value="Ok" action="#{selectedMainProjectBean.submitConnections()}" oncomplete="connectionDialog.hide();" />
</div>
</c:if>
<p:column headerText="Options" style="width:50px">
<p:rowEditor />
</p:column>
</p:dataTable>
<br/>
<hr/>
<div style="text-align: right">
<p:commandButton value="Ok" action="#{selectedMainProjectBean.submitConnections()}" oncomplete="connectionDialog.hide();" />
</div>
</h:form>
</p:dialog>
<!-- ******************************************************************************** -->
......
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