How to save state when extending UIComponentBase <p>I'm creating a composite component that will wrap a datatable to implement very simple paging. I need to save state (the current page number) between ajax requests.</p> <p>I tried creating fields in my FacesComponent, but I discovered they are wiped out during the JSF lifecycle:</p> <pre><code>@FacesComponent(value = "bfTableComponent") public class BFTableComponent extends UIComponentBase implements NamingContainer { private int currentPageNumber; ... </code></pre> <p>I can't seems to find a concise guide to doing this anywhere! How would one save state between requests when creating a composite component?</p>