From d61b06b9724280f9e2f51a27c3391f0ca3bbca05 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Tue, 22 Apr 2008 19:57:00 +0000 Subject: [PATCH] polish --- .../faces/webflow/JsfView.java | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java index 51b5c129..aa6bb850 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfView.java @@ -54,9 +54,6 @@ public class JsfView implements View { private static final String MESSAGES_ID = "messages"; - /** - * The root of the JSF component tree managed by this view - */ private UIViewRoot viewRoot; private Lifecycle facesLifecycle; @@ -65,9 +62,9 @@ public class JsfView implements View { private String viewId; - private boolean restored = false; + private boolean restored; - private boolean viewErrors = false; + private boolean viewErrors; public JsfView(UIViewRoot viewRoot, Lifecycle facesLifecycle, RequestContext context) { this.viewRoot = viewRoot; @@ -76,6 +73,22 @@ public class JsfView implements View { this.requestContext = context; } + /** + * Returns the underlying view root. + * @return the view root + */ + public UIViewRoot getViewRoot() { + return this.viewRoot; + } + + /** + * Sets whether or not the view root for this view was restored from storage or is new. + * @param restored true or false + */ + public void setRestored(boolean restored) { + this.restored = restored; + } + /** * This implementation performs the standard duties of the JSF RENDER_RESPONSE phase. */ @@ -119,17 +132,11 @@ public class JsfView implements View { return new Event(this, getEventId()); } - public UIViewRoot getViewRoot() { - return this.viewRoot; - } - public String toString() { return "[JSFView = '" + viewId + "']"; } - public void setRestored(boolean restored) { - this.restored = restored; - } + // internal helpers private void validateModel(FacesContext facesContext) { Object model = getModelObject();