1 16 package javax.faces.event; 17 18 import javax.faces.component.UIComponent; 19 20 24 public class ValueChangeEvent extends FacesEvent { 25 26 private Object _oldValue; 28 private Object _newValue; 29 30 public ValueChangeEvent(UIComponent uiComponent, Object oldValue, Object newValue) 32 { 33 super(uiComponent); 34 if (uiComponent == null) throw new IllegalArgumentException ("uiComponent"); 35 _oldValue = oldValue; 36 _newValue = newValue; 37 } 38 39 public Object getNewValue() 41 { 42 return _newValue; 43 } 44 45 public Object getOldValue() 46 { 47 return _oldValue; 48 } 49 50 public boolean isAppropriateListener(FacesListener facesListeners) 51 { 52 return facesListeners instanceof ValueChangeListener; 53 } 54 55 public void processListener(FacesListener facesListeners) 56 { 57 ((ValueChangeListener)facesListeners).processValueChange(this); 58 } 59 } 60 | Popular Tags |