Examples of AjaxRequestTarget


Examples of org.apache.wicket.ajax.AjaxRequestTarget

      AjaxLink link = (AjaxLink)linkComponent;

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

      link.onClick(target);

      // process the request target
      target.respond(requestCycle);
    }
    // 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();
      RequestCycle requestCycle = createRequestCycle();
      AjaxRequestTarget target = new AjaxRequestTarget();
      requestCycle.setRequestTarget(target);

      link.onClick(target);

      // process the request target
      target.respond(requestCycle);
    }
    // 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)
    {
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

     */
    @Override
    public void beforeRender(Component component) {
        super.beforeRender(component);

        AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);

        if (target != null) {
            JQHeaderContributionTarget ajaxTarget = new JQHeaderContributionTarget();
            contributeInternal(ajaxTarget);
            for (IJQStatement s : ajaxTarget
                    .getJQStatementsInsideDocumentReady()) {
                target.appendJavaScript(String.valueOf(s));
            }
        }
    }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

   *            page on which ajax response is made
   * @return non-null ajax request target instance
   */
  public AjaxRequestTarget newAjaxRequestTarget(final Page page)
  {
    return new AjaxRequestTarget(page);
  }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

      AjaxLink<?> link = (AjaxLink<?>)linkComponent;

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

      link.onClick(target);

      // process the request target
      processRequestCycle(requestCycle);
    }
    // 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);
      WebRequestCycle requestCycle = createRequestCycle();
      AjaxRequestTarget target = new AjaxRequestTarget(link.getPage());
      requestCycle.setRequestTarget(target);

      link.onClick(target);

      // process the request target
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

    @Override
    public void onEvent(final IEvent<?> event) {
        if (event.getPayload() instanceof DetailsModEvent) {
            // connectro change: update properties and forward event
            final AjaxRequestTarget target = ((ResourceEvent) event.getPayload()).getTarget();

            connConfProperties = getConnConfProperties();
            check.setEnabled(!connConfProperties.isEmpty());

            target.add(connConfPropContainer);

            // get configuration properties and send a new event
            send(getPage(), Broadcast.BREADTH, new ConnConfModEvent(target, connConfProperties));

        } else if (event.getPayload() instanceof MultiValueSelectorEvent) {
            // multi value connector property change: forward event
            final AjaxRequestTarget target = ((MultiValueSelectorEvent) event.getPayload()).getTarget();

            send(getPage(), Broadcast.BREADTH, new ConnConfModEvent(target, connConfProperties));
        }
    }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

    @Override
    public void onEvent(final IEvent<?> event) {

        if (event.getPayload() instanceof ConnConfModEvent) {

            final AjaxRequestTarget target = ((ConnConfModEvent) event.getPayload()).getTarget();

            final List<ConnConfProperty> conf = ((ConnConfModEvent) event.getPayload()).getConfiguration();

            mappings.removeAll();

            addMappingBtn.setEnabled(resourceTO.getConnectorId() != null && resourceTO.getConnectorId() > 0);

            schemaNames = getResourceSchemaNames(resourceTO.getConnectorId(), new HashSet<ConnConfProperty>(conf));

            target.add(mappingContainer);
        }
    }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

   *            page on which ajax response is made
   * @return non-null ajax request target instance
   */
  public AjaxRequestTarget newAjaxRequestTarget(final Page page)
  {
    return new AjaxRequestTarget(page);
  }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

      AjaxLink link = (AjaxLink)linkComponent;

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

      link.onClick(target);

      // process the request target
      target.respond(requestCycle);
      requestCycle.detach();
    }
    // 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)
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

  @Override
  public void respond(IRequestCycle requestCycle)
  {
    Page page = (Page)Application.get().getMapperContext().getPageInstance(pageKey.getPageId());
    AjaxRequestTarget target = WebApplication.get().newAjaxRequestTarget(page);
    executeHandlers(target, page);
  }
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget

   *            page on which ajax response is made
   * @return non-null ajax request target instance
   */
  public final AjaxRequestTarget newAjaxRequestTarget(final Page page)
  {
    AjaxRequestTarget target = getAjaxRequestTargetProvider().get(page);
    for (AjaxRequestTarget.IListener listener : ajaxRequestTargetListeners)
    {
      target.addListener(listener);
    }
    return target;
  }
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.