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

Minor modifications for CS and FB; Advanced the cockpit editor

parent f49ae785
No related branches found
No related tags found
No related merge requests found
...@@ -320,7 +320,9 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { ...@@ -320,7 +320,9 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener {
+ FSProjectDAOImpl.KAX_EXTENSION); + FSProjectDAOImpl.KAX_EXTENSION);
final File realDstKaxFile = FSProjectDAOImpl.assembleKaxFile(newProjectName); final File realDstKaxFile = FSProjectDAOImpl.assembleKaxFile(newProjectName);
dstKaxFile.renameTo(realDstKaxFile); if (!dstKaxFile.renameTo(realDstKaxFile)) {
throw new IOException("Could not rename KAX file.");
}
this.initializeAvailableComponentsListContainers(newProjectName); this.initializeAvailableComponentsListContainers(newProjectName);
} catch (final IOException ex) { } catch (final IOException ex) {
......
...@@ -280,10 +280,8 @@ public final class CurrentAnalysisEditorBean { ...@@ -280,10 +280,8 @@ public final class CurrentAnalysisEditorBean {
} }
/** /**
* This method tries to save the current project and informs the user about success or fail. * This method tries to save the current project and informs the user about success or fail. There should be two parameters within the request parameter map
* * (layoutString and overwriteNewerProject) as this method is called via javascript.
* @param overwriteNewerProject
* This flag determines whether a newer project should be overwritten.
*/ */
public synchronized void saveProject() { public synchronized void saveProject() {
// Get the parameters // Get the parameters
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package kieker.webgui.web.beans.view; package kieker.webgui.web.beans.view;
import java.io.IOException; import java.io.IOException;
import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -226,6 +227,15 @@ public final class CurrentCockpitEditorBean { ...@@ -226,6 +227,15 @@ public final class CurrentCockpitEditorBean {
return this.project; return this.project;
} }
/**
* This is a dummy method returning just a collection of null objects. This is necessary due to Primefaces.
*
* @return A collection with two null objects.
*/
public synchronized Collection<Object> getProperties() {
return Collections.nCopies(3, null);
}
/** /**
* This method sets the project stored within this bean and returns the new page for the navigation. * This method sets the project stored within this bean and returns the new page for the navigation.
* *
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
</div> </div>
</p:column> </p:column>
<p:column headerText="# Elements"><div align="center">#{viewElem.displayConnectors.size()}</div></p:column> <p:column headerText="# Elements"><div align="center">#{viewElem.displayConnectors.size()}</div></p:column>
<p:column headerText="Description"> <p:column headerText="Description" width="50">
<div align="center"> <div align="center">
<p:inplace id="normalEditor" editor="true" > <p:inplace id="normalEditor" editor="true" >
<p:inputText value="#{viewElem.description}" /> <p:inputText value="#{viewElem.description}" />
...@@ -113,13 +113,19 @@ ...@@ -113,13 +113,19 @@
<!-- This is the component presenting the available properties. --> <!-- This is the component presenting the available properties. -->
<p:layoutUnit style="font-size: 12px" position="south" size="150" header="#{localizedMessages.properties}" resizable="true" collapsible="true"> <p:layoutUnit style="font-size: 12px" position="south" size="150" header="#{localizedMessages.properties}" resizable="true" collapsible="true">
<h:form id="propertiesForm" > <h:form id="propertiesForm" >
<p:dataTable editable="true" var="property" value="[1]" rowIndexVar="rowIndex" emptyMessage="#{localizedMessages.noPropertiesAvailable}" rendered="#{not empty currentCockpitEditorBean.selectedNode}"> <p:dataTable editable="true" var="property" value="#{currentCockpitEditorBean.properties}" rowIndexVar="rowIndex" emptyMessage="#{localizedMessages.noPropertiesAvailable}" rendered="#{not empty currentCockpitEditorBean.selectedNode}">
<p:column headerText="#{localizedMessages.property}" style="width:125px"> <p:column headerText="#{localizedMessages.property}" style="width:125px">
<h:outputText id="nameProperty" value="#{localizedCockpitEditorPageMessages.name}" rendered="#{rowIndex == 0}"/> <h:outputText value="Plugin-Name" rendered="#{rowIndex == 0}"/>
<h:outputText value="Display-Name" rendered="#{rowIndex == 1}"/>
<h:outputText value="#{localizedCockpitEditorPageMessages.name}" rendered="#{rowIndex == 2}"/>
</p:column> </p:column>
<p:column headerText="#{localizedMessages.value}" style="width:125px"> <p:column headerText="#{localizedMessages.value}" style="width:125px">
<h:outputText value="#{currentCockpitEditorBean.selectedNode.name}" /> <h:outputText value="#{currentCockpitEditorBean.selectedNode.display.parent.name}" rendered="#{rowIndex == 0}" />
<h:outputText value="#{currentCockpitEditorBean.selectedNode.display.name}" rendered="#{rowIndex == 1}" />
<p:inplace editor="true" rendered="#{rowIndex == 2}">
<p:inputText value="#{currentCockpitEditorBean.selectedNode.name}"/>
</p:inplace>
</p:column> </p:column>
</p:dataTable> </p:dataTable>
</h:form> </h:form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment