Package org.apache.wicket.ajax

Examples of org.apache.wicket.ajax.AjaxEventBehavior


  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here


    failMessage = "event must not be null";
    notNull(failMessage, event);

    // Run through all the behavior and select the LAST ADDED behavior which
    // matches the event parameter.
    AjaxEventBehavior ajaxEventBehavior = null;
    List<IBehavior> behaviors = component.getBehaviors();
    for (IBehavior behavior : behaviors)
    {
      // AjaxEventBehavior is the one to look for
      if (behavior instanceof AjaxEventBehavior)
      {
        AjaxEventBehavior tmp = (AjaxEventBehavior)behavior;
        if (event.equals(tmp.getEvent()))
        {
          ajaxEventBehavior = tmp;
        }
      }
    }
View Full Code Here

  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      protected void onEvent(AjaxRequestTarget target)
      {
View Full Code Here

    failMessage = "event must not be null";
    notNull(failMessage, event);

    // Run through all the behavior and select the LAST ADDED behavior which
    // 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;

        if (event.equals(tmp.getEvent()))
        {
          ajaxEventBehavior = tmp;
        }
      }
    }
View Full Code Here

    animalSelectionLabel.setOutputMarkupId(true);
    add(animalSelectionLabel);

    // Image referencing captcha image resource
    image = new NonCachingImage("image", imageResource = new CaptchaImageResource(animals));
    image.add(new AjaxEventBehavior("onclick")
    {
      private static final long serialVersionUID = 7480352029955897654L;

      @Override
      protected CharSequence getCallbackScript(boolean onlyTargetActivePage)
View Full Code Here

  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

  {
    // Setup mocks
    final MockPageWithOneComponent page = new MockPageWithOneComponent();

    Label label = new Label("component", "Dblclick This To See Magick");
    label.add(new AjaxEventBehavior("ondblclick")
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

   *            the name of the default event on which this link will listen to
   * @return the ajax behavior which will be executed when the user clicks the link
   */
  protected AjaxEventBehavior newAjaxEventBehavior(final String event)
  {
    return new AjaxEventBehavior(event)
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(final AjaxRequestTarget target)
View Full Code Here

   *            the name of the default event on which this link will listen to
   * @return the ajax behavior which will be executed when the user clicks the link
   */
  protected AjaxEventBehavior newAjaxEventBehavior(String event)
  {
    return new AjaxEventBehavior(event)
    {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target)
View Full Code Here

    Args.notNull(component, "component");
    Args.notNull(event, "event");

    checkUsability(component, true);

    AjaxEventBehavior ajaxEventBehavior = WicketTesterHelper.findAjaxEventBehavior(component,
      event);
    executeBehavior(ajaxEventBehavior);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.ajax.AjaxEventBehavior

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.