/** * Removes this component from its parent. It's important to remember that a component that is * removed cannot be referenced from the markup still. */ public final void remove() { if (parent == null) { throw new IllegalStateException("Cannot remove " + this + " from null parent!"); } parent.remove(this); }
/** * Removes this component from its parent. It's important to remember that a component that is * removed cannot be referenced from the markup still. * <p> * You must not use this method in your callback to any of the * {@link MarkupContainer#visitChildren(IVisitor)} methods. See <a * href="https://issues.apache.org/jira/browse/WICKET-3229">WICKET-3329</a>. */ public final void remove() { if (parent == null) { throw new IllegalStateException("Cannot remove " + this + " from null parent!"); } parent.remove(this); }
/** * Removes this component from its parent. It's important to remember that a component that is * removed cannot be referenced from the markup still. * <p/> * You must not use this method in your callback to any of the * {@link MarkupContainer#visitChildren(IVisitor)} methods. See {@link href * https://issues.apache.org/jira/browse/WICKET-3229}. */ public final void remove() { if (parent == null) { throw new IllegalStateException("Cannot remove " + this + " from null parent!"); } parent.remove(this); }
/** * Removes this component from its parent. It's important to remember that a component that is * removed cannot be referenced from the markup still. * <p> * You must not use this method in your callback to any of the * {@link MarkupContainer#visitChildren(IVisitor)} methods. See <a * href="https://issues.apache.org/jira/browse/WICKET-3229">WICKET-3329</a>. */ public final void remove() { if (parent == null) { throw new IllegalStateException("Cannot remove " + this + " from null parent!"); } parent.remove(this); }
@Override public WebMarkupContainer remove(final Component component) { getParent().remove(this); return this; } }
/** * Removes the given component * * @param id * The id of the component to remove */ public final void remove(final String id) { if (id == null) { throw new IllegalArgumentException("argument id may not be null"); } final Component component = get(id); if (component != null) { remove(component); } else { throw new WicketRuntimeException("Unable to find a component with id '" + id + "' to remove"); } }
/** * Removes the given component * * @param id * The id of the component to remove */ public final void remove(final String id) { if (id == null) { throw new IllegalArgumentException("argument id may not be null"); } final Component component = get(id); if (component != null) { remove(component); } else { throw new WicketRuntimeException("Unable to find a component with id '" + id + "' to remove"); } }
/** * Removes the given component * * @param id * The id of the component to remove * @return {@code this} for chaining */ public MarkupContainer remove(final String id) { Args.notNull(id, "id"); final Component component = get(id); if (component != null) { remove(component); } else { throw new WicketRuntimeException("Unable to find a component with id '" + id + "' to remove"); } return this; }
/** * Removes the given component * * @param id * The id of the component to remove * @return {@code this} for chaining */ public MarkupContainer remove(final String id) { Args.notNull(id, "id"); final Component component = get(id); if (component != null) { remove(component); } else { throw new WicketRuntimeException("Unable to find a component with id '" + id + "' to remove"); } return this; }
if (parent != null) parent.remove(component);
if (parent != null) parent.remove(component);
if (parent != null && parent != this) parent.remove(child);
if (parent != null && parent != this) parent.remove(child);