Examples of Behavior


Examples of org.apache.wicket.behavior.Behavior

    for (int i = component.data_start(); i < len; i++)
    {
      Object obj = component.data_get(i);
      if (obj != null && obj instanceof Behavior)
      {
        final Behavior behavior = (Behavior)obj;

        behavior.detach(component);

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

Examples of org.apache.wicket.behavior.Behavior

    for (int i = component.data_start(); i < len; i++)
    {
      Object obj = component.data_get(i);
      if (obj != null && obj instanceof Behavior)
      {
        final Behavior behavior = (Behavior)obj;

        behavior.onRemove(component);
      }
    }
  }
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

    return id;
  }

  public final Behavior getBehaviorById(int id)
  {
    Behavior behavior = null;

    ArrayList<Behavior> ids = getBehaviorsIdList(false);
    if (ids != null)
    {
      if (id >= 0 && id < ids.size())
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

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

Examples of org.apache.wicket.behavior.Behavior

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

      // Apply behavior modifiers
      List<? extends Behavior> behaviors = getBehaviors();
      if ((behaviors != null) && !behaviors.isEmpty() && !tag.isClose() &&
        (isIgnoreAttributeModifier() == false))
      {
        tag = tag.mutable();
        for (Behavior behavior : behaviors)
        {
          // Components may reject some behavior components
          if (isBehaviorAccepted(behavior))
          {
            behavior.onComponentTag(this, tag);
          }
        }
      }

      if ((tag instanceof WicketTag) && !tag.isClose() &&
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

    {
      @Override
      public void onInstantiation(Component component)
      {
        // WICKET-5546 behavior added before Page#init()
        component.add(new Behavior()
        {
        });
      }
    });
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

      {
        @Override
        public void onClick(AjaxRequestTarget target)
        {
        }
      }.add(new Behavior()
      {
        @Override
        public void onConfigure(Component c)
        {
          c.setVisible(false);
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

   * @param fc
   *            form component
   */
  public final void enableFocusTracking(final FormComponent<?> fc)
  {
    fc.add(new Behavior()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onComponentTag(final Component component, final ComponentTag tag)
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

    item.add(middleColumns);

    // do distinguish between selected and unselected rows we add an
    // behavior
    // that modifies row css class.
    item.add(new Behavior()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onComponentTag(final Component component, final ComponentTag tag)
View Full Code Here

Examples of org.apache.wicket.behavior.Behavior

    // This is necessary to support fixed position header. The header does
    // not
    // scroll together with body. The body contains vertical scrollbar. The
    // header width must be same as body content width, so that the columns
    // are properly aligned.
    add(new Behavior()
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void renderHead(final Component component, final IHeaderResponse response)
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.