com.sun.faces.component.behavior.AjaxBehaviors Maven / Gradle / Ivy
/*
* Copyright (c) 1997, 2020 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 com.sun.faces.component.behavior;
import java.io.Serializable;
import java.util.ArrayDeque;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import jakarta.faces.application.Application;
import jakarta.faces.component.behavior.AjaxBehavior;
import jakarta.faces.component.behavior.ClientBehavior;
import jakarta.faces.component.behavior.ClientBehaviorHint;
import jakarta.faces.component.behavior.ClientBehaviorHolder;
import jakarta.faces.context.FacesContext;
/**
*
* An instance of the class is used to manage {@link AjaxBehavior} instances.
*
*
* @since 2.0
*/
public class AjaxBehaviors implements Serializable {
private static final long serialVersionUID = 1617682489423771119L;
private static final String AJAX_BEHAVIORS = "jakarta.faces.component.AjaxBehaviors";
private ArrayDeque behaviorStack = null;
public AjaxBehaviors() {
behaviorStack = new ArrayDeque<>();
}
// Returns the AjaxBehaviors instance, creating it if necessary.
public static AjaxBehaviors getAjaxBehaviors(FacesContext context, boolean createIfNull) {
Map