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

Modifications for quality reasons.

parent 8fa98fec
No related branches found
No related tags found
No related merge requests found
/***************************************************************************
* 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);
}
/***************************************************************************
* 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;
......
......@@ -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);
}
}
}
......
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