/** * @see org.apache.wicket.jmx.DebugSettingsMBean#getComponentUseCheck() */ @Override public boolean getComponentUseCheck() { return application.getDebugSettings().getComponentUseCheck(); }
/** * Adds a component to the set of rendered components. * * @param component * The component that was rendered */ public final void componentRendered(final Component component) { // Inform the page that this component rendered if (getApplication().getDebugSettings().getComponentUseCheck()) { if (renderedComponents == null) { renderedComponents = new HashSet<Component>(); } if (renderedComponents.add(component) == false) { throw new MarkupException( "The component " + component + " was rendered already. You can render it only once during a render phase. Class relative path: " + component.getClassRelativePath()); } log.debug("Rendered {}", component); } }
/** * Adds a component to the set of rendered components. * * @param component * The component that was rendered */ public final void componentRendered(final Component component) { // Inform the page that this component rendered if (getApplication().getDebugSettings().getComponentUseCheck()) { if (renderedComponents == null) { renderedComponents = new HashSet<Component>(); } if (renderedComponents.add(component) == false) { throw new MarkupException( "The component " + component + " was rendered already. You can render it only once during a render phase. Class relative path: " + component.getClassRelativePath()); } log.debug("Rendered {}", component); } }
if (debugSettings.getComponentUseCheck())
if (debugSettings.getComponentUseCheck())
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }
/** * Constructor. * * @param id * Component id * @param application * The application to view */ public ApplicationView(final String id, final Application application) { super(id); // Basic attributes add(new Label("name", application.getName())); add(new Label("componentUseCheck", "" + application.getDebugSettings().getComponentUseCheck())); add(new Label("compressWhitespace", "" + application.getMarkupSettings().getCompressWhitespace())); add(new Label("stripComments", "" + application.getMarkupSettings().getStripComments())); add(new Label("stripWicketTags", "" + application.getMarkupSettings().getStripWicketTags())); add(new Label("bufferResponse", "" + application.getRequestCycleSettings().getBufferResponse())); add(new Label("resourcePollFrequency", "" + application.getResourceSettings().getResourcePollFrequency())); add(new Label("versionPages", "" + application.getPageSettings().getVersionPagesByDefault())); } }
/** * Constructor. All components have names. A component's id cannot be null. This constructor * includes a model. * * @param id * The non-null id of this component * @param model * The component's model * * @throws WicketRuntimeException * Thrown if the component has been given a null id. */ public Component(final String id, final IModel<?> model) { checkId(id); this.id = id; init(); Application application = getApplication(); application.getComponentInstantiationListeners().onInstantiation(this); final DebugSettings debugSettings = application.getDebugSettings(); if (debugSettings.isLinePreciseReportingOnNewComponentEnabled() && debugSettings.getComponentUseCheck()) { setMetaData(CONSTRUCTED_AT_KEY, ComponentStrings.toString(this, new MarkupException("constructed"))); } if (model != null) { setModelImpl(wrap(model)); } }
/** * Constructor. All components have names. A component's id cannot be null. This constructor * includes a model. * * @param id * The non-null id of this component * @param model * The component's model * * @throws WicketRuntimeException * Thrown if the component has been given a null id. */ public Component(final String id, final IModel<?> model) { checkId(id); this.id = id; init(); Application application = getApplication(); application.getComponentInstantiationListeners().onInstantiation(this); final DebugSettings debugSettings = application.getDebugSettings(); if (debugSettings.isLinePreciseReportingOnNewComponentEnabled() && debugSettings.getComponentUseCheck()) { setMetaData(CONSTRUCTED_AT_KEY, ComponentStrings.toString(this, new MarkupException("constructed"))); } if (model != null) { setModelImpl(wrap(model)); } }
if (getApplication().getDebugSettings().getComponentUseCheck())
if (getApplication().getDebugSettings().getComponentUseCheck())
&& debugSettings.getComponentUseCheck())
&& debugSettings.getComponentUseCheck())