Examples of AjaxFallbackLink


Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

  }

  @Override
  protected WebMarkupContainer newLink(String linkId, final int index)
  {
    return new AjaxFallbackLink(linkId)
    {

      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

  {
    // add the listview container for the todo items.
    showItems = new TodoItemsContainer("showItems");
    add(showItems);

    add(new AjaxFallbackLink("ajaxback")
    {
      /**
       * @see org.apache.wicket.ajax.markup.html.AjaxFallbackLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget)
       */
      @Override
 
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

  {
    // add the listview container for the todo items.
    showItems = new TodoItemsContainer("showItems");
    add(showItems);

    add(new AjaxFallbackLink("ajaxback")
    {
      /**
       * @see org.apache.wicket.ajax.markup.html.AjaxFallbackLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget)
       */
      public void onClick(AjaxRequestTarget target)
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

        counter1++;
        target.addComponent(c1);
      }
    });

    add(new AjaxFallbackLink("c2-link")
    {
      public void onClick(AjaxRequestTarget target)
      {
        counter2++;
        // notice that for a fallback link we need to makesure the
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

        target.addComponent(c1);
        target.appendJavascript("new Effect.Shake($('" + c1.getMarkupId() + "'));");
      }
    });

    add(new AjaxFallbackLink("c2-link")
    {
      public void onClick(AjaxRequestTarget target)
      {
        counter2++;
        if (target != null)
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

      super(id);
      ListView lv = new ListView("file", new PackagedResourcesModel())
      {
        protected void populateItem(ListItem item)
        {
          AjaxFallbackLink link = new AjaxFallbackLink("link", item.getModel())
          {
            public void onClick(AjaxRequestTarget target)
            {
              setName(getModelObjectAsString());
              target.addComponent(codePanel);
              target.addComponent(filename);
            }
          };
          link.add(new Label("name", item.getModelObjectAsString()));
          item.add(link);
        }
      };
      add(lv);
    }
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

    add(test1);
    final Component test2 = new AjaxHeaderContribution("test2").setOutputMarkupId(true);
    add(test2);
    final Component test3 = new AjaxHeaderContribution("test3").setOutputMarkupId(true);
    add(test3);
    add(new AjaxFallbackLink("link")
    {
      private static final long serialVersionUID = 1L;

      public void onClick(AjaxRequestTarget target)
      {
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

  {
    // add the listview container for the todo items.
    showItems = new TodoItemsContainer("showItems");
    add(showItems);

    add(new AjaxFallbackLink("ajaxback")
    {
      /**
       * @see org.apache.wicket.ajax.markup.html.AjaxFallbackLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget)
       */
      public void onClick(AjaxRequestTarget target)
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

        }
      };
    }
    else
    {
      return new AjaxFallbackLink(id)
      {
        private static final long serialVersionUID = 1L;

        /**
         * @see org.apache.wicket.ajax.markup.html.AjaxFallbackLink#onClick(org.apache.wicket.ajax.AjaxRequestTarget)
View Full Code Here

Examples of org.apache.wicket.ajax.markup.html.AjaxFallbackLink

    // AjaxFallbackLinks is processed like an AjaxLink if isAjax is true
    // If it's not handling of the linkComponent is passed through to the
    // Link.
    else if (linkComponent instanceof AjaxFallbackLink && isAjax)
    {
      AjaxFallbackLink link = (AjaxFallbackLink)linkComponent;

      setupRequestAndResponse(true);
      RequestCycle requestCycle = createRequestCycle();
      AjaxRequestTarget target = new AjaxRequestTarget(link.getPage());
      requestCycle.setRequestTarget(target);

      link.onClick(target);

      // process the request target
      target.respond(requestCycle);
      requestCycle.detach();
    }
    // if the link is an AjaxSubmitLink, we need to find the form
    // from it using reflection so we know what to submit.
    else if (linkComponent instanceof AjaxSubmitLink)
    {
      // If it's not ajax we fail
      if (isAjax == false)
      {
        fail("Link " + path + "is an AjaxSubmitLink and " +
          "will not be invoked when AJAX (javascript) is disabled.");
      }

      AjaxSubmitLink link = (AjaxSubmitLink)linkComponent;

      // We cycle through the attached behaviors and select the
      // LAST matching behavior as the one we handle.
      List behaviors = link.getBehaviors();
      AjaxFormSubmitBehavior ajaxFormSubmitBehavior = null;
      for (Iterator iter = behaviors.iterator(); iter.hasNext();)
      {
        Object behavior = iter.next();
        if (behavior instanceof AjaxFormSubmitBehavior)
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.