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

Changed the scope of the most beans from session to view.

parent 1df5ffdf
No related branches found
No related tags found
No related merge requests found
Showing
with 106 additions and 159 deletions
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.beans;
/**
* This is the interface for beans which can be used to navigate from one page to another.
*
* @author Nils Christian Ehmke
* @version 1.0
*/
public interface IProjectBean {
/**
* This method should clear the bean.
*
* @return The next page.
*/
public String clearProject();
/**
* This method should deliver the current project name within the bean.
*
* @return The project name.
*/
public String getProjectName();
/**
* This method should set the new project of the bean.
*
* @param name
* The new project name.
* @return The next page.
*/
public String setProject(final String name);
}
......@@ -34,7 +34,7 @@ import java.util.Map;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
......@@ -60,7 +60,6 @@ import kieker.common.configuration.Configuration;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.monitoring.core.registry.Registry;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ConnectionFilterToFilter;
import kieker.webgui.common.ConnectionFilterToRepository;
......@@ -87,8 +86,8 @@ import org.eclipse.emf.ecore.EObject;
* @version 1.0
*/
@ManagedBean
@SessionScoped
public final class CurrentAnalysisEditorBean implements IProjectBean {
@ViewScoped
public final class CurrentAnalysisEditorBean {
/**
* This is the log for errors, exceptions etc.
*/
......@@ -182,8 +181,7 @@ public final class CurrentAnalysisEditorBean implements IProjectBean {
* The name of the project.
* @return The name of the page for the project work space, if the project has been accepted, '' if it is null.
*/
@Override
public String setProject(final String newName) {
public void setProjectName(final String newName) {
synchronized (this) {
// Remember the given parameters
this.project = ProjectsBean.getInstance().openProject(newName);
......@@ -202,15 +200,6 @@ public final class CurrentAnalysisEditorBean implements IProjectBean {
// Load the hashmaps to get the plugins and ports
this.intializeHashMaps();
}
// Now deliver the correct navigation page
final String navigationPage;
if (this.project != null) {
navigationPage = Global.PAGE_PROJECT_WORK_SPACE;
} else {
navigationPage = "";
}
return navigationPage;
}
}
......@@ -397,7 +386,6 @@ public final class CurrentAnalysisEditorBean implements IProjectBean {
*
* @return The project name for this user.
*/
@Override
public String getProjectName() {
synchronized (this) {
return this.projectName;
......@@ -420,7 +408,6 @@ public final class CurrentAnalysisEditorBean implements IProjectBean {
*
* @return The name of the page of the project overview.
*/
@Override
public String clearProject() {
synchronized (this) {
this.project = null; // NOPMD
......
......@@ -21,7 +21,7 @@
package kieker.webgui.beans.session;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import kieker.analysis.display.AbstractDisplay;
import kieker.analysis.display.HtmlText;
......@@ -29,7 +29,6 @@ import kieker.analysis.display.Image;
import kieker.analysis.display.PlainText;
import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIView;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ACManager;
import kieker.webgui.common.Global;
......@@ -41,8 +40,8 @@ import kieker.webgui.common.Global;
* @version 1.0
*/
@ManagedBean
@SessionScoped
public class CurrentCockpitBean implements IProjectBean {
@ViewScoped
public class CurrentCockpitBean {
/**
* This is the name of the stored project. It can be used as an identifier within the FS-Manager
......@@ -82,21 +81,11 @@ public class CurrentCockpitBean implements IProjectBean {
* The name of the project.
* @return The name of the page for the cockpit.
*/
@Override
public String setProject(final String newName) {
public void setProjectName(final String newName) {
synchronized (this) {
// Remember the given parameters
this.project = ProjectsBean.getInstance().openProject(newName);
this.projectName = newName;
// Now deliver the correct navigation page
final String navigationPage;
if (this.project != null) {
navigationPage = Global.PAGE_ANALYSIS_COCKPIT;
} else {
navigationPage = "";
}
return navigationPage;
}
}
......@@ -105,7 +94,6 @@ public class CurrentCockpitBean implements IProjectBean {
*
* @return The project name for this user.
*/
@Override
public String getProjectName() {
synchronized (this) {
return this.projectName;
......@@ -223,7 +211,6 @@ public class CurrentCockpitBean implements IProjectBean {
*
* @return The name of the page of the project overview.
*/
@Override
public String clearProject() {
synchronized (this) {
this.projectName = null; // NOPMD
......
......@@ -29,7 +29,7 @@ import java.util.UUID;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.component.UIComponent;
import javax.faces.component.UIInput;
import javax.faces.context.FacesContext;
......@@ -44,7 +44,6 @@ import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
import kieker.analysis.plugin.AbstractPlugin;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.FSManager;
import kieker.webgui.common.Global;
......@@ -60,8 +59,8 @@ import org.primefaces.event.TabChangeEvent;
* @version 1.0
*/
@ManagedBean
@SessionScoped
public class CurrentCockpitEditorBean implements IProjectBean {
@ViewScoped
public class CurrentCockpitEditorBean {
/**
* This is the log for errors, exceptions etc.
*/
......@@ -112,8 +111,7 @@ public class CurrentCockpitEditorBean implements IProjectBean {
* The name of the project.
* @return The name of the page for the analysis view work space.
*/
@Override
public String setProject(final String newName) {
public void setProjectName(final String newName) {
synchronized (this) {
// Remember the given parameters
this.project = ProjectsBean.getInstance().openProject(newName);
......@@ -123,14 +121,6 @@ public class CurrentCockpitEditorBean implements IProjectBean {
// Remember the current time! This is important for the later comparison of the time stamps.
this.resetTimeStamp();
}
// Now deliver the correct navigation page
final String navigationPage;
if (this.project != null) {
navigationPage = Global.PAGE_ANALYSIS_VIEW_WORK_SPACE;
} else {
navigationPage = "";
}
return navigationPage;
}
}
......@@ -139,7 +129,6 @@ public class CurrentCockpitEditorBean implements IProjectBean {
*
* @return The project name for this user.
*/
@Override
public String getProjectName() {
synchronized (this) {
return this.projectName;
......@@ -151,7 +140,6 @@ public class CurrentCockpitEditorBean implements IProjectBean {
*
* @return The name of the page of the project overview.
*/
@Override
public String clearProject() {
synchronized (this) {
this.projectName = null; // NOPMD
......
......@@ -25,7 +25,7 @@ import java.io.IOException;
import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.faces.context.FacesContext;
import kieker.analysis.AnalysisController;
......@@ -33,7 +33,6 @@ import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.webgui.beans.IProjectBean;
import kieker.webgui.beans.application.ProjectsBean;
import kieker.webgui.common.ACManager;
import kieker.webgui.common.Global;
......@@ -49,8 +48,8 @@ import kieker.webgui.common.exception.ProjectStillRunningException;
* @version 1.0
*/
@ManagedBean
@SessionScoped
public class CurrentControllerBean implements IProjectBean {
@ViewScoped
public class CurrentControllerBean {
/**
* This is the log for errors, exceptions etc.
*/
......@@ -78,21 +77,11 @@ public class CurrentControllerBean implements IProjectBean {
* The name of the project.
* @return The name of the page for the cockpit.
*/
@Override
public String setProject(final String newName) {
public void setProjectName(final String newName) {
synchronized (this) {
// Remember the given parameters
this.project = ProjectsBean.getInstance().openProject(newName);
this.projectName = newName;
// Now deliver the correct navigation page
final String navigationPage;
if (this.project != null) {
navigationPage = Global.PAGE_ANALYSIS_CONTROLLER;
} else {
navigationPage = "";
}
return navigationPage;
}
}
......@@ -112,7 +101,6 @@ public class CurrentControllerBean implements IProjectBean {
*
* @return The project name for this user.
*/
@Override
public String getProjectName() {
synchronized (this) {
return this.projectName;
......@@ -124,7 +112,6 @@ public class CurrentControllerBean implements IProjectBean {
*
* @return The name of the page of the project overview.
*/
@Override
public String clearProject() {
synchronized (this) {
this.projectName = null; // NOPMD
......
......@@ -7,6 +7,10 @@
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:metadata>
<f:viewParam name="projectName" value="#{currentAnalysisEditorBean.projectName}"/>
</f:metadata>
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../css/Common.css" />
......@@ -32,14 +36,20 @@
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentAnalysisEditorBean.clearProject()}" />
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true" ajax="false"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentControllerBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" disabled="true"/>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" outcome="Controller.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBean.projectName}" />
</p:button>
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentAnalysisEditorBean, currentCockpitBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" outcome="CockpitEditor.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" outcome="Cockpit.xhtml">
<f:param name="projectName" value="#{currentAnalysisEditorBean.projectName}" />
</p:button>
</p:toolbarGroup>
</p:toolbar>
......
......@@ -7,6 +7,10 @@
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:metadata>
<f:viewParam name="projectName" value="#{currentCockpitBean.projectName}"/>
</f:metadata>
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../css/Common.css" />
......@@ -22,16 +26,23 @@
<h:form>
<p:toolbar>
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentCockpitBean.projectName, 30)}"/>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentCockpitBean.clearProject()}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentControllerBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" outcome="AnalysisEditor.xhtml">
<f:param name="projectName" value="#{currentCockpitBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" outcome="Controller.xhtml">
<f:param name="projectName" value="#{currentCockpitBean.projectName}" />
</p:button>
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentCockpitBean,currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" disabled="true" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" outcome="CockpitEditor.xhtml">
<f:param name="projectName" value="#{currentCockpitBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" disabled="true">
</p:button>
</p:toolbarGroup>
</p:toolbar>
<p:menubar>
......
......@@ -7,6 +7,10 @@
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:metadata>
<f:viewParam name="projectName" value="#{currentCockpitEditorBean.projectName}"/>
</f:metadata>
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../css/Common.css" />
......@@ -20,16 +24,23 @@
<h:form>
<p:toolbar>
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentCockpitEditorBean.projectName, 30)}"/>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentCockpitEditorBean.clearProject()}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentControllerBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" outcome="AnalysisEditor.xhtml">
<f:param name="projectName" value="#{currentCockpitEditorBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" outcome="Controller.xhtml">
<f:param name="projectName" value="#{currentCockpitEditorBean.projectName}" />
</p:button>
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" disabled="true" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentCockpitEditorBean, currentCockpitBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" disabled="true">
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" outcome="Cockpit.xhtml">
<f:param name="projectName" value="#{currentCockpitEditorBean.projectName}" />
</p:button>
</p:toolbarGroup>
</p:toolbar>
<p:menubar>
......
......@@ -7,6 +7,10 @@
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<f:metadata>
<f:viewParam name="projectName" value="#{currentControllerBean.projectName}"/>
</f:metadata>
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../css/Common.css" />
......@@ -22,16 +26,23 @@
<h:form>
<p:toolbar>
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentAnalysisEditorBean.projectName, 30)}"/>
<h:outputText styleClass="kieker-title" value="Kieker &raquo; #{stringBean.shortenLongName(currentControllerBean.projectName, 30)}"/>
</p:toolbarGroup>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="#{currentControllerBean.clearProject()}"/>
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" action="ProjectOverview.xhtml" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentAnalysisEditorBean)}"/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" disabled="true" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentCockpitEditorBean)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{forwardBean.forward(currentControllerBean, currentCockpitBean)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" outcome="AnalysisEditor.xhtml">
<f:param name="projectName" value="#{currentControllerBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" disabled="true">
</p:button>
<p:separator/>
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" outcome="CockpitEditor.xhtml">
<f:param name="projectName" value="#{currentControllerBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" outcome="Cockpit.xhtml">
<f:param name="projectName" value="#{currentControllerBean.projectName}" />
</p:button>
</p:toolbarGroup>
</p:toolbar>
......
......@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>Kieker.WebGUI</title>
<link rel="stylesheet" type="text/css" href="../css/Common.css" />
......
......@@ -3,7 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Kieker.WebGUI</title>
......@@ -14,7 +15,7 @@
<h:body>
<p:layout fullPage="true">
<p:layoutUnit position="north">
<h:form>
<h:form id="menuForm">
<p:toolbar>
<p:toolbarGroup align="left">
<h:outputText styleClass="kieker-title" value="Kieker"/>
......@@ -22,11 +23,19 @@
<p:toolbarGroup align="right">
<p:commandButton styleClass="perspective-button" icon="ui-icon-home" disabled="true" action="ProjectOverview.xhtml" />
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" ajax="false" action="#{currentAnalysisEditorBean.setProject(currentProjectOverviewBean.projectName)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" ajax="false" action="#{currentControllerBean.setProject(currentProjectOverviewBean.projectName)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Analysis Editor" style="white-space: none" outcome="AnalysisEditor.xhtml">
<f:param name="projectName" value="#{currentProjectOverviewBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-circle-triangle-e" value="Analysis" style="white-space: none" outcome="Controller.xhtml">
<f:param name="projectName" value="#{currentProjectOverviewBean.projectName}" />
</p:button>
<p:separator/>
<p:commandButton styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(currentProjectOverviewBean.projectName)}" />
<p:commandButton styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" ajax="false" action="#{currentCockpitBean.setProject(currentProjectOverviewBean.projectName)}" />
<p:button styleClass="perspective-button" icon="ui-icon-wrench" value="Cockpit Editor" style="white-space: none" outcome="CockpitEditor.xhtml">
<f:param name="projectName" value="#{currentProjectOverviewBean.projectName}" />
</p:button>
<p:button styleClass="perspective-button" icon="ui-icon-image" value="Cockpit" style="white-space: none" outcome="Cockpit.xhtml">
<f:param name="projectName" value="#{currentProjectOverviewBean.projectName}" />
</p:button>
</p:toolbarGroup>
</p:toolbar>
......@@ -56,18 +65,18 @@
<h:form id="projectsListForm">
<p:dataTable rows="15" paginator="true" paginatorPosition="both" var="project" rowsPerPageTemplate="5,10,15,25,50" value="#{currentProjectOverviewBean.projects}" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" selection="#{currentProjectOverviewBean.projectName}" rowKey="#{project}" selectionMode="single">
<!-- Makes sure that rows are selected instantaneously. -->
<p:ajax event="rowSelect" listener="#{currentProjectOverviewBean.onRowSelect}" />
<p:ajax event="rowSelect" listener="#{currentProjectOverviewBean.onRowSelect}" update=":menuForm" />
<p:column headerText="Project Name" id="modelHeader" sortBy="#{project}">
<p:commandLink id="dynaButton" value="#{project}"/>
<p:menu overlay="true" trigger="dynaButton" my="left top" at="left bottom" style="width:210px">
<p:menuitem icon="ui-icon-wrench" id="openButton" value=" Analysis Editor" styleClass="element-with-whitespace" ajax="false" action="#{currentAnalysisEditorBean.setProject(project)}"/>
<p:menuitem icon="ui-icon-circle-triangle-e" id="controlAnalysis" styleClass="element-with-whitespace" value=" Analysis" ajax="false" action="#{currentControllerBean.setProject(project)}" />
<p:menuitem icon="ui-icon-wrench" id="openButton" value=" Analysis Editor" styleClass="element-with-whitespace" ajax="false" url="analysisEditor?projectName=#{project}"/>
<p:menuitem icon="ui-icon-circle-triangle-e" id="controlAnalysis" styleClass="element-with-whitespace" value=" Analysis" ajax="false" url="controller?projectName=#{project}" />
<p:separator/>
<p:menuitem icon="ui-icon-wrench" id="editAnalysisViews" styleClass="element-with-whitespace" value=" Cockpit Editor" ajax="false" action="#{currentCockpitEditorBean.setProject(project)}" />
<p:menuitem icon="ui-icon-image" id="showAnalysis" styleClass="element-with-whitespace" value=" Cockpit" ajax="false" action="#{currentCockpitBean.setProject(project)}" />
<p:menuitem icon="ui-icon-wrench" id="editAnalysisViews" styleClass="element-with-whitespace" value=" Cockpit Editor" ajax="false" url="cockpitEditor?projectName=#{project}" />
<p:menuitem icon="ui-icon-image" id="showAnalysis" styleClass="element-with-whitespace" value=" Cockpit" ajax="false" url="cockpit?projectName=#{project}" />
<p:separator/>
<p:menuitem id="copyButton" icon="ui-icon-copy" styleClass="element-with-whitespace" value=" Copy Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="copyProjectDialog.show()"/>
<p:menuitem id="renameButton" icon="ui-icon-pencil" styleClass="element-with-whitespace" value=" Rename Project" action="#{currentProjectOverviewBean.setProjectName(project)}" onclick="renameProjectDialog.show()" disabled="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