mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
f84022a1d8
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. |
||
---|---|---|
.. | ||
build | ||
config | ||
dist | ||
dom | ||
external | ||
pluggable-jvm | ||
plugins | ||
util | ||
webclient | ||
xpcom | ||
.cvsignore | ||
build.properties.sample | ||
build.xml | ||
changelo | ||
makefiles | ||
README | ||
README.commercial |
20040222 This README documents the Java Enhancers to the Mozilla web browser. Currently, the only active sub-project is the Webclient Java API to the Mozilla web browser. This project also leverages the JavaDOM sub-project. Requirements: * J2SDK 1.3.1 or later * Apache ant 1.4.1 or later. If running under J2SDK 1.4.2 or later, you need ant 1.6.1, due to javah issues. * Successfully built debug enabled Mozilla 1.6 tree How To Build: * cd to the directory above your top level mozilla directory and cvs checkout the Webclient module. * Modify mozilla/allmakefiles.sh and prepend the contents of the file "makefiles", in this directory, to add_makefiles section after the "Common makfiles used by everyone" comment. * re-run ./configure to generate the java makefiles * put the "mozilla/dist/bin" directory in your LD_LIBRARY_PATH on Unix, or PATH on Win32. * set the value of the environment var MOZ_JDKHOME to be your J2SDK directory. * Create a build.properties file in the mozilla/java directory with the following contents. ###### build.unix.classes=true build.win32.classes=false build.home=/home/edburns/Projects/mozilla/MOZILLA_1_4/mozilla/dist/classes compile.debug=true ###### Of course, set the values of the above properties correctly according to your system. * run "ant" in the mozilla/java directory. This will build webclient and all dependent libraries. How to run the Junit tests: * Make sure junit.jar is properly set in your mozilla/java/build.properties * Make sure junit.jar is installed in your $ANT_HOME/lib directory * Set the following variables in your environment NSPR_LOG_MODULES=webclient:4,webclientstub:4 NSPR_LOG_FILE=logfile.txt * cd to mozilla/java/webclient * Kill any running mozilla instances. These will mess up the profilemanager code. * run ant test How to run the test browser (broken as of this writing): * cd to mozilla/java/webclient/src_moz and run the "runem" batch file to run the test browser. Problems? * post to netscape.public.mozilla.java newsgroup