001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Anahide Tchertchian 018 */ 019package org.nuxeo.ecm.platform.ui.web.binding.alias; 020 021import javax.faces.component.UIComponent; 022import javax.faces.event.FacesEvent; 023import javax.faces.event.FacesListener; 024 025import org.nuxeo.ecm.platform.ui.web.component.holder.UIValueHolder; 026 027/** 028 * Wrapper event used by {@link UIAliasHolder} and {@link UIValueHolder} components. 029 * 030 * @author Anahide Tchertchian 031 * @since 5.4 032 */ 033public class AliasEvent extends FacesEvent { 034 035 private static final long serialVersionUID = 1L; 036 037 protected final FacesEvent originalEvent; 038 039 public AliasEvent(UIComponent component, FacesEvent originalEvent) { 040 super(component); 041 this.originalEvent = originalEvent; 042 setPhaseId(originalEvent.getPhaseId()); 043 } 044 045 public FacesEvent getOriginalEvent() { 046 return originalEvent; 047 } 048 049 @Override 050 public boolean isAppropriateListener(FacesListener listener) { 051 return originalEvent.isAppropriateListener(listener); 052 } 053 054 @Override 055 public void processListener(FacesListener listener) { 056 originalEvent.processListener(listener); 057 } 058 059}