com.sun.jsftemplating.layout.event.CreateChildEvent Maven / Gradle / Ivy
/*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the license at
* https://jsftemplating.dev.java.net/cddl1.html or
* jsftemplating/cddl1.txt.
* See the License for the specific language governing
* permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at jsftemplating/cddl1.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* you own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
*/
package com.sun.jsftemplating.layout.event;
import javax.faces.component.UIComponent;
/**
* This event is typically invoked when a factory not only creates a
* component, but creates children under that component. This event may
* be invoked to allow a page author to have greater control over what
* happens during the child creation. See individual factory JavaDocs to
* see which factories support this and what may be done during this
* event.
*
* @author Ken Paulsen ([email protected])
*/
public class CreateChildEvent extends EventObjectBase implements UIComponentHolder {
private static final long serialVersionUID = 1L;
/**
* Constructor.
*
* @param component The UIComponent
associated with this
* EventObject
.
*/
public CreateChildEvent(UIComponent component) {
super(component);
}
/**
* Constructor.
*
* @param component The UIComponent
associated with this
* EventObject
.
*/
public CreateChildEvent(UIComponent component, Object data) {
super(component);
setData(data);
}
/**
* This method provides access to extra data that is set by the
* creator of this Event. See documentation of the code that fires
* this event to learn what (if anything) is stored here.
*/
public Object getData() {
return _data;
}
/**
* This setter allows extending classes to set this value via this
* setter. Normally this value is passed into the constructor.
*/
protected void setData(Object data) {
_data = data;
}
/**
*
The "createChild" event type. ("createChild")
*/
public static final String EVENT_TYPE = "createChild";
/**
* This value provides extra information that can be associated with
* this event. See code that uses this event to learn more about
* what (if anything) this information is used for.
*/
private Object _data = null;
}