public PageState getPageState(FacesContext facesContext) {
if (FacesUtils.hasValueBindingOrValueExpression(this, Attributes.STATE)) {
PageState state = (PageState)
FacesUtils.getValueFromValueBindingOrValueExpression(facesContext, this, Attributes.STATE);
if (state == null) {
state = new PageStateImpl();
FacesUtils.setValueOfBindingOrExpression(facesContext, state, this, Attributes.STATE);
}
return state;
} else {
return null;