http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-730

When writing the spec language for the changes to default
ActionListener, I added some test content to verify navigation into and
between flows using OutcomeTarget type renderers (h:button and h:link)
worked.  Turns out it did not, and I had to add spec and impl for it.
The changes are described inline.

SECTION: API changes
--------------------

M       applicationIntegration.fm

- In 7.1.1 document new requirements for default ActionListener.

- In 7.4.2.1 require pasing NULL_FLOW as the flow document id on a flow
  return.  This is necessary for the OutcomeTarget navigation style.

M       jsf-api/doc/standard-html-renderkit-base.xml
M       jsf-api/doc/standard-html-renderkit.xml

- In javax.faces.OutcomeTarget Button and Link:

* Provide for getting the navigation case to be sensitive to flows.

    Obtain a reference to the NavigationCase, called navCase for
    discussion. If the component has a non-null attribute named by the
    value of the symbolic constant
    javax.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME, let
    navCase be the return from calling getNavigationCase() on the
    ConfigurableNavigationHandler, passing the current FacesContext as
    the first argument, null, as the second argument, outcome as the
    third argument, and the value of the TO_FLOW_DOCUMENT_ID_ATTR_NAME
    attribute as the fourth argument. Otherwise, let navCase be the
    return from calling getNavigationCase() on the
    ConfigurableNavigationHandler, passing the current FacesContext as
    the first argument, null, as the second argument, and outcome as the
    third argument.

* Modify "Algorithm to obtain the url to which the user-agent should
  issue a GET request when clicked", which is used by all renderers of
  component-family javax.faces.OutcomeTarget.

          <li class="changed_added_2_2"><p>If the navigation case has a
          non-null <code>toFlowDocumentId</code> property, add two
          parameters as shown in this table.</p>

          <table border="1">
            <tr>
              <th>parameter name</th>
              <th>parameter value</th>
            </tr>

            <tr>
               <td>value of FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME</td>

               <td>value of the <code>toFlowDocumentId</code> property
               of the navigation case</td>
            </tr>
            
            <tr>
               <td>value of FlowHandler.FLOW_ID_REQUEST_PARAM_NAME</td>

               <td>value of the <code>fromOutcome</code> property
               of the navigation case</td>
            </tr>
            
          </table>


          </li>

* Document the ability to use the <f:attribute
  name="to-flow-document-id"> attribute on <h:button>, <h:link>,
  <h:commandButton>, <h:commandLink>.

+        <p>To support entering flows that are defined by both a defining
+        document id and a flow id, add a component attribute to this
+        component whose name is given by the value of the symbolic
+        constant
+        <code>javax.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME</code>,
+        and whose value is the defining document id.  For example, when
+        using this component in a facelet page, the following markup
+        would cause such an attribute to be added.</p>
+
+<pre><code>&lt;h:commandButton id="start_a" value="enter flow-a" action="flow-a"&gt;<br />
+&nbsp;&nbsp;&lt;f:attribute name="to-flow-document-id" value="unique"/&gt;<br />
+&lt;/h:commandButton&gt;<br />
+</code></pre>
+

+<div class="changed_added_2_2">
+
+        <p>To support entering flows that are defined by both a defining
+        document id and a flow id, add a component attribute to this
+        component whose name is given by the value of the symbolic
+        constant
+        <code>javax.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME</code>,
+        and whose value is the defining document id.  For example, when
+        using this component in a facelet page, the following markup
+        would cause such an attribute to be added.</p>
+
+<pre><code>&lt;h:commandLink id="start_a" value="enter flow-a" action="flow-a"&gt;<br />
+&nbsp;&nbsp;&lt;f:attribute name="to-flow-document-id" value="unique"/&gt;<br />
+&lt;/h:commandLink&gt;<br />
+</code></pre>
+
+</div>

+<div class="changed_added_2_2">
+
+        <p>To support entering flows that are defined by both a defining
+        document id and a flow id, add a component attribute to this
+        component whose name is given by the value of the symbolic
+        constant
+        <code>javax.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME</code>,
+        and whose value is the defining document id.  For example, when
+        using this component in a facelet page, the following markup
+        would cause such an attribute to be added.</p>
+
+<pre><code>&lt;h:link id="start_a" value="enter flow-a" outcome="flow-a"&gt;<br />
+&nbsp;&nbsp;&lt;f:attribute name="to-flow-document-id" value="unique"/&gt;<br />
+&lt;/h:link&gt;<br />
+</code></pre>
+
+</div>

