org.richfaces.view.facelets.html.BehaviorStack Maven / Gradle / Ivy
The newest version!
/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.richfaces.view.facelets.html;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.faces.application.Application;
import javax.faces.component.StateHolder;
import javax.faces.component.behavior.ClientBehavior;
import javax.faces.component.behavior.ClientBehaviorHint;
import javax.faces.component.behavior.ClientBehaviorHolder;
import javax.faces.context.FacesContext;
/**
* @author Nick Belaevski
*
* This class is necessary to handle nesting wrapping behaviors properly and is created to work around this issue:
* https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=655
*
*/
// TODO - check for bug resolution
final class BehaviorStack {
private static final String BEHAVIOR_STACK = "org.richfaces.BehaviorStack";
private LinkedList behaviorStack = null;
public BehaviorStack() {
behaviorStack = new LinkedList();
}
public static BehaviorStack getBehaviorStack(FacesContext context, boolean createIfNull) {
Map