/** * Filters which components' render performance should be measured. * * @param component * the component that is instantiated * @return {@code true} if render time should be measured the for this component, {@code false} * - otherwise */ protected boolean accepts(final Component component) { return component.isAuto() == false; }
/** * Filters which components' render performance should be measured. * * @param component * the component that is instantiated * @return {@code true} if render time should be measured the for this component, {@code false} * - otherwise */ protected boolean accepts(final Component component) { return component.isAuto() == false; }
/** * * @param component */ final void componentStateChanging(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * * @param component */ final void componentStateChanging(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * A component was added. * * @param component * The component that was added */ final void componentAdded(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * A component was removed. * * @param component * The component that was removed */ final void componentRemoved(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * A component was added. * * @param component * The component that was added */ final void componentAdded(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * A component was removed. * * @param component * The component that was removed */ final void componentRemoved(final Component component) { if (!component.isAuto()) { dirty(); } }
/** * This method will be called for all components that are changed on the page So also auto * components or components that are not versioned. * * If the parent is given that it was a remove or add from that parent of the given component. * else it was just a internal property change of that component. * * @param component * @param parent */ protected void componentChanged(Component component, MarkupContainer parent) { if (!component.isAuto()) { dirty(); } }
/** * This method will be called for all components that are changed on the page So also auto * components or components that are not versioned. * * If the parent is given that it was a remove or add from that parent of the given component. * else it was just a internal property change of that component. * * @param component * @param parent */ protected void componentChanged(Component component, MarkupContainer parent) { if (!component.isAuto()) { dirty(); } }
@Override public void beforeRender(final Component component) { super.beforeRender(component); if (component.isAuto() == false) { Long now = System.currentTimeMillis(); component.setMetaData(PageView.RENDER_KEY, now); } }
@Override public void beforeRender(final Component component) { super.beforeRender(component); if (component.isAuto() == false) { Long now = System.currentTimeMillis(); component.setMetaData(PageView.RENDER_KEY, now); } }
/** * Checks whether the hierarchy may be changed at all, and throws an exception if this is not * the case. * * @param component * the component which is about to be added or removed */ protected void checkHierarchyChange(final Component component) { // Throw exception if modification is attempted during rendering if (getRequestFlag(RFLAG_RENDERING) && !component.isAuto()) { throw new WicketRuntimeException( "Cannot modify component hierarchy after render phase has started (page version cant change then anymore)"); } }
/** * Checks whether the hierarchy may be changed at all, and throws an exception if this is not * the case. * * @param component * the component which is about to be added or removed */ protected void checkHierarchyChange(final Component component) { // Throw exception if modification is attempted during rendering if (getRequestFlag(RFLAG_RENDERING) && !component.isAuto()) { throw new WicketRuntimeException( "Cannot modify component hierarchy after render phase has started (page version cant change then anymore)"); } }
/** * Checks whether the hierarchy may be changed at all, and throws an exception if this is not * the case. * * @param component * the component which is about to be added or removed */ protected void checkHierarchyChange(final Component component) { // Throw exception if modification is attempted during rendering if (!component.isAuto() && getFlag(FLAG_RENDERING)) { throw new WicketRuntimeException( "Cannot modify component hierarchy after render phase has started (page version cant change then anymore)"); } }
/** * Checks whether the hierarchy may be changed at all, and throws an exception if this is not * the case. * * @param component * the component which is about to be added or removed */ protected void checkHierarchyChange(final Component component) { // Throw exception if modification is attempted during rendering if (!component.isAuto() && getFlag(FLAG_RENDERING)) { throw new WicketRuntimeException( "Cannot modify component hierarchy during render phase"); } }
@Override public void afterRender(final Component component) { super.afterRender(component); Long renderEnd = System.currentTimeMillis(); Long renderStart = component.getMetaData(PageView.RENDER_KEY); if (renderStart != null && component.isAuto() == false) { Long duration = renderEnd - renderStart; component.setMetaData(PageView.RENDER_KEY, duration); if (log.isDebugEnabled()) { String componentPath = (component instanceof Page) ? Classes.simpleName(component.getClass()) + " page" : component.getPageRelativePath(); log.debug("rendered '{}' for {}ms", componentPath, duration); } } } }
@Override public void afterRender(final Component component) { super.afterRender(component); Long renderEnd = System.currentTimeMillis(); Long renderStart = component.getMetaData(PageView.RENDER_KEY); if (renderStart != null && component.isAuto() == false) { Long duration = renderEnd - renderStart; component.setMetaData(PageView.RENDER_KEY, duration); if (log.isDebugEnabled()) { String componentPath = (component instanceof Page) ? Classes.simpleName(component.getClass()) + " page" : component.getPageRelativePath(); log.debug("rendered '{}' for {}ms", componentPath, duration); } } } }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. * <p> * Responds to a request to re-render a single component. * </p> * <p> * NOTE: This method is typically only used for testing purposes. * </p> * * @param component * to be re-rendered */ public final void request(final Component component) { checkReuse(); if (component.isAuto()) { throw new WicketRuntimeException("Auto-added components can not be re-rendered"); } request(new ComponentRequestTarget(component)); }
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. * <p> * Responds to a request to re-render a single component. * </p> * <p> * NOTE: This method is typically only used for testing purposes. * </p> * * @param component * to be re-rendered */ public final void request(final Component component) { checkReuse(); if (component.isAuto()) { throw new WicketRuntimeException("Auto-added components can not be re-rendered"); } request(new ComponentRequestTarget(component)); }