Examples of IBehaviorListener


Examples of org.apache.wicket.behavior.IBehaviorListener

          component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    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;
      }
    }

    if (behaviorListener == null)
    {
      // wicket-2107
      throw new PageExpiredException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();
  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

          component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    final List behaviors = component.getBehaviorsRawList();
    IBehaviorListener behaviorListener = null;

    if (behaviors.size() > idAsInt)
    {
      behaviorListener = (IBehaviorListener)behaviors.get(idAsInt);
    }
    if (behaviorListener == null)
    {
      throw new IllegalStateException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();

  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

    {
      throw new PageExpiredException("No behaviors attached to component " +
        component.toString());
    }

    IBehaviorListener behaviorListener = null;

    if (behaviors.size() > idAsInt)
    {
      IBehavior behavior = behaviors.get(idAsInt);
      if (behavior instanceof IBehaviorListener)
      {

        if (!behavior.isEnabled(component))
        {
          // ignore this request
          logger.warn(
            "behavior not enabled; ignoring call. behavior: {} at index: {} on component: {}",
            new Object[] { behavior, idAsInt, component });
          if (requestCycle.getRequest() instanceof WebRequest &&
            ((WebRequest)requestCycle.getRequest()).isAjax())
          {
            throw new AbortException();
          }
          return;
        }

        behaviorListener = (IBehaviorListener)behavior;
      }
    }

    if (behaviorListener == null)
    {
      // wicket-2107
      throw new PageExpiredException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    if (!component.isVisibleInHierarchy() ||
      (!(behaviorListener instanceof IIgnoreDisabledComponentBehavior) && !component.isEnabledInHierarchy()))
    {
      // ignore this request
      logger.warn("component not enabled or visible; ignoring call. Component: {}", component);
      if (requestCycle.getRequest() instanceof WebRequest &&
        ((WebRequest)requestCycle.getRequest()).isAjax())
      {
        throw new AbortException();
      }
      return;
    }


    // Invoke the interface method
    behaviorListener.onRequest();
  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

          "Parameter behaviorId was not provided: unable to locate listener. Component: "
              + component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    final IBehaviorListener behaviorListener = (IBehaviorListener)component.getBehaviors().get(
        idAsInt);
    if (behaviorListener == null)
    {
      throw new IllegalStateException("No behavior listener found with behaviorId " + id
          + "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();

  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

          component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    final List<IBehavior> behaviors = component.getBehaviorsRawList();
    IBehaviorListener behaviorListener = null;

    if (behaviors.size() > idAsInt)
    {
      behaviorListener = (IBehaviorListener)behaviors.get(idAsInt);
    }
    if (behaviorListener == null)
    {
      throw new IllegalStateException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();

  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

    {
      throw new PageExpiredException("No behaviors attached to component " +
        component.toString());
    }

    IBehaviorListener behaviorListener = null;

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

    if (behaviorListener == null)
    {
      // wicket-2107
      throw new PageExpiredException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();
  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

          "Parameter behaviorId was not provided: unable to locate listener. Component: " +
              component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    IBehaviorListener behaviorListener = null;
    if (component.getBehaviors().size() > idAsInt)
    {
      behaviorListener = (IBehaviorListener)component.getBehaviors().get(idAsInt);
    }
    if (behaviorListener == null)
    {
      throw new IllegalStateException("No behavior listener found with behaviorId " + id +
          "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();

  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

    {
      throw new PageExpiredException("No behaviors attached to component " +
        component.toString());
    }

    IBehaviorListener behaviorListener = null;

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

    if (behaviorListener == null)
    {
      // wicket-2107
      throw new PageExpiredException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();
  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

    {
      throw new PageExpiredException("No behaviors attached to component " +
        component.toString());
    }

    IBehaviorListener behaviorListener = null;

    if (behaviors.size() > idAsInt)
    {
      IBehavior behavior = behaviors.get(idAsInt);
      if (behavior instanceof IBehaviorListener)
      {

        if (!behavior.isEnabled(component))
        {
          // ignore this request
          logger.warn(
            "behavior not enabled; ignoring call. behavior: {} at index: {} on component: {}",
            new Object[] { behavior, idAsInt, component });
          return;
        }

        behaviorListener = (IBehaviorListener)behavior;
      }
    }

    if (behaviorListener == null)
    {
      // wicket-2107
      throw new PageExpiredException("No behavior listener found with behaviorId " + id +
        "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();
  }
View Full Code Here

Examples of org.apache.wicket.behavior.IBehaviorListener

          "Parameter behaviorId was not provided: unable to locate listener. Component: "
              + component.toString());
    }

    final int idAsInt = Integer.parseInt(id);
    IBehaviorListener behaviorListener = null;
    if (component.getBehaviors().size() > idAsInt)
    {
      behaviorListener = (IBehaviorListener)component.getBehaviors().get(idAsInt);
    }
    if (behaviorListener == null)
    {
      throw new IllegalStateException("No behavior listener found with behaviorId " + id
          + "; Component: " + component.toString());
    }

    // Invoke the interface method
    behaviorListener.onRequest();

  }
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.