package various;

import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ValueChangeEvent;
import javax.faces.event.ValueChangeListener;

/**
 * Przyklad klasy implementujacej obiekt obslugi zdarzenia zmiany wartosci (patrz rozdzial 3.2). 
 *
 */
public class ValueChangeEventLogger implements ValueChangeListener {

	@Override
	public void processValueChange(ValueChangeEvent event)
			throws AbortProcessingException {
		FacesContext.getCurrentInstance().getExternalContext().log(event.getComponent() + "has generated" + event.toString());
	}

}
