/*
 * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

/*
 * $Id: FirstNameBean.java 62525 2011-04-15 12:14:31Z dougd $
 */
package com.sun.ts.tests.jsf.spec.composite.editablevalueholder;

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

public class FirstNameBean implements  ValueChangeListener {

    public ValueChangeListener getValueChangeListener() {
        ValueChangeListener fname = new FirstNameBean();
        return fname;
    }

    @Override
    public void processValueChange(ValueChangeEvent arg0) throws
            AbortProcessingException {
        FacesContext.getCurrentInstance().getExternalContext().getRequestMap().
                put("changed", "TRUE");
    }

    protected String firstName = "";

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

}