gecko-dev/java/webclient
edburns%acm.org f84022a1d8 [11-StateSavingWindowId]
This change-bundle implements the FULL proposal for this, as well as
covering some corner-cases not in the initial proposal.

I have yet to get the last stamp of approval from the EG, but I'm
confident we'll get it, so I'm checking it in now.

r=visvan.

SECTION: API Changes

M jsf-api/src/javax/faces/application/StateManager.java

- reword the class description for readability

- saveSerializedView

  Deprecate this.  Make it no-longer abstract.  Provide default impl
  that returns null.

- saveView

  new method.  Replaces saveSerializedView.  Provide default impl that
  calls through to saveSerializedView().


- writeState that takes Object

  new method.  Provide default impl:

+     * <p>For backwards compatability with existing
+     * <code>StateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>Object []</code> of length greater than or
+     * equal to two.  If so, it creates a <code>SerializedView</code>
+     * instance with the tree structure coming frome element zero and
+     * the component state coming from element one and calls through to
+     * {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- getTreeStructureToSave
- getComponentStateToSave
- restoreTreeStructure
- restoreComponentState

  Deprecate these.  Provide default impl that returns null or no-ops.

- SerializedView

  Deprecate this.

M jsf-api/src/javax/faces/application/StateManagerWrapper.java

- add new methods.

M jsf-api/src/javax/faces/render/ResponseStateManager.java

- writeState that takes Object

  new method.

+     * <p>For backwards compatability with existing
+     * <code>ResponseStateManager</code> implementations, the default
+     * implementation of this method checks if the argument is an
+     * instance of <code>SerializedView</code>.  If so, it calls through
+     * to {@link
+     * #writeState(javax.faces.context.FacesContext,javax.faces.application.StateManager.SerializedView}.
+     * If not, does nothing.</p>

- writeState that takes SerializedView

+     * @deprecated This method has been replaced by {@link
+     * #writeState(javax.faces.context.FacesContext,java.lang.Object)}.
+     * The default implementation of this method does nothing.
+     *

- getState

  new method.

- getTreeStructureToRestore
- getComponentStateToRestore

  Deprecate these.  Provide default impl that returns null or no-ops.

SECTION: RI Changes

M jsf-ri/src/com/sun/faces/application/StateManagerImpl.java

  Provide implementations for deprecated methods that will be called by
  the default implementations of the new methods in StateManager.

  - saveSerializedView(): no functional change since last version

M jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java

- move the responsibility for doing the redirect to createView() from
  renderView(), since it was only designed to catch the initial request.

M jsf-ri/src/com/sun/faces/lifecycle/RestoreViewPhase.java

- introduce private isPostback() method.

+     * @return true if the request method is POST or PUT, or the method
+     * is GET but there are query parameters, or the request is not an
+     * instance of HttpServletRequest.

  Only call restoreView() if isPostback(), otherwise call createView().

M jsf-ri/src/com/sun/faces/renderkit/ResponseStateManagerImpl.java

- modify getTreeStructureToRestore() so it knows the value of the hidden
  field is only a string, not a base64 encoded object tree, if the
  stateSavingMethod is server.

- modify writeState() to not encode the view if we're saving state in
  the server, just write out the id.

- remove unused replaceMarkers method.

M jsf-ri/src/com/sun/faces/taglib/jsf_core/ViewTag.java

- leverage new APIs and rely on impl to delegate to deprecated APIs for
  backwards compatability.

M jsf-ri/systest/build-tests.xml
M jsf-ri/systest/src/com/sun/faces/htmlunit/AbstractTestCase.java
M jsf-ri/systest/src/com/sun/faces/jsptest/JspIntegrationTestCase.java
M jsf-ri/test/com/sun/faces/FacesTestCaseService.java
M jsf-ri/test/com/sun/faces/lifecycle/TestApplyRequestValuesPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestLifecycleImpl_initial.java
M jsf-ri/test/com/sun/faces/lifecycle/TestPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestProcessValidationsPhase.java
M jsf-ri/test/com/sun/faces/lifecycle/TestRestoreViewPhase.java
M jsf-ri/web/test/RenderResponse_correct
M jsf-ri/web/test/TestLifecycleImpl_initial_correct
M jsf-ri/web/test/TestViewHandlerImpl_correct

- Oof, mondo changes here.
2005-03-17 01:56:55 +00:00
..
bal
bal_test
classes_spec/org/mozilla/webclient [11-StateSavingWindowId] 2005-03-17 01:56:55 +00:00
config
import
src_ie Make webclient compile with Mozilla 1.6. Unit tests still don't run. 2004-02-23 06:26:54 +00:00
src_moz This checkin enables obtaining an InputStream to read the POST body from 2005-03-13 17:56:16 +00:00
src_share This checkin enables finding out the request method and response status 2005-02-28 17:15:45 +00:00
test *** empty log message *** 2005-03-14 00:37:55 +00:00
.cvsignore ? build.test 2005-01-19 13:33:31 +00:00
build-tests.xml This checkin re-enables 2005-02-07 04:59:50 +00:00
build.xml This checkin enables finding out the request method and response status 2005-02-28 17:15:45 +00:00
changelo
README

Here lies the MozWebShell java wrapper to mozilla M8.

Authors: Kirk Baker <kbaker@eb.com>
         Ian Wilkinson <iw@ennoble.co>

Build hacking and packaging: Ed Burns <edburns@acm.org>

Unix port: Mark Lin <mark.lin@eng.sun.com>

========================================================================
Win32 Build Directions:
========================================================================
Requirements:

* built mozilla with source code from after 10/5/99

* JDK1.1.7 or greater

* built org.mozilla.util java classes (see NOTE_UTIL)

* Perl 5 perl.exe must be in your path

How To Build:

* Follow the directions in ..\README

* type "nmake /f makefile.win all" and hope for the best

How to Run:

* once the build has successfully completed, run this batch file:

  .\src\WIN32_D.OBJ\runem.bat <opt: YOUR_URL>

  Note that YOUR_URL is probably necessary since firewall support wasn't
  working in M8.


Problems:

* clobber_all doesn't remove the .class files from dist\classes.  You
  have to do this manually.

* post to netscape.public.mozilla.java newsgroup

========================================================================
Unix Build Directions (currently only Linux, 
Solaris support is coming soon):
========================================================================
Requirements:

* built mozilla tree for some variant of Linux

* JDK1.2 with native threads support from http://www.blackdown.org 
(JDK1.1 doesn't seem to work)

* built org.mozilla.util java classes (see NOTE_UTIL)

How To Build:

* Follow the directions in ../util/README

* set JDKHOME to where your JDK install directory resides 
	-> setenv JDKHOME /usr/local/jdk1.2

* cd to 'classes' and type "make -f makefile.unix" and hope for the best
	-> cd classes; make -f Makefile.unix

* then cd to 'src' and type "make -f makefile.unix" and hope for the best
	-> cd src; make -f Makefile.unix

How to Run:

* once the build has successfully completed, run 'runem.unix' in your
'src' directory:
	-> cd src; ./runem.unix <YOUR_URL>

  Note that YOUR_URL is probably necessary since firewall support wasn't
  working in M8.

Problems? Email mark.lin@eng.sun.com or post to netscape.public.mozilla.java.

========================================================================
NOTE_UTIL:
========================================================================
* this package depends on the org.mozilla.util classes, which can be
  found in the mozilla tree under mozilla\java\util.  They are a
  separate checkout and build.  Once you check out the org.mozilla.util
  classes, see the README in the mozilla\java\util\README.

General notes:

* Please update the ChangeLog (changelo) when you make changes.