dev@javaserverfaces.java.net

Re: merge wta-head to jsf-head part one of four

From: Jayashri Visvanathan <Jayashri.Visvanathan_at_Sun.COM>
Date: Wed, 20 Apr 2005 16:34:17 -0700

Two comments:
1)

M jsf-ri/src/com/sun/faces/context/ExternalContextImpl.java

- NOTSURE:

  Use generic Maps as the type of the ivars.

  Use Collections.unmodifiableMap() where possible.


Could you please roll back the above changes, because these are based on
Unified EL and are not needed for TCCI.

2) Noticed some System.out.println statements in ViewHandlerImpl.

Other than that, looks good to me. r=jayashri.

Thanks for doing this.
-Jayashri

Ed Burns wrote:

>https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=117
>
>Reviewers: please give special attention to entries marked
>
>NOTSURE:
>
>Step one of four for merging webtier-alignment HEAD (wta-head) into
>javaserverfaces-sources HEAD (jsf-head):
>
> core code:
>
> merge the everything but code that depends on the new EL.
>
> automated tests:
>
> jsf-api and jsf-ri automated tests currently fail and need to be
> made to run again. This will happen after we complete step two of
> three.
>
>Step two of four will be to create a branch of jsf-head to preserve the
>pre merge state.
>
>Step three of four will be to merge in the remaining changes from
>wta-head. This will introduce a dependency into jsf-head on the not yet
>public JSP 2.1 container. People still wanting to run the latest faces on JSP
>1.2 must use the branch created in step two of four.
>
>Step four of four will be to get the automated tests running again.
>
>SECTION: API New Files
>
>A jsf-api/src/javax/faces/webapp/UIComponentClassicTagBase.java
>
>- the same as the one on webtier-alignment HEAD except:
>
> createVerbatimComponent():
>
> * <p>This implementation includes a hack to work around the absence
> * of JspIdConsumer in non JSP 2.1 containers. PENDING(edburns):
> * remove this hack when we get to JSP 2.1</p>
>
> findComponent():
>
> On a postback, for the ViewTag, if we don't have a binding, make sure
> to increment the viewRoot's uniqueId counter so that the inlined
> verbatim components match up properly.
>
>A jsf-api/src/javax/faces/webapp/UIComponentTagBase.java
>
>- the same as the one on webtier-alignment HEAD except:
>
> getELContext() is missing, since it depends on new EL API.
>
>SECTION: API Changes
>
>M jsf-api/build.xml
>
>- turn on assertions
>
>- use source=1.4 for javadoc
>
>M jsf-api/doc/standard-html-renderkit.xml
>M jsf-api/doc/standard-html-renderkit-base.xml
>
>- add renders-children==true for all standard renderers
>
>M jsf-api/src/javax/faces/component/UIComponent.java
>
>- copy javadocs from wta-head for getRendersChildren()
>
>- add encodeAll() from wta-head
>
>+ * <p>If this component returns <code>true</code> from {_at_link
>+ * #isRendered}, render this component and all its children that
>+ * return <code>true</code> from <code>isRendered()</code>,
>+ * regardless of the value of the {_at_link #getRendersChildren} flag.
>+ * </p>
>+ *
>+ * @since 1.2
>+ *
>+ * @exception IOException if an input/output error occurs while rendering
>+ * @exception NullPointerException if <code>context</code>
>+ * is <code>null</code>
>
>- add to processSaveState() that transient components must be skipped.
>
>M jsf-api/src/javax/faces/component/UIComponentBase.java
>
>- copy class javadocs from wta-head
>
>- add impl of encodeAll().
>
>- in processSaveState(), skip transient children and facets.
>
>- add new methods: getNonTransientChildLength() getNonTransientFacetLength()
>
>- in processRestoreState(), assert that we are not transient.
>
>M jsf-api/src/javax/faces/component/UIForm.java
>
>- javadoc changes, including changing id to clientId in the javadoc for
> getContainerClientId.
>
>M jsf-api/src/javax/faces/render/Renderer.java
>
>- modify encodeChildren to just call encodeAll().
>
>M jsf-api/src/javax/faces/render/ResponseStateManager.java
>
>- javadoc changes for [50-MultipleRenderKits]
>
> new constant RENDER_KIT_ID_PARAM
>
> javadoc changes to writeState()
>
>- fix typo for s/SERVER/CLIENT/ where we talk about the state encrypting.
>
>M jsf-api/src/javax/faces/webapp/AttributeTag.java
>
>- deprecate this class.
>
>- leverage UIComponentClassicTagBase.
>
>- add doEndTag() that releases us.
>
>M jsf-api/src/javax/faces/webapp/ConverterTag.java
>
>- deprecate this class.
>
>- leverage UIComponentClassicTagBase.
>
>- if converter turns out to be null, throw JspException with a nice
> error message.
>
>M jsf-api/src/javax/faces/webapp/UIComponentBodyTag.java
>
>+ // remove all methods since UIComponentTag is now a body tag.
>
>M jsf-api/src/javax/faces/webapp/UIComponentTag.java
>
>- most of the functionality has been moved to UIComponentClassicTagBase.
>
>- the rest is just a copy of wta-head.
>
>M jsf-api/src/javax/faces/webapp/ValidatorTag.java
>
>- deprecate this class.
>
>- leverage UIComponentClassicTagBase
>
>- if validator turns out to be null, throw JspException with a nice
> error message.
>
>M jsf-api/test/javax/faces/webapp/UIComponentTagTestCase.java
>
>- account for new responsewriter creation rules.
>
>- test still doesn't run, needs more work.
>
>SECTION: RI New Files
>
>A jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java
>
> * <p>This class is used by {_at_link ViewHandler#createView} to obtain the
> * text that exists after the &lt;f:view&gt; tag.</p>
>
> straight copy from wta-head
>
>SECTION: RI Changes
>
>M jsf-ri/conf/test/web.xml
>
>- convert to schema and servlet 2.4
>
>M jsf-ri/src/com/sun/faces/RIConstants.java
>
>- added
>
>+ public static final String SAVED_STATE = FACES_PREFIX + "savedState";
>
> Used from ViewHandler.
>
>M jsf-ri/src/com/sun/faces/application/StateManagerImpl.java
>
>- we don't remove the transientChildrenAndFacets any more. We just
> check for id uniqueness. Removal is now done in ViewHandler.
>
>M jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java
>
>- the heart of the chages for TCCI
>
> * create a ViewHandlerResponseWrapper that is used by ViewTag to allow
> content that follows the <f:view> tag to appear in the proper place
> in the page.
>
> * execute the JSP page. Rely on changes to JSP tag layer to have it
> build the tree only, but not render it.
>
> * create the responseWriter here, instead of having the JSP layer do
> it. This is possible and desireable since the JSP layer no longer
> writes anything to the response (except for the ViewTag).
>
> * call responseWriter.startDocument()
>
> * call viewRoot.encodeAll(), followed by logic that leverages the
> ViewHandlerRespnoseWrapper to write out the text after the <f:view>
> tag.
>
> * call responseWriter.endDocument()
>
>- account for 11-StateSavingWindowId issues
>
>M jsf-ri/src/com/sun/faces/context/ExternalContextImpl.java
>
>- NOTSURE:
>
> Use generic Maps as the type of the ivars.
>
> Use Collections.unmodifiableMap() where possible.
>
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/HiddenRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/ImageRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/LabelRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/MenuRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessagesRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/OutputMessageRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/SecretRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/TextRenderer.java
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/TextareaRenderer.java
>
>- remove encodeChildren()
>
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java
>
>- make this have getRendersChildren() == true
>
>- remove encodeRecursive() and supplicants.
>
>M jsf-ri/src/com/sun/faces/renderkit/html_basic/MessageRenderer.java
>
>- make encodeChildren() throw IOException, per superclass definition.
>
>R jsf-ri/src/com/sun/faces/taglib/BaseComponentBodyTag.java
>
>- no longer need this, since everything is a body tag now.
>
>M jsf-ri/src/com/sun/faces/taglib/jsf_core/AttributeTag.java
>
>- NOTSURE: I'm pretty sure this class needs more work.
>
>- leveragre UIComponentClassicTagBase.
>
>M jsf-ri/src/com/sun/faces/taglib/jsf_core/LoadBundleTag.java
>
>- more verbose exception message.
>
>M jsf-ri/src/com/sun/faces/taglib/jsf_core/VerbatimTag.java
>
>- clear the body after sucking it into the UIOutput.
>
>M jsf-ri/src/com/sun/faces/taglib/jsf_core/ViewTag.java
>
>- big changes, javadoc'd thoroughly
>
>M jsf-ri/src/com/sun/faces/util/DebugUtil.java
>
>- check for null root in printTree().
>
>M jsf-ri/src/com/sun/faces/util/Util.java
>
>- re-add comment to passthru attr about the "type" attribute.
>
>- NOTSURE: getExceptionMessageString(), if we have no message summary,
> use MessageFormat.format() to parse the message.
>
>
>
>