Package org.apache.wicket.behavior

Examples of org.apache.wicket.behavior.Behavior


   */
  public void remove(final IFormValidator validator)
  {
    Args.notNull(validator, "validator");

    Behavior match = null;
    for (Behavior behavior : getBehaviors())
    {
      if (behavior.equals(validator))
      {
        match = behavior;
View Full Code Here


      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);
        }
      }

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

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

      @Override
      public void bind(Component component)
View Full Code Here

   * @return form component for chaining
   */
  public final FormComponent<T> remove(final IValidator<? super T> validator)
  {
    Args.notNull(validator, "validator");
    Behavior match = null;
    for (Behavior behavior : getBehaviors())
    {
      if (behavior.equals(validator))
      {
        match = behavior;
View Full Code Here

        Collection<FuncValidationRule> funcRules = this.options
                .getFuncValidationRules();
        if (Utils.isNotEmpty(funcRules)) {
            for (final FuncValidationRule r : funcRules) {
                component.add(new Behavior() {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public void renderHead(Component component, IHeaderResponse response) {
                        response.render(JavaScriptHeaderItem.forScript(r.getFuncDef(), UUID.randomUUID().toString()));
View Full Code Here

                            image = new Image("icon", "statuses/inactive.png");
                            alt = "failure icon";
                            title = "failure";
                    }

                    image.add(new Behavior() {

                        private static final long serialVersionUID = 1469628524240283489L;

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

        } else {
            value = "";
        }

        Component label = new Label("value", value).add(new Behavior() {

            private static final long serialVersionUID = 1469628524240283489L;

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

        }

        final Fragment frag;

        if (image != null) {
            image.add(new Behavior() {

                private static final long serialVersionUID = 1469628524240283489L;

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

    }
    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

      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

TOP

Related Classes of org.apache.wicket.behavior.Behavior

Copyright © 2018 www.massapicom. 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.