@Override
  protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
    super.updateAjaxAttributes(attributes);

    String uuidParam = "return {'" + PARAM_WINDOW_NAME + "': window.name}";
    attributes.getDynamicExtraParameters().add(uuidParam);
  }
Esempio n. 2
0
  @Override
  protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
    super.updateAjaxAttributes(attributes);

    String evt = getEvent();
    Checks.notEmpty(evt, "getEvent() should return non-empty event name(s)");
    attributes.setEventNames(evt);
  }
Esempio n. 3
0
  @Override
  public void renderHead(final Component component, final IHeaderResponse response) {
    super.renderHead(component, response);

    if (component.isEnabledInHierarchy()) {
      CharSequence js = getCallbackScript(component);

      response.render(OnDomReadyHeaderItem.forScript(js.toString()));
    }
  }
  @Override
  protected final void onBind() {
    super.onBind();

    Component component = getComponent();
    if (component instanceof WebPage == false) {
      throw new WicketRuntimeException(
          AjaxNewWindowNotifyingBehavior.class.getName()
              + " can be assigned only to WebPage instances.");
    }
  }
  @Override
  public void renderHead(Component component, IHeaderResponse response) {
    super.renderHead(component, response);

    if (hasBeenRendered == false) {
      hasBeenRendered = true;
      response.render(
          OnDomReadyHeaderItem.forScript(String.format("window.name='%s'", windowName)));
    }
    response.render(
        OnLoadHeaderItem.forScript(
            "setTimeout(function() {" + getCallbackScript().toString() + "}, 30);"));
  }