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.
I tried creating fields in my FacesComponent, but I discovered they are wiped out during the JSF lifecycle:
@FacesComponent(value = "bfTableComponent")
public class BFTableComponent extends UIComponentBase implements NamingContainer {
private int currentPageNumber;
...
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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…