+        <p>To support entering flows that are defined by both a defining
+        document id and a flow id, add a component attribute to this
+        component whose name is given by the value of the symbolic
+        constant
+        <code>javax.faces.event.ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME</code>,
+        and whose value is the defining document id.  For example, when
+        using this component in a facelet page, the following markup
+        would cause such an attribute to be added.</p>
+
+<pre><code>&lt;h:button id="start_a" value="enter flow-a" outcome="flow-a"&gt;<br />
+&nbsp;&nbsp;&lt;f:attribute name="to-flow-document-id" value="unique"/&gt;<br />
+&lt;/h:button&gt;<br />
+</code></pre>
+
+
  

M       jsf-api/src/main/java/javax/faces/application/ConfigurableNavigationHandler.java

- Add variant of getNavigationCase() that takes toFlowDocumentId.  The
  documentation is basically the same, so I'm not calling out
  specifically here.

M       jsf-api/src/main/java/javax/faces/application/NavigationHandler.java

- Document variant of handleNavigation() that takes toFlowDocumentId.
  The documentation is basically the same, so I'm not calling out
  specifically here.

M       jsf-api/src/main/java/javax/faces/lifecycle/Lifecycle.java

- Document changes to attachWindow(): added a call to
  FlowHandler.clientWindowTransition().  This method is a no-op unless
  we are in an OutcomeTarget navigation.

M       jsf-api/src/main/java/javax/faces/flow/FlowHandler.java

- New constants

    /**
     * <p class="changed_added_2_2">Components that are rendered by <code>Renderers</code>
     * of component-family <code>javax.faces.OutcomeTarget</code> must use this
     * constant as the parameter name for a parameter representing the flow id
     * of the flow that this component will cause to be entered.</p>
     * 
     * <p class="changed_added_2_2"></p>
     * 
     * @since 2.2
     */
    public static final String FLOW_ID_REQUEST_PARAM_NAME = "jffi";
    
    /**
     * <p class="changed_added_2_2">Components that are rendered by <code>Renderers</code>
     * of component-family <code>javax.faces.OutcomeTarget</code> must use this
     * constant as the parameter name for a parameter representing the defining document id
     * of the flow that this component will cause to be entered.</p>
     * 
     * @since 2.2
     */
    public static final String TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME = "jftfdi";

    /**
     * <p class="changed_added_2_2">Components that are rendered by <code>Renderers</code>
     * of component-family <code>javax.faces.OutcomeTarget</code> must use this
     * constant as the value of the parameter named by {@link #TO_FLOW_DOCUMENT_ID_REQUEST_PARM_NAME}
     * when returning from a flow (without entering another flow) using such a component. </p>

     * @since 2.2
     */

    public static final String NULL_FLOW = "javax.faces.flow.NullFlow";

- Document existing getCurrentFlow().

