@SuppressWarnings( { "unchecked" }) @Override public Iterator<? extends ListItem<T>> iterator() { return (Iterator<? extends ListItem<T>>)super.iterator(); }
/** * Renders all child items in no specified order */ @Override protected final void onRender() { Iterator<? extends Component> it = renderIterator(); while (it.hasNext()) { Component child = it.next(); if (child == null) { throw new IllegalStateException( "The render iterator returned null for a child. Container: " + this.toString() + "; Iterator=" + it.toString()); } renderChild(child); } }
/** * @see org.apache.wicket.MarkupContainer#getMarkup(org.apache.wicket.Component) */ @Override public IMarkupFragment getMarkup(final Component child) { // each direct child gets the markup of this repeater return getMarkup(); }
/** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { onPopulate(); if (getApplication().usesDevelopmentConfig()) { Set<String> usedComponentIds = new HashSet<>(); Iterator<? extends Component> i = iterator(); while (i.hasNext()) { Component c = i.next(); String componentId = c.getId(); if (usedComponentIds.add(componentId) == false) { log.warn("Repeater '{}' has multiple children with the same component id: '{}'", getPageRelativePath(), componentId); // do not flood the log break; } } } super.onBeforeRender(); }
/** * @see org.apache.wicket.Component#onBeforeRender() */ protected void onBeforeRender() { onPopulate(); if (Application.get().getConfigurationType().equals(Application.DEVELOPMENT)) { Iterator i = iterator(); while (i.hasNext()) { Component c = (Component)i.next(); Matcher matcher = SAFE_CHILD_ID_PATTERN.matcher(c.getId()); if (!matcher.matches()) { log.warn("Child component of repeater " + getClass().getName() + ":" + getId() + " has a non-safe child id of " + c.getId() + ". Safe child ids must be composed of digits only."); // do not flood the log break; } } } super.onBeforeRender(); }
/** * Renders all child items in no specified order * * @param markupStream * The markup stream */ @Override protected final void onRender(final MarkupStream markupStream) { final int markupStart = markupStream.getCurrentIndex(); Iterator<? extends Component> it = renderIterator(); if (it.hasNext()) { do { Component child = it.next(); if (child == null) { throw new IllegalStateException("the render iterator returned null for a child"); } markupStream.setCurrentIndex(markupStart); renderChild(child); } while (it.hasNext()); } else { markupStream.skipComponent(); } }
/** * Render a single child. This method can be overridden to modify how a single child component * is rendered. * * @param child * Child component to be rendered */ protected void renderChild(final Component child) { child.render(getMarkupStream()); }
/** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { onPopulate(); if (getApplication().usesDevelopmentConfig()) { Set<String> usedComponentIds = new HashSet<>(); Iterator<? extends Component> i = iterator(); while (i.hasNext()) { Component c = i.next(); String componentId = c.getId(); if (usedComponentIds.add(componentId) == false) { log.warn("Repeater '{}' has multiple children with the same component id: '{}'", getPageRelativePath(), componentId); // do not flood the log break; } } } super.onBeforeRender(); }
/** * @see org.apache.wicket.Component#onBeforeRender() */ @Override protected void onBeforeRender() { onPopulate(); if (Application.get().getConfigurationType().equals(Application.DEVELOPMENT)) { Iterator<? extends Component> i = iterator(); while (i.hasNext()) { Component c = i.next(); Matcher matcher = SAFE_CHILD_ID_PATTERN.matcher(c.getId()); if (!matcher.matches()) { log.warn("Child component of repeater " + getClass().getName() + ":" + getId() + " has a non-safe child id of " + c.getId() + ". Safe child ids must be composed of digits only."); // do not flood the log break; } } } super.onBeforeRender(); }
/** * Renders all child items in no specified order * * @param markupStream * The markup stream */ protected final void onRender(final MarkupStream markupStream) { final int markupStart = markupStream.getCurrentIndex(); Iterator it = renderIterator(); if (it.hasNext()) { do { Component child = (Component)it.next(); if (child == null) { throw new IllegalStateException("the render iterator returned null for a child"); } markupStream.setCurrentIndex(markupStart); renderChild(child); } while (it.hasNext()); } else { markupStream.skipComponent(); } }
/** * Render a single child. This method can be overridden to modify how a single child component * is rendered. * * @param child * Child component to be rendered */ protected void renderChild(final Component child) { child.render(getMarkupStream()); }
/** * Renders all child items in no specified order */ @Override protected final void onRender() { Iterator<? extends Component> it = renderIterator(); while (it.hasNext()) { Component child = it.next(); if (child == null) { throw new IllegalStateException( "The render iterator returned null for a child. Container: " + this.toString() + "; Iterator=" + it.toString()); } renderChild(child); } }
/** * @see org.apache.wicket.MarkupContainer#getMarkup(org.apache.wicket.Component) */ @Override public IMarkupFragment getMarkup(final Component child) { // each direct child gets the markup of this repeater return getMarkup(); }