Package org.apache.wicket.ajax

Examples of org.apache.wicket.ajax.AjaxRequestTarget


    @Override
    public void renderHead(final Component component, final IHeaderResponse response)
    {
      super.renderHead(component, response);

      AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class);
      if (target != null)
      {
        CharSequence callbackScript = getCallbackScript(component);
        target.appendJavaScript(callbackScript);
      }
    }
View Full Code Here


  @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

    @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

   *            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

   *            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

    {
      callOnError(submitter);
    }

    // update auto labels if we are inside an ajax request
    final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class);
    if (target != null)
    {
      visitChildren(FormComponent.class, new IVisitor<FormComponent<?>, Void>()
      {
        @Override
View Full Code Here

    @Override
    public void renderHead(final Component component, final IHeaderResponse response)
    {
      super.renderHead(component, response);

      AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class);
      if (target != null)
      {
        CharSequence callbackScript = getCallbackScript(component);
        target.appendJavaScript(callbackScript);
      }
    }
View Full Code Here

   *            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

    @Override
    public void renderHead(final Component component, final IHeaderResponse response)
    {
      super.renderHead(component, response);

      AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class);
      if (target != null)
      {
        CharSequence callbackScript = getCallbackScript(component);
        target.appendJavaScript(callbackScript);
      }
    }
View Full Code Here

   * you don't have the AjaxRequestTarget instance. However, it is also safe to call this method
   * outside Ajax response.
   */
  public final void updateTree()
  {
    AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class);
    if (target == null)
    {
      throw new WicketRuntimeException(
        "No AjaxRequestTarget available to execute updateTree(ART target)");
    }
View Full Code Here

TOP

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

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.