Package org.apache.wicket.settings
Class PageSettings
- java.lang.Object
-
- org.apache.wicket.settings.PageSettings
-
public class PageSettings extends Object
Class for page related settings.- Author:
- Jonathan Locke, Chris Turner, Eelco Hillenius, Juergen Donnerstag, Johan Compagner, Igor Vaynberg (ivaynberg), Martijn Dashorst, James Carman
-
-
Constructor Summary
Constructors Constructor Description PageSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PageSettings
addComponentResolver(IComponentResolver resolver)
Adds a component resolver to the list.boolean
getCallListenerAfterExpiry()
List<IComponentResolver>
getComponentResolvers()
Get the (modifiable) list of IComponentResolvers.boolean
getRecreateBookmarkablePagesAfterExpiry()
When enabled (default), urls on mounted pages will contain the full mount path, including PageParameters, allowing wicket to reinstantiate the page if got expired.boolean
getVersionPagesByDefault()
PageSettings
setCallListenerAfterExpiry(boolean callAfterExpiry)
Sets a setting that determines whether Wicket should execute theIRequestListener
on a component which owner page is freshly created after expiration of the old onePageSettings
setRecreateBookmarkablePagesAfterExpiry(boolean recreateBookmarkablePagesAfterExpiry)
Sets the recreateBookmarkablePagesAfterExpiry settingPageSettings
setVersionPagesByDefault(boolean pagesVersionedByDefault)
A global setting that tells the pages to update their page id if their component hierarchy changes somehow.
-
-
-
Constructor Detail
-
PageSettings
public PageSettings()
-
-
Method Detail
-
addComponentResolver
public PageSettings addComponentResolver(IComponentResolver resolver)
Adds a component resolver to the list.- Parameters:
resolver
- TheIComponentResolver
that is added- Returns:
this
object for chaining
-
getComponentResolvers
public List<IComponentResolver> getComponentResolvers()
Get the (modifiable) list of IComponentResolvers.- Returns:
- List of ComponentResolvers
-
getVersionPagesByDefault
public boolean getVersionPagesByDefault()
- Returns:
- whether all pages should should update their page id when their component hierarchy changes somehow
-
setVersionPagesByDefault
public PageSettings setVersionPagesByDefault(boolean pagesVersionedByDefault)
A global setting that tells the pages to update their page id if their component hierarchy changes somehow. This way versioned pages can have several versions stored in the page stores and the user can go back and forth through the different versions. If a page is not versioned then only its last state is keep in the page stores and going back will lead the user to the page before the current one, not to the previous state of the current one.- Parameters:
pagesVersionedByDefault
- a flag that indicates whether pages should increase their page id when their component hierarchy changes somehow.- Returns:
this
object for chaining
-
getRecreateBookmarkablePagesAfterExpiry
public boolean getRecreateBookmarkablePagesAfterExpiry()
When enabled (default), urls on mounted pages will contain the full mount path, including PageParameters, allowing wicket to reinstantiate the page if got expired. When disabled, urls only use the page id. If this setting is enabled, you should take care that names form fields on mounted pages do not clash with the page parameters.- Returns:
- if urls on mounted pages should be the full mount path
- See Also:
- WICKET-4014, WICKET-4290
-
setRecreateBookmarkablePagesAfterExpiry
public PageSettings setRecreateBookmarkablePagesAfterExpiry(boolean recreateBookmarkablePagesAfterExpiry)
Sets the recreateBookmarkablePagesAfterExpiry setting- Parameters:
recreateBookmarkablePagesAfterExpiry
-- Returns:
this
object for chaining
-
getCallListenerAfterExpiry
public boolean getCallListenerAfterExpiry()
- Returns:
true
if Wicket should execute anIRequestListener
on a component which owning page is freshly created after expiration of the old one- See Also:
getRecreateBookmarkablePagesAfterExpiry()
,IRequestableComponent.canCallListenerAfterExpiry()
-
setCallListenerAfterExpiry
public PageSettings setCallListenerAfterExpiry(boolean callAfterExpiry)
Sets a setting that determines whether Wicket should execute theIRequestListener
on a component which owner page is freshly created after expiration of the old one- Parameters:
callAfterExpiry
-true
if Wicket should execute the listener- Returns:
this
object for chaining- See Also:
setRecreateBookmarkablePagesAfterExpiry(boolean)
,IRequestableComponent.canCallListenerAfterExpiry()
-
-