This commit is contained in:
Keith Donald
2008-04-22 19:57:00 +00:00
parent 2986352200
commit d61b06b972

View File

@@ -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();