Package org.apache.wicket.settings
Class DebugSettings
- java.lang.Object
-
- org.apache.wicket.settings.DebugSettings
-
public class DebugSettings extends java.lang.ObjectSettings class for various debug settingscomponentUseCheck (defaults to true in development mode) - causes the framework to do a check after rendering each page to ensure that each component was used in rendering the markup. If components are found that are not referenced in the markup, an appropriate error will be displayed
- Author:
- Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman
-
-
Constructor Summary
Constructors Constructor Description DebugSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetComponentPathAttributeName()booleangetComponentUseCheck()booleanisAjaxDebugModeEnabled()Returns status of ajax debug mode.booleanisDevelopmentUtilitiesEnabled()Are all of the panels and pages, etc, from wicket-devutils package enabled?booleanisLinePreciseReportingOnAddComponentEnabled()Returns status of line precise error reporting for added components that are not present in the markup: it points to the line where the component was added to the hierarchy in your Java classes.booleanisLinePreciseReportingOnNewComponentEnabled()Returns status of line precise error reporting for new components that are not present in the markup: it points to the line where the component was created in your Java classes.booleanisOutputMarkupContainerClassName()Returns whether the output of markup container's should be wrapped by comments containing the container's class name.DebugSettingssetAjaxDebugModeEnabled(boolean enable)Enables or disables ajax debug mode.DebugSettingssetComponentPathAttributeName(java.lang.String componentPathAttributeName)If the parameter value is non-empty then Wicket will use it as the name of an attribute of the component tag to print theComponent's path.DebugSettingssetComponentUseCheck(boolean componentUseCheck)Sets componentUseCheck debug settingsDebugSettingssetDevelopmentUtilitiesEnabled(boolean enable)Enables all of the panels and pages, etc, from wicket-devutils package.DebugSettingssetLinePreciseReportingOnAddComponentEnabled(boolean enable)Enables line precise error reporting for added components that are not present in the markup: it points to the line where the component was added to the hierarchy in your Java classes.DebugSettingssetLinePreciseReportingOnNewComponentEnabled(boolean enable)Enables line precise error reporting for new components that are not present in the markup: it points to the line where the component was created in your Java classes.DebugSettingssetOutputMarkupContainerClassName(boolean enable)Enables wrapping output of markup container in html comments that contain markup container's class name.
-
-
-
Method Detail
-
getComponentUseCheck
public boolean getComponentUseCheck()
- Returns:
- true if componentUseCheck is enabled
-
isAjaxDebugModeEnabled
public boolean isAjaxDebugModeEnabled()
Returns status of ajax debug mode.- Returns:
- true if ajax debug mode is enabled, false otherwise
-
isLinePreciseReportingOnAddComponentEnabled
public boolean isLinePreciseReportingOnAddComponentEnabled()
Returns status of line precise error reporting for added components that are not present in the markup: it points to the line where the component was added to the hierarchy in your Java classes. This can cause a significant decrease in performance, do not use in customer facing applications.- Returns:
- true if the line precise error reporting is enabled
-
isLinePreciseReportingOnNewComponentEnabled
public boolean isLinePreciseReportingOnNewComponentEnabled()
Returns status of line precise error reporting for new components that are not present in the markup: it points to the line where the component was created in your Java classes. This can cause a significant decrease in performance, do not use in customer facing applications.- Returns:
- true if the line precise error reporting is enabled
-
isOutputMarkupContainerClassName
public boolean isOutputMarkupContainerClassName()
Returns whether the output of markup container's should be wrapped by comments containing the container's class name.- Returns:
- true if the markup container's class name should be written to response
-
setAjaxDebugModeEnabled
public DebugSettings setAjaxDebugModeEnabled(boolean enable)
Enables or disables ajax debug mode.- Parameters:
enable-- Returns:
thisobject for chaining
-
setComponentUseCheck
public DebugSettings setComponentUseCheck(boolean componentUseCheck)
Sets componentUseCheck debug settings- Parameters:
componentUseCheck-- Returns:
thisobject for chaining
-
setLinePreciseReportingOnAddComponentEnabled
public DebugSettings setLinePreciseReportingOnAddComponentEnabled(boolean enable)
Enables line precise error reporting for added components that are not present in the markup: it points to the line where the component was added to the hierarchy in your Java classes. This can cause a significant decrease in performance, do not use in customer facing applications.- Parameters:
enable-- Returns:
thisobject for chaining
-
setLinePreciseReportingOnNewComponentEnabled
public DebugSettings setLinePreciseReportingOnNewComponentEnabled(boolean enable)
Enables line precise error reporting for new components that are not present in the markup: it points to the line where the component was created in your Java classes. This can cause a significant decrease in performance, do not use in customer facing applications.- Parameters:
enable-- Returns:
thisobject for chaining
-
setOutputMarkupContainerClassName
public DebugSettings setOutputMarkupContainerClassName(boolean enable)
Enables wrapping output of markup container in html comments that contain markup container's class name. (Useful for determining which part of page belongs to which markup file).- Parameters:
enable-- Returns:
thisobject for chaining
-
setComponentPathAttributeName
public DebugSettings setComponentPathAttributeName(java.lang.String componentPathAttributeName)
If the parameter value is non-empty then Wicket will use it as the name of an attribute of the component tag to print theComponent's path. This can be useful for debugging and automating tests. For example: ifcomponentPathAttributeNameis 'data-wicket-path' then Wicket will add an attribute to theComponentTagfor each component with name 'data-wicket-path' and as a value the component'spage relative path.- Parameters:
componentPathAttributeName- The name of the attribute for theComponentTag. Ifnullor empty then the attribute won't be rendered- Returns:
thisobject for chaining
-
getComponentPathAttributeName
public java.lang.String getComponentPathAttributeName()
- Returns:
- The name of the attribute for the
ComponentTag. Ifnullor empty then the attribute won't be rendered - See Also:
setComponentPathAttributeName(String)
-
setDevelopmentUtilitiesEnabled
public DebugSettings setDevelopmentUtilitiesEnabled(boolean enable)
Enables all of the panels and pages, etc, from wicket-devutils package.- Parameters:
enable-- Returns:
thisobject for chaining
-
isDevelopmentUtilitiesEnabled
public boolean isDevelopmentUtilitiesEnabled()
Are all of the panels and pages, etc, from wicket-devutils package enabled?- Returns:
- true if all of the panels and pages, etc, from wicket-devutils package are enabled
-
-