- New method clientWindowTransition()


     * <p class="changed_added_2_2">Allow for flow transitions in the
     * case of components rendered by the renderers from
     * component-family <code>javax.faces.OutcomeTarget</code>.  These
     * transitions must happen at the front of the request processing
     * lifecycle due to the HTTP GET based nature of such components.
     * Therefore, this method is called from {@link
     * javax.faces.lifecycle.Lifecycle#attachWindow}.</p>

     * <div class="changed_added_2_2">

     * <p>Let <em>flowId</em> be the value in the request parameter map
     * for the parameter whose name is given by the value of {@link
     * #FLOW_ID_REQUEST_PARAM_NAME}.  Let <em>toFlowDocumentId</em> be
     * the value in the request parameter map for the paramater whose
     * name is given by the value of {@link
     * #TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME}.  If
     * <em>toFlowDocumentId</em> is <code>null</code>, take no action
     * and return.  Otherwise, let <em>sourceFlow</em> be the return
     * from {@link #getCurrentFlow(javax.faces.context.FacesContext)}. A
     * <code>null</code> value indicates there is no current flow, which
     * will be the case if this navigation is trying to enter a flow. If
     * <em>flowId</em> is not <code>null</code> and
     * <em>toFlowDocumentId</em> is <strong>not</strong> equal to the
     * value of {@link #NULL_FLOW}, let <em>targetFlow</em> be the
     * result of calling {@link
     * #getFlow(javax.faces.context.FacesContext, java.lang.String,
     * java.lang.String)}, passing <em>toFlowDocumentId</em> and
     * <em>flowId</em> as the last two arguments, respectively.  If the
     * result is non-<code>null</code>, let <em>flowCallNode</em> be the
     * return from calling {@link #getFlowCall} on the
     * <em>sourceFlow</em>, passing <em>targetFlow</em> as the argument.
     * Otherwise, <em>targetFlow</em> and <em>flowCallNode</em> must
     * remain <code>null</code>, indicating that this is a flow
     * return.</p>

     * <p>Call, {@link #transition}, passing the arguments gathered in
     * the preceding algorithm.</p>
     *
     * </div>

     * @since 2.2
     * 
     * @param context the {@code FacesContext} for the current request.

     * @throws NullPointerException if {@code context} is {@code null}.
     */
    
    public abstract void clientWindowTransition(FacesContext context);

M       jsf-api/src/main/java/javax/faces/event/ActionListener.java

- add constant for attribute name

+    
+    /**
+     * <p class="changed_added_2_2">The presence of this component attribute
+     * on an {@link javax.faces.component.ActionSource} component will cause
+     * the default {@code ActionListener} to interpret the value of the 
+     * attribute as the </p>
+     * 
+     */
+    public static final String TO_FLOW_DOCUMENT_ID_ATTR_NAME = "to-flow-document-id";


SECTION: Modified Files
----------------------------
M       jsf-ri/conf/share/tlddoc-resources/stylesheet.css

- Provenance of changes

M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java

- Implement renderer changes.

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

- Call clientWindowTransition() from attachWindow().

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

- Use the constant instead of a literal string for the toFlowDocumentId.

M       jsf-ri/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java

- Use the variant of getCurrentFlow() that takes FacesContext, if you
  have one handy.

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

- Implement new overloaded getNavigationCase().

- Use the variant of getCurrentFlow() that takes FacesContext, if you
  have one handy.

M       jsf-ri/src/main/java/com/sun/faces/flow/builder/MutableNavigationCase.java

- Revert previously committed revision.  Turns out it was not needed.

M       jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java

- Implement clientWindowTransition().

M       test/web-profile/flow/basic_faces_flow_call/src/test/java/com/sun/faces/test/webprofile/flow/basic_faces_flow_call/FlowACallsFlowBIT.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowA.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/java/com/sun/faces/test/webprofile/flow/basic/Flow_a_Bean.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/index.xhtml
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/flow-a/next_b.xhtml
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/flow-b/flow-b-flow.xml
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/flow-b/next_b.xhtml

- New test content.




git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11649 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1167

SECTION: Modified Files
----------------------------
M       jsf-ri/conf/share/facelets_jsf_core.tld

- <f:selectItems> itemLabelEscaped: if not specified, behave as if true.


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11650 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-802

SECTION: Modified Files
----------------------------
M       jsf-api/doc/standard-html-renderkit-base.xml
M       jsf-api/doc/standard-html-renderkit.xml

- Require a ProjectStage hint when you have inputFile, but not form
  enctype="multipart/form-data".  See the vdldocs docs for
  h:inputFile.

M       jsf-api/src/main/resources/jsf.js

- At Roger's request, remove the text about options.execute containing
  an inputFile component. 

              * <p><span class="changed_modified_2_2">Determine whether
-             * or not any of the components in
-             * <code>options.execute</code> (or its effective
-             * equivalent) is a file upload component.  If not, send the
-             * request as an <code>asynchronous POST</code> using the
+             * or not the the submitting form is using
+             * <code>multipart/form-data</code> as its
+             * <code>enctype</code> attribute.  If not, send the request
+             * as an <code>asynchronous POST</code> using the
              * <code>posting URL</code> that was determined in the
-             * previous step.</span><p>
+             * previous step.</span> <span
+             * class="changed_added_2_2">Otherwise, send the request
+             * using a multi-part capable transport layer, such as a
+             * hidden inline frame.  Note that using a hidden inline
+             * frame does <strong>not</strong> use
+             * <code>XMLHttpRequest</code>, but the request must be sent
+             * with all the parameters that a JSF
+             * <code>XMLHttpRequest</code> would have been sent with.
+             * In this way, the server side processing of the request
+             * will be identical whether or the request is multipart or
+             * not.</span></p>
 
              * <div class="changed_added_2_2">
 
-             * <p>Otherwise, verify that the <code>enctype</code>
-             * property of the effective form is
-             * <code>multipart/form-data</code> and throw an error if it
-             * is not.  Send the request using a multi-part capable
-             * transport layer, such as a hidden inline frame.  Note
-             * that using a hidden inline frame does
-             * <strong>not</strong> use <code>XMLHttpRequest</code>, but
-             * the request must be sent with all the parameters that a
-             * JSF <code>XMLHttpRequest</code> would have been sent
-             * with.  In this way, the server side processing of the
-             * request will be identical whether or the request is
-             * multipart or not.</p>
-
              * <p>The <code>begin</code>, <code>complete</code>, and
              * <code>success</code> events must be emulated when using
              * the multipart transport.  This allows any listeners to
              * behave uniformly regardless of the multipart or
-             * <code>XMLHttpRequest</code> nature of the transport.
+             * <code>XMLHttpRequest</code> nature of the transport.</p>
 
              * </div>
 





git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11651 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1165

At Arun P. Gupta's request make it so you can say this

@FlowScoped("myFlow")
public class MyFlowBean...

instead of this

@FlowScoped(id="myFlow")
public class MyFlowBean...

Of course, then you need to say this:

@FlowScoped(value="myFlow", definingDocumentId="myFlowDocId")
public class MyFlowBean...

instead of this:

@FlowScoped(id="myFlow", definingDocumentId="myFlowDocId")
public class MyFlowBean...

But because the definingDocumentId case is less common, it's better to
go with "value".

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/flow/FlowCDIExtension.java
M       test/web-profile/flow/basic-multi-page-fdl-in-web-inf/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowBean.java
M       test/web-profile/flow/multi-page-from-jar/jar/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowBean.java
M       test/web-profile/flow/basic_switch/src/main/java/com/sun/faces/test/webprofile/flow/basic_switch/Flow_a_Bean.java
M       test/web-profile/flow/basic_switch/src/main/java/com/sun/faces/test/webprofile/flow/basic_switch/Flow_b_Bean.java
M       test/web-profile/flow/basic-multi-page/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowBean.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/java/com/sun/faces/test/webprofile/flow/basic/Flow_a_Bean.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/java/com/sun/faces/test/webprofile/flow/basic/Flow_b_Bean.java
M       test/web-profile/flow/factory/src/main/java/com/sun/faces/test/webprofile/flow/factory/FlowBean.java
M       test/web-profile/flow/basic-implicit/src/main/java/com/sun/faces/test/webprofile/flow/basic_implicit/FlowBean.java
M       test/web-profile/flow/intermediate/src/main/java/com/sun/faces/test/webprofile/flow/intermediate/MaintainCustomerBeanXmlFlow.java
M       test/web-profile/flow/intermediate/src/main/java/com/sun/faces/test/webprofile/flow/intermediate/MaintainCustomerBeanJavaFlow.java
M       test/web-profile/flow/basic_method_call/src/main/java/com/sun/faces/test/webprofile/flow/basic_method_call/Flow_a_Bean.java
M       test/web-profile/flow/basic_method_call/src/main/java/com/sun/faces/test/webprofile/flow/basic_method_call/Flow_b_Bean.java
M       test/web-profile/flow/defining_document_id/jar01/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowBean01.java
M       test/web-profile/flow/defining_document_id/jar02/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowBean02.java
M       jsf-api/src/main/java/javax/faces/flow/FlowScoped.java


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11652 761efcf2-d34d-6b61-9145-99dcacc3edf1
Bring jsf.js into synch with the web-partialresponse_2_2.xsd, which is
the normative standard for partial response.

SECTION: Modified Files
----------------------------
M       jsf-api/doc/web-partialresponse_2_2.xsd
M       jsf-api/src/main/resources/jsf.js


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11653 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fix broken JavaDoc link

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11654 761efcf2-d34d-6b61-9145-99dcacc3edf1
<< http://java.net/jira/browse/JAVASERVERFACES-2754 >>


SECTION: Modified Files
----------------------------
M       jsf-api/src/main/resources/jsf.js
---- Ensure response markup is properly updated in the DOM for render="all"


A       test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2754IT.java
A       test/agnostic/ajax/src/main/webapp/issue2754.xhtml
---- Test Case.




git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11655 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-2580

While doing the DHQA today with Sreekanth Manga, I came upon a bug.

Section 11.4.3.3 says:

  The start node of the flow is the view whose name is the same as the
  name of the flow.

This worked with xml defined flows, but not java ones.  This commit
fixes that.

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/flow/builder/FlowBuilderImpl.java

- In getFlow(), if there is no start node, define one.

M       test/web-profile/flow/basic_switch/src/main/java/com/sun/faces/test/webprofile/flow/basic_switch/FlowA.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/java/com/sun/faces/test/webprofile/flow/basic/FlowA.java
M       test/web-profile/flow/basic_method_call/src/main/java/com/sun/faces/test/webprofile/flow/basic_method_call/FlowA.java

- Remove the explicitly defined startNode since it can be taken by
  convention.


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11657 761efcf2-d34d-6b61-9145-99dcacc3edf1
SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/OutcomeTargetRenderer.java
M       jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
M       jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java

- PMD


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11659 761efcf2-d34d-6b61-9145-99dcacc3edf1
<< http://java.net/jira/browse/JAVASERVERFACES-2573 >>


SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
---- Recognize "Faces-Request" "partial/ajax" name valu pair as request parameter

M       jsf-api/src/main/resources/jsf.js
---- Implement FrameTransport layer used for file uoload using iframe.


A       test/web-profile/renderKit/basic/src/main/webapp/inputFileAjax.xhtml
---- Test page.




git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11660 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-730

Leonardo brought up a great point about flow returns.  When performing a
flow return the destination node must be determined with respect to the
calling flow.  

I asked EG member David Schneider about it and here's what he said:

On 02/25/2013 09:22 PM, Edward Burns wrote:

EB> Let's say we are a few flows deep.  Does ADF always allow accessing the
EB> nav rules of the unbounded task flow, as the target of a return node?

>>>>> David Schneider answered:

DS> Hi Ed,

DS> No, ADF does not consult the unbounded flow unless that's the flow the 
DS> application is returning too.  When executing a flow return ADF moves 
DS> back to the previous flow (i.e. the one that called the flow that's 
DS> returning) and attempts to navigate from the flow call node using the 
DS> outcome returned from the flow.

DS> Another thing ADF does is record the last viewId that was displayed in 
DS> the calling flow *before* the flow was called.  Then, when returning, 
DS> that viewId is displayed again if and only if navigation from the flow 
DS> call using the returned outcome does not produce a new viewId.  That's 
DS> done to ensure a viewId from the now current (top of call stack) flow is 
DS> displayed.

This changebundle does the following:

* It implicit navigation can only "see" pages in the current flow.

* Adds API that allows navigation to happen in the scope of the
  preceding flow, if present.

* Adds API that saves the last displayed viewId of the current flow, as
  the flows are being navigated.

SECTION: API changes
--------------------

M       jsf-api/src/main/java/javax/faces/lifecycle/Lifecycle.java

- Revert revision 11649, which introduced the requirement to call
  FlowHandler.clientWindowTransition() to Lifecycle.attachWindow().
  This is now handled in RestoreViewPhase.

M       requestProcessingLifecycle.fm

- In section 2.2.1 RestoreViewPhase, call clientWindowTransition().

M       applicationIntegration.fm

- In section 7.4.2.1, Requirements for Explicit Navigation in Faces Flow
  Call Nodes other than ViewNodes, here is the new text regarding return
  nodes.

  If the node is a ReturnNode obtain its navigation case and call
  FlowHandler.setReturnMode(true). This enables the navigation to
  proceed with respect to the calling flow's navigation rules, or the
  application's navigation rules if there is no calling flow. Start the
  navigation algorithm over using it as the basis but pass the value of
  the symbolic constant javax.faces.flow.FlowHandler.NULL_FLOW as the
  value of the toFlowDocumentId argument. If this does not yield a
  navigation case, call FlowHandler.getLastDisplayedViewId(), which will
  return the last displayed view id of the calling flow, or null if
  there is no such flow. In a finally block, when the re-invocation of
  the navigation algorithms completes, call
  FlowHandler.setReturnMode(false).


M       jsf-api/src/main/java/javax/faces/flow/FlowHandler.java

- In getCurrentFlow(), document how return mode works.

+     * 
+     * <div class="changed_added_2_2">
+     * 
+     * <p>If {@link #setReturnMode} had been called with {@code true} as the
+     * argument before invoking this method, return the preceding flow on 
+     * the stack instead of the actual current flow, or {@code null} if there 
+     * is no preceding flow.  Otherwise, return the current flow.</p>
+     * 
+     * </div>

- new method getLastDisplayedViewId(), 

+     * <p class="changed_added_2_2">Return the last displayed viewId for the 
+     * current flow, as returned by {@link #getCurrentFlow(javax.faces.context.FacesContext)}, 
+     * or {@code null} if there is no current flow.</p>
+     * 
+     * @param context the {@code FacesContext} for the current request.
+     * 
+     * @throws NullPointerException if {@code context} is {@code null}
+     * 
+     * @since 2.2
+     */
+    
+    public abstract String getLastDisplayedViewId(FacesContext context);

- new method setReturnMode(),

+     * <p class="changed_added_2_2">Enable the correct handling of navigation
+     * when processing a return node.  The default {@link javax.faces.application.NavigationHandler}
+     * specification requires calling this method with {@code true} before processing
+     * the navigation rules for the flow return, and calling this method with
+     * {@code false}, from a {@code finally} block, immediately afterward.</p>
+     * 
+     * @param context the {@code FacesContext} for the current request.
 
+     * @param returnMode the return mode for the current flow.
+     * 
+     * @throws NullPointerException if {@code context} is {@code null}.
+     * 
+     * @since 2.2
+     */
+    
+    public abstract void setReturnMode(FacesContext context, boolean returnMode);
+    

- New "toViewId" argument to transition().

+     * @param toViewId the viewId of the view being displayed as a result of 
+     * this transition.  This parameter makes it possible to implement {@link #getLastDisplayedViewId}.
+     * 

M       jsf-api/src/main/java/javax/faces/flow/Flow.java

- Fix spelling error.


SECTION: Modified Files
-----------------------
M       jsf-ri/src/main/java/com/sun/faces/lifecycle/RestoreViewPhase.java

- Because we need the viewId to invoke FlowHandler.transition(), we now
  need to call clientWindowTransition() from RestoreViewPhase instead of
  Lifecycle.attachWindow().

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

- No longer call clientWindowTransition().

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

- In getNavigationMap(), return the empty map if we are in a flow but the flow has no
  explicitly defined navigation rules.

- In findImplicitMatch(), make it so the navigation can only "see" views
  within the current flow.

- In both places where return nodes are handled, do the right thing with
  respect to the re-invocation of the navigation rules so they operate
  in the context of the calling flow.  Also, do the right thing with
  respect to getLastDisplayedViewId().

M       jsf-ri/src/main/java/com/sun/faces/flow/FlowHandlerImpl.java

- Implement API changes

M       test/web-profile/flow/basic-multi-page-fdl-in-web-inf/src/test/java/com/sun/faces/test/webprofile/flow/basic_in_web_inf/BasicInWebInfFlowEntryExitIT.java
M       test/web-profile/flow/multi-page-from-jar/app/src/test/java/com/sun/faces/test/webprofile/flow/basic_multi_page_flow_in_jar/BasicMultiPageFlowInJarEntryExitIT.java
M       test/web-profile/flow/basic-multi-page/src/test/java/com/sun/faces/test/webprofile/flow/basic_multi_page/BasicMultiPageFlowEntryExitIT.java
M       test/web-profile/flow/basic_faces_flow_call/src/test/java/com/sun/faces/test/webprofile/flow/basic_faces_flow_call/FlowACallsFlowBIT.java
M       test/web-profile/flow/basic-implicit/src/test/java/com/sun/faces/test/webprofile/flow/basic_implicit/BasicFlowEntryExitIT.java
D       test/web-profile/flow/basic-multi-page-fdl-in-web-inf/src/main/webapp/nonFlow.xhtml
D       test/web-profile/flow/multi-page-from-jar/app/src/main/webapp/nonFlow.xhtml
D       test/web-profile/flow/basic-multi-page/src/main/webapp/nonFlow.xhtml
D       test/web-profile/flow/basic-implicit/src/main/webapp/nonFlow.xhtml

- Test changes.


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11661 761efcf2-d34d-6b61-9145-99dcacc3edf1
<< http://java.net/jira/browse/JAVASERVERFACES-2752 >>


SECTION: Modified Files
----------------------------
M       jsf-api/src/main/resources/jsf.js
---- Fix jsdocs for insert element processing section.


A       test/agnostic/ajax/src/test/java/com/sun/faces/test/agnostic/ajax/Issue2752IT.java
A       test/agnostic/ajax/src/main/java/com/sun/faces/test/agnostic/ajax/InsertBean.java
A       test/agnostic/ajax/src/main/webapp/insertElement.xhtml
---- Test case.

---- Tested on IE7,8,9,10 as well.




git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11662 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1168

M       src/web-partialresponse_2_2.xsds

  It seems like the jsdocs for the InsertChange Ajax response function
  differs from the partial response XML schema.  This was a feature
  requested by ICESoft for 2.0, and based on their response we should go
  with the jsdocs. So we'll need to verify the implementation does what
  the jsdocs say.


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11664 761efcf2-d34d-6b61-9145-99dcacc3edf1
JAVAEETUTORIAL-117


SECTION: Modified Files
----------------------------
M       jsf-api/doc/i18n-props.xml
M       jsf-api/doc/standard-html-renderkit.xml

         <description>
           Direction indication for text that does not inherit directionality.
           Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
+          These attributes are case sensitive when rendering to XHTML, so
+          care must be taken to have the correct case.
         </description>


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11665 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1055


SECTION: API changes
--------------------
M       applicationIntegration.fm

- Make 7.7.2.8 be:

The JSP implementation must:

  If no viewId could be identified, return null.

  Call the restoreView() method of the associated StateManager, passing
  the FacesContext instance for the current request and the calculated
  viewId, and return the returned UIViewRoot, which may be null.

The Facelets implementation must:

  Call ResponseStateManager.isStateless(). If the result is false,
  proceed as specified in the JSP implementation. Otherwise, take the
  following steps and return.

  * Obtain a reference to the ViewDeclarationLanguage from the
  ViewDeclarationLanguageFactory. This is necessary to allow for proper
  decoration. It is not acceptable to simply use the java language this
  keyword.

  * Call createView() on the ViewDeclarationLanguage instance, passing the
  context and viewId arguments. Let viewRoot be the result.

  * Call FacesContext.setViewRoot(viewRoot).

  * Call buildView() on the ViewDeclarationLanguage, passing the context
  and viewRoot.

  Return the viewRoot.

- Add new section 7.8.1.1

  Version 2.2 of the specification adds support for stateless views. In
  such a view, the UIComponent state for the components is not
  saved. This feature must be used with full awareness of the
  statefulness requirements of the components in the view. If a
  component requires state to operate correctly, it must not be used in
  a stateless view. Furthermore, it is not required that @ViewScoped
  managed beans work at all with stateless views. This feature only
  works with Facelet based views, not JSP based views.

  To mark a view as stateless, the existing transient property from
  UIComponent is exposed to the view author by means of the transient
  attribute on the <f:view> tag from the Faces Core tag library. The
  following spec sections contain more normative requirements for
  stateless views.

  * The vdldocs for the Facelet variant of the <f:view> tag.

  * The javadocs for ResponseStateManager.writeState(FacesContext, Object)

  * The javadocs for ResponseStateManager.isStateless(FacesContext) 
    Section 7.7.2.8 "ViewDeclarationLanguage.restoreView()"

  * The javadocs for javax.faces.view.ViewScoped

  * The javadocs for javax.faces.bean.ViewScoped  

M       jsf-api/src/main/java/javax/faces/view/ViewScoped.java
M       jsf-api/src/main/java/javax/faces/bean/ViewScoped.java

- Additional requirement:

+ * <p>If <code>ProjectStage</code> is not
+ * <code>ProjectStage.Production</code>, verify that the current {@link
+ * javax.faces.component.UIViewRoot} does not have its {@code transient}
+ * property set to {@code true}.  If so, add a <code>FacesMessage</code>
+ * for the current {@code viewId} to the <code>FacesContext</code>
+ * stating {@code @ViewScoped} beans cannot work if the view is marked
+ * as transient.  If <code>ProjectStage</code> <strong>is</strong>
+ * <code>ProjectStage.Production</code>, do not do this
+ * verification.</p>

M       jsf-ri/conf/share/facelets_jsf_core.tld

- Document the <f:view transient> attribute.

+                <![CDATA[<p class="changed_added_2_2">If
+                <code>true</code>, this view must not participate in
+                state saving or restoring.  Note that transient views
+                may not be used with <code>@ViewScoped</code> managed
+                beans.  The implementation must call
+                <code>setTransient()</code> on the
+                <code>UIViewRoot</code>, passing the value of the
+                attribute as specified in the markup.</p>]]>


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

- new method isStateless():

 +    /**
 +     * <p class="changed_added_2_2">If the preceding call to {@link #writeState(javax.faces.context.FacesContext, java.lang.Object)}
 +     * was stateless, return {@code true}.  If the preceding call to {@code writeState()} was
 +     * stateful, return {@code false}.  Otherwise throw {@code IllegalStateException}.</p>
 +     * 
 +     * <div class="changed_added_2_2">
 +     * 
 +     * <p>To preserve backward compatibility
 +     * with custom implementations that may have extended from an earlier
 +     * version of this class, an implementation is provided that returns 
 +     * <code>false</code>.  A compliant implementation must override this 
 +     * method to take the specified action.</p>
 +     * 
 +     * </div>
 +     * 
 +     * @param context The {@link FacesContext} instance for the current request
 +     * @throws NullPointerException if the argument {@code context} is {@code null}.
 +     * @throws IllegalStateException if this method is invoked and the statefulness
 +     * of the preceding call to {@link #writeState(javax.faces.context.FacesContext, java.lang.Object)}
 +     * cannot be determined.
 +     * 
 +     * @since 2.2
 +     * 
 +     *  
 +     */
 +    
 +    public boolean isStateless(FacesContext context) {
 +        return  false;
 +    }

- New requirements in writeState():

+     * <p class="changed_added_2_2">Call {@link FacesContext#getViewRoot()}.
+     * Call {@link javax.faces.component.UIComponent#isTransient()}
+     * returns {@code true}, take implementation specific action so that the 
+     * following call to {@link #isStateless} returns {@code true} and return.
+     * Otherwise, proceed as follows.</p>

M       preface.fm

- Add new big ticket feature, Stateless Views, with cross reference to
  overview section 7.8.1.1.



git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11666 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1111

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/facelets/tag/composite/BehaviorHolderWrapper.java

- Remove getPassThroughAttributes(), it's available on the parent.  Andy
  was it safe to do this?  I think so, but I could use your oversight.

M       jsf-api/src/main/java/javax/faces/component/UIComponent.java
M       jsf-api/src/main/java/javax/faces/component/UIComponentBase.java

- Per Andy Schwartz's recommendation, remove
  UIComponentBase.getPassThroughAttributes(), moving it to the
  superclass and making it final.  


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11667 761efcf2-d34d-6b61-9145-99dcacc3edf1
<< http://java.net/jira/browse/JAVASERVERFACES-2762 >>


SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/FileRenderer.java
---- Added overridden encodeBegin method to ensure a FacesMessage is produced 
---- if the parent form does not have an enctyoe of multipart/form-data.

M       jsf-ri/src/main/java/com/sun/faces/renderkit/RenderKitUtils.java
---- Added getForm method that returns a UIForm parent given a component.
---- Made getFormClientId method leverage new getForm method.
 
M       test/web-profile/renderKit/basic/src/test/java/com/sun/faces/test/webprofile/renderKit/basic/Spec802IT.java
A       test/web-profile/renderKit/basic/src/main/webapp/inputFileNoEncTyoe.xhtml
---- Test Case.



git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11668 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-2761, r=rogerk, make stateless JSF spec compliant, and make sure we emit warning when people try to use @ViewScoped together with stateless.

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11669 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1055

SECTION: Modified Files
----------------------------
M       jsf-api/src/main/java/javax/faces/view/ViewScoped.java
M       jsf-api/src/main/java/javax/faces/bean/ViewScoped.java


- * as transient.  If <code>ProjectStage</code> <strong>is</strong>
+ * as transient.    Also log a <code>Level.WARNING</code> message to the 
+ * log.  If <code>ProjectStage</code> <strong>is</strong>
  * <code>ProjectStage.Production</code>, do not do this
  * verification.</p>


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11670 761efcf2-d34d-6b61-9145-99dcacc3edf1
SECTION: Modified Files
----------------------------
M       test/web-profile/renderKit/basic/src/test/java/com/sun/faces/test/webprofile/renderKit/basic/Spec802IT.java
M       test/web-profile/renderKit/basic/src/main/java/com/sun/faces/test/webprofile/renderKit/basic/FileUploadBean.java
M       test/web-profile/renderKit/basic/src/main/webapp/inputFileNoEncTyoe.xhtml



git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11671 761efcf2-d34d-6b61-9145-99dcacc3edf1