Package org.apache.wicket

Examples of org.apache.wicket.Component$AddedBehaviorChange


    componentsFrozen = true;

    // process component markup
    for (Map.Entry<String, Component> stringComponentEntry : markupIdToComponent.entrySet())
    {
      final Component component = stringComponentEntry.getValue();
      // final String markupId = stringComponentEntry.getKey();

      if (!containsAncestorFor(component))
      {
        writeComponent(response, component.getAjaxRegionMarkupId(), component, encoding);
      }
    }

    if (header != null)
    {
View Full Code Here


  public void detach(IRequestCycle requestCycle)
  {
    Iterator<Component> iterator = markupIdToComponent.values().iterator();
    while (iterator.hasNext())
    {
      final Component component = iterator.next();
      final Page parentPage = component.findParent(Page.class);
      if (parentPage != null)
      {
        parentPage.detach();
        break;
      }
View Full Code Here

   *      the component which ancestors should be checked.
   * @return <code>true</code> if target contains an ancestor for the given component
   */
  protected boolean containsAncestorFor(Component component)
  {
    Component cursor = component.getParent();
    while (cursor != null)
    {
      if (markupIdToComponent.containsValue(cursor))
      {
        return true;
      }
      cursor = cursor.getParent();
    }
    return false;
  }
View Full Code Here

    if (this instanceof IAjaxIndicatorAware)
    {
      return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId();
    }

    Component parent = getComponent().getParent();
    while (parent != null)
    {
      if (parent instanceof IAjaxIndicatorAware)
      {
        return ((IAjaxIndicatorAware)parent).getAjaxIndicatorMarkupId();
      }
      parent = parent.getParent();
    }
    return null;
  }
View Full Code Here

    IModel<T> m = (IModel<T>)getDefaultModel();

    // check that a model was found
    if (m == null)
    {
      Component parent = getParent();
      String msg = "No model found for this component, either pass one explicitly or "
        + "make sure an inheritable model is available.";
      if (parent == null)
      {
        msg += " This component is not added to a parent yet, so if this component "
View Full Code Here

  {
    for (EventSubscription curSubscription : subscriptions)
    {
      if (curSubscription.getContextAwareFilter().apply(event))
      {
        Component component = page.get(curSubscription.getComponentPath());
        if (curSubscription.getBehaviorIndex() == null)
          invokeMethod(target, curSubscription, component);
        else
          invokeMethod(target, curSubscription,
            component.getBehaviorById(curSubscription.getBehaviorIndex()));
      }
    }
  }
View Full Code Here

                    tag.put("class", kind);
                }
            });

            Component kindIcon = kindLink.get(0);
            if (kindIcon != null) {
                kindIcon.add(new Behavior() {

                    private static final long serialVersionUID = 1469628524240283489L;

                    @Override
                    public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

                    tag.put("class", kind);
                }
            });

            Component kindIcon = kindLink.get(0);
            if (kindIcon != null) {
                kindIcon.add(new Behavior() {

                    private static final long serialVersionUID = 1469628524240283489L;

                    @Override
                    public void onComponentTag(final Component component, final ComponentTag tag) {
View Full Code Here

    if (this instanceof IAjaxIndicatorAware)
    {
      return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId();
    }

    Component parent = getComponent().getParent();
    while (parent != null)
    {
      if (parent instanceof IAjaxIndicatorAware)
      {
        return ((IAjaxIndicatorAware)parent).getAjaxIndicatorMarkupId();
      }
      parent = parent.getParent();
    }
    return null;
  }
View Full Code Here

    listener.onSuccess("alert('Success!');");
    listener.onFailure("alert('Failure!');");
    listener.onComplete("alert('Complete!');");
    attributes.getAjaxCallListeners().add(listener);

    Component component = Mockito.mock(Component.class);
    AbstractDefaultAjaxBehavior behavior = new AbstractDefaultAjaxBehavior()
    {
      @Override
      protected void respond(AjaxRequestTarget target)
      {
View Full Code Here

TOP

Related Classes of org.apache.wicket.Component$AddedBehaviorChange

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.