javax.faces.view.AttachedObjectTarget Maven / Gradle / Ivy
Show all versions of jboss-jsf-api_2.3_spec Show documentation
/*
* Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/
package javax.faces.view;
import java.util.List;
import javax.faces.component.UIComponent;
/**
* Within the declaration of a
* composite component, an AttachedObjectTarget
* allows the composite component author to expose the
* semantics of an inner component to the page author without
* exposing the rendering or implementation details of the inner
* component. See {@link
* ViewDeclarationLanguage#getComponentMetadata} for the context in
* which implementations of this interface are used.
*
* The implementation must ensure that
* this instance is thread safe and may be shared among different component
* trees.
*
* Subinterfaces are provided for the common behavioral interfaces:
* {@link javax.faces.component.behavior.Behavior}, {@link
* javax.faces.component.ValueHolder}, {@link
* javax.faces.component.EditableValueHolder} and {@link
* javax.faces.component.ActionSource2}. The default VDL implementation
* must provide a corresponding Facelets tag handler for each of the
* subinterfaces of this interface.
*
*
* @since 2.0
*/
public interface AttachedObjectTarget {
/**
* The key in the value set of the
* composite component BeanDescriptor
, the
* value for which is a
* List<AttachedObjectTarget>
.
*/
public static final String ATTACHED_OBJECT_TARGETS_KEY =
"javax.faces.view.AttachedObjectTargets";
/**
* Returns the
* List<UIComponent>
that this
* AttachedObjectTarget
exposes. Each attached
* object exposed by the composite component author
* may point at multiple UIComponent
instances within
* the composite component. This method is used by the {@link
* javax.faces.view.ViewDeclarationLanguage#retargetAttachedObjects}
* method to take the appropriate action on the attached object.
*
* @param topLevelComponent the top level component for this
* composite component.
*
* @return the result as specified above
*
*/
public List getTargets(UIComponent topLevelComponent);
/**
* Returns the name by which this
* attached object target is exposed to the page
* author.
*
*
* @return the name of the attached object target
*
*/
public String getName();
}