diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/IProjectBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/IProjectBean.java index dfdcc0f13c9fedb3037500183b87d8a19e7db0e5..c45c5ff23c393b5c811be82b7f98c5c033fc230c 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/IProjectBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/IProjectBean.java @@ -1,11 +1,54 @@ +/*************************************************************************** + * 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); } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ForwardBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ForwardBean.java index ae88e99be7263a1c5b97692306ddeb85c1c8f99a..1d08384c1aa7ae6631cafafec5bdc7ff7a5afc83 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ForwardBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ForwardBean.java @@ -1,3 +1,23 @@ +/*************************************************************************** + * 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.application; import javax.faces.bean.ApplicationScoped; diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java index 69252c5963f1646534c0f7c2b44788136d82402a..a5c8f53e25ca72d9aa3770af9b11e527aa88fbc9 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/CurrentCockpitEditorBean.java @@ -344,8 +344,10 @@ public class CurrentCockpitEditorBean implements IProjectBean { */ public void validateDisplayConnectorName(final FacesContext context, final UIComponent toValidate, final Object value) { synchronized (this) { - final boolean nameExists = this.existsDisplayConnectorName((String) value); - ((UIInput) toValidate).setValid(!nameExists); + if ((value instanceof String) && (toValidate instanceof UIInput)) { + final boolean nameExists = this.existsDisplayConnectorName((String) value); + ((UIInput) toValidate).setValid(!nameExists); + } } }