Re: How to access viewstate in Xpages
The FacesContext object is the "brains" of an XPage. You can access it from SSJS via the global variable facesContext, or from Java via FacesContext.getCurrentInstance(). From there you can get the view root and inspect the entire component tree.