Package org.apache.wicket

Examples of org.apache.wicket.Component


    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


      PathInfo pathInfo = new PathInfo(reference, container, markupStream);

      // Try to find the Page matching the href
      // Note: to not use tag.getId() because it will be modified while
      // resolving the link and hence the 2nd render will fail.
      Component link = resolveAutomaticLink(pathInfo, WicketLinkTagHandler.AUTOLINK_ID, tag);

      if (log.isDebugEnabled())
      {
        log.debug("Added autolink " + link);
      }
View Full Code Here

      tag.setAutoComponentTag(true);
    }

    // now get the resolver delegate
    IAutolinkResolverDelegate autolinkResolverDelegate = tagNameToAutolinkResolverDelegates.get(tagName);
    Component autoComponent = null;
    if (autolinkResolverDelegate != null)
    {
      autoComponent = autolinkResolverDelegate.newAutoComponent(autoId, pathInfo);
    }
View Full Code Here

    componentsFrozen = true;

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

      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

      spaces.append(' ').append(' ');
      result.append('\n').append(spaces).append(slot.fieldDescription);
      result.append(" [class=").append(Classes.name(slot.object.getClass()));
      if (slot.object instanceof Component)
      {
        Component component = (Component)slot.object;
        result.append(", path=").append(component.getPath());
      }
      result.append(']');
    }
    result.append(" <----- field that is causing the problem");
    return result.toString();
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

    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

        Iterator<Map.Entry<String, Component>> entriesItor = map.entrySet().iterator();
        while (entriesItor.hasNext())
        {
          Map.Entry<String, Component> entry = entriesItor.next();
          String componentId = entry.getKey();
          Component component = entry.getValue();
          if (isControllerOfEnclosure(component, enclosure))
          {
            enclosure.updateVisibility();
            target.add(enclosure);
            visit.dontGoDeeper();
View Full Code Here

TOP

Related Classes of org.apache.wicket.Component

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.