Examples of IBehavior


Examples of org.apache.wicket.behavior.IBehavior

      if (tag.hasBehaviors())
      {
        Iterator<? extends IBehavior> tagBehaviors = tag.getBehaviors();
        while (tagBehaviors.hasNext())
        {
          final IBehavior behavior = tagBehaviors.next();
          if (behavior.isEnabled(this))
          {
            behavior.onComponentTag(this, tag);
          }
          behavior.detach(this);
        }
      }

      // Write the tag
      tag.writeOutput(getResponse(), stripWicketTags, findMarkupStream().getWicketNamespace());
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

      if (tag.hasBehaviors())
      {
        Iterator<? extends IBehavior> tagBehaviors = tag.getBehaviors();
        while (tagBehaviors.hasNext())
        {
          final IBehavior behavior = tagBehaviors.next();
          if (behavior.isEnabled(this))
          {
            behavior.onComponentTag(this, tag);
          }
          behavior.detach(this);
        }
      }

      // Write the tag
      tag.writeOutput(getResponse(), stripWicketTags, findMarkupStream().getWicketNamespace());
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

    final List<IBehavior> behaviors = component.getBehaviorsRawList();
    IBehaviorListener behaviorListener = null;

    if (behaviors.size() > idAsInt)
    {
      IBehavior behavior = behaviors.get(idAsInt);
      if (behavior instanceof IBehaviorListener)
      {
        behaviorListener = (IBehaviorListener)behavior;
      }
    }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

    // matches the event parameter.
    AjaxEventBehavior ajaxEventBehavior = null;
    List behaviors = component.getBehaviors();
    for (Iterator iter = behaviors.iterator(); iter.hasNext();)
    {
      IBehavior behavior = (IBehavior)iter.next();

      // AjaxEventBehavior is the one to look for
      if (behavior instanceof AjaxEventBehavior)
      {
        AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

      if (tag.hasBehaviors())
      {
        Iterator<? extends IBehavior> tagBehaviors = tag.getBehaviors();
        while (tagBehaviors.hasNext())
        {
          final IBehavior behavior = tagBehaviors.next();
          if (behavior.isEnabled(this))
          {
            behavior.onComponentTag(this, tag);
          }
          behavior.detach(this);
        }
      }

      // Write the tag
      tag.writeOutput(getResponse(), !needToRenderTag(null),
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

    }
    else
    {
      try
      {
        IBehavior behavior = getComponent().getBehaviors().get(behaviorIndex);
        listenerInterface.invoke(getComponent(), behavior);
      }
      catch (IndexOutOfBoundsException e)
      {
        throw new WicketRuntimeException("Couldn't find component behavior.");
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

              // go through the behaviors and invoke IBehavior.afterRender
              List behaviors = item.getBehaviors();
              for (Iterator i = behaviors.iterator(); i.hasNext();)
              {
                IBehavior behavior = (IBehavior)i.next();
                behavior.afterRender(item);
              }
            }
          });
          //
        }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

    List behaviors = getBehaviors();
    if (behaviors != null)
    {
      for (Iterator i = behaviors.iterator(); i.hasNext();)
      {
        IBehavior behavior = (IBehavior)i.next();

        // Always detach models, 'accepted' or not. Otherwise, if they
        // are accepted during render, but not here - something can go
        // undetached, and calling isEnabled can also lead to nasty side
        // effects. See for instance Timo's comment on
        // http://issues.apache.org/jira/browse/WICKET-673
        behavior.detach(this);

        if (behavior.isTemporary())
        {
          removeBehavior(behavior);
        }
      }
    }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

    final Iterator behaviors = getBehaviors().iterator();

    while (behaviors.hasNext())
    {
      IBehavior behavior = (IBehavior)behaviors.next();
      if (!behavior.getStatelessHint(this))
      {
        return false;
      }
    }
    return true;
View Full Code Here

Examples of org.apache.wicket.behavior.IBehavior

        List behaviors = getBehaviors();
        if (behaviors != null)
        {
          for (Iterator i = behaviors.iterator(); i.hasNext();)
          {
            IBehavior behavior = (IBehavior)i.next();
            if (isBehaviorAccepted(behavior))
            {
              try
              {
                behavior.exception(this, ex);
              }
              catch (Throwable ex2)
              {
                log.error("Error while cleaning up after exception", ex2);
              }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.