Package org.apache.wicket.settings
Class DebugSettings
- java.lang.Object
-
- org.apache.wicket.settings.DebugSettings
-
public class DebugSettings extends Object
Settings 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 String
getComponentPathAttributeName()
boolean
getComponentUseCheck()
boolean
isAjaxDebugModeEnabled()
Returns status of ajax debug mode.boolean
isDevelopmentUtilitiesEnabled()
Are all of the panels and pages, etc, from wicket-devutils package enabled?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.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.boolean
isOutputMarkupContainerClassName()
Returns whether the output of markup container's should be wrapped by comments containing the container's class name.DebugSettings
setAjaxDebugModeEnabled(boolean enable)
Enables or disables ajax debug mode.DebugSettings
setComponentPathAttributeName(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.DebugSettings
setComponentUseCheck(boolean componentUseCheck)
Sets componentUseCheck debug settingsDebugSettings
setDevelopmentUtilitiesEnabled(boolean enable)
Enables all of the panels and pages, etc, from wicket-devutils package.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.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.DebugSettings
setOutputMarkupContainerClassName(boolean enable)
Enables wrapping output of markup container in html comments that contain markup container's class name.
-
-
-
Constructor Detail
-
DebugSettings
public DebugSettings()
-
-
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:
this
object for chaining
-
setComponentUseCheck
public DebugSettings setComponentUseCheck(boolean componentUseCheck)
Sets componentUseCheck debug settings- Parameters:
componentUseCheck
-- Returns:
this
object 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:
this
object 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:
this
object 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:
this
object for chaining
-
setComponentPathAttributeName
public DebugSettings setComponentPathAttributeName(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: ifcomponentPathAttributeName
is 'data-wicket-path' then Wicket will add an attribute to theComponentTag
for 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
. Ifnull
or empty then the attribute won't be rendered- Returns:
this
object for chaining
-
getComponentPathAttributeName
public String getComponentPathAttributeName()
- Returns:
- The name of the attribute for the
ComponentTag
. Ifnull
or 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:
this
object 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
-
-