org.apache.wicket.behavior
Class BehaviorsUtil

java.lang.Object
  extended by org.apache.wicket.behavior.BehaviorsUtil

public class BehaviorsUtil
extends Object

This class contains a convenience method neccesary only until 1.5 when we can make Component.getBehaviors(Class) public

Since:
1.4
Author:
Antony Stubbs, igor.vaynberg

Constructor Summary
BehaviorsUtil()
           
 
Method Summary
static
<M extends IBehavior>
List<IBehavior>
getBehaviors(Component component, Class<M> type)
          Returns all behaviors attached to a component which implement a given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BehaviorsUtil

public BehaviorsUtil()
Method Detail

getBehaviors

public static <M extends IBehavior> List<IBehavior> getBehaviors(Component component,
                                                                 Class<M> type)
Returns all behaviors attached to a component which implement a given type. A workaround until WICKET-2115 is resolved.

Type Parameters:
M - The type of behavior
Parameters:
component - target componet
type - type of behaviors to look for, null for all
Returns:
unmodifiable list of behaviors


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.