Package org.apache.wicket

Examples of org.apache.wicket.Component$ComponentBorderChange


   *            path to component
   * @return a <code>Result</code>
   */
  public Result isDisabled(final String path)
  {
    Component component = getComponentFromLastRenderedPage(path);
    if (component == null)
    {
      fail("path: '" + path + "' does no exist for page: " +
        Classes.simpleName(getLastRenderedPage().getClass()));
    }

    return isFalse("component '" + path + "' is enabled", component.isEnabledInHierarchy());
  }
View Full Code Here


   *            path to component
   * @return a <code>Result</code>
   */
  public Result isRequired(String path)
  {
    Component component = getComponentFromLastRenderedPage(path);
    if (component == null)
    {
      fail("path: '" + path + "' does no exist for page: " +
        Classes.simpleName(getLastRenderedPage().getClass()));
    }
View Full Code Here

   *            AjaxLink and AjaxSubmitLink will fail, since it wouldn't work in real life.
   *            AjaxFallbackLink will be invoked with null as the AjaxRequestTarget parameter.
   */
  public void clickLink(String path, boolean isAjax)
  {
    Component linkComponent = getComponentFromLastRenderedPage(path);

    checkUsability(linkComponent, true);

    // if the link is an AjaxLink, we process it differently
    // than a normal link
View Full Code Here

   *            the event which we simulate being fired. If <code>event</code> is
   *            <code>null</code>, the test will fail.
   */
  public void executeAjaxEvent(final String componentPath, final String event)
  {
    Component component = getComponentFromLastRenderedPage(componentPath);
    executeAjaxEvent(component, event);
  }
View Full Code Here

  public Component resolve(MarkupContainer container, MarkupStream markupStream, ComponentTag tag)
  {
    // localize any raw markup that has wicket:message attrs
    if ((tag != null) && (tag.getId().startsWith(WICKET_MESSAGE_CONTAINER_ID)))
    {
      Component wc = null;
      int autoIndex = container.getPage().getAutoIndex();
      String id = WICKET_MESSAGE_CONTAINER_ID + autoIndex;

      if (tag.isOpenClose())
      {
View Full Code Here

   * @param component
   * @return path
   */
  protected String getResourcePath(final Component component)
  {
    Component current = Args.notNull(component, "component");

    final StringBuilder buffer = new StringBuilder();
   
    while (current.getParent() != null)
    {
      final boolean skip = current.getParent() instanceof AbstractRepeater;

      if (skip == false)
      {
        if (buffer.length() > 0)
        {
          buffer.insert(0, '.');
        }
        buffer.insert(0, current.getId());
      }
      current = current.getParent();
    }
    return buffer.toString();
  }
View Full Code Here

   * @param expectedValue
   *            expected value of the component's model
   */
  public void assertModelValue(String path, Object expectedValue)
  {
    Component component = getComponentFromLastRenderedPage(path);
    assertEquals(expectedValue, component.getDefaultModelObject());
  }
View Full Code Here

        }
      };

      final FeedbackMessage message = listItem.getModelObject();
      message.markRendered();
      final Component label = newMessageDisplayComponent("message", message);
      final AttributeModifier levelModifier = new AttributeModifier("class", replacementModel);
      label.add(levelModifier);
      listItem.add(levelModifier);
      listItem.add(label);
    }
View Full Code Here

      {
        path =  componentIdPageId + path;
      }
    }

    Component component = getLastRenderedPage().get(path);
    if (component == null)
    {
      fail("path: '" + path + "' does not exist for page: " +
        getLastRenderedPage().getClass().getSimpleName());
      return null;
    }

    if (!wantVisibleInHierarchy || component.isVisibleInHierarchy())
    {
      return component;
    }

    // Not found or not visible
View Full Code Here

   *            expected component class
   * @return a <code>Result</code>
   */
  public <C extends Component> Result isComponent(String path, Class<C> expectedComponentClass)
  {
    Component component = getComponentFromLastRenderedPage(path);
    if (component == null)
    {
      return Result.fail("Component not found: " + path);
    }

    return isTrue("component '" + component.getClass().getSimpleName() + "' is not type:" +
      expectedComponentClass.getSimpleName(),
      expectedComponentClass.isAssignableFrom(component.getClass()));
  }
View Full Code Here

TOP

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

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.