Class 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
    • Method Detail

      • 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