Fixes http://java.net/jira/browse/JAVASERVERFACES-2657, r=mriem, use ResourceHandler.isResourceURL, patch supplied by Neil

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11569 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2725, r=mriem, fixes too many open files, patch supplied by ltaraud

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11571 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2726, r=rogerk, make sure we guard against null

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11572 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2730, r=mriem, make sure the viewMap.clear method is called so the PreDestroyViewMapEvent is triggered, patch supplied by psini82

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11574 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-2731, r=rogerk, support for Stateless JSF

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

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

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

Part 1: Implement just enough of the XML parsing to make the existing
tests pass.

This commit implements the XML parsing of the flow-definition syntax
within the Application Configuration Resources (aka faces-config)
subsystem.  Apps that were using faces flows prior to this commit must
make the following changes.  It won't work otherwise.

1. If you had an empty <flow-definition> in your faces-config.xml file,
   you must remove it.

2. If you had a non-empty <flow-definition> in your faces-config.xml
   file, you must add an "id" attribute to it, with the value being the
   flow id.

3. If you had some [flowName]/[flowName]-flow.xml files you must convert
   them to be in the faces config XML syntax.  This involves the
   following steps.  

   a. Remove any Facelets content, such as doctype declaration, HTML
      markup, any xmlns declarations and any other facelet tags such as
      <f:metadata>.

   b. Remove whatever prefix you had bound to the 

      http://java.sun.com/jsf/flow

      xmlns

      This was usually j:

Here is a diff of one such file.   

Index: test/web-profile/flow/basic_switch/src/main/webapp/flow-b/flow-b-flow.xml
===================================================================
--- test/web-profile/flow/basic_switch/src/main/webapp/flow-b/flow-b-flow.xml	(revision 11574)
+++ test/web-profile/flow/basic_switch/src/main/webapp/flow-b/flow-b-flow.xml	(working copy)
@@ -41,68 +41,64 @@
 
 -->
 
-<!DOCTYPE html>
+<faces-config version="2.2" xmlns="http://java.sun.com/xml/ns/javaee"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="
+        http://java.sun.com/xml/ns/javaee
+        http://java.sun.com/xml/ns/javaee/web-facesconfig_2_2.xsd">
 
-<html xmlns="http://www.w3.org/1999/xhtml"
-      xmlns:h="http://java.sun.com/jsf/html"
-      xmlns:f="http://java.sun.com/jsf/core"
-      xmlns:j="http://java.sun.com/jsf/flow">
+  <flow-definition id="flow-b">
+    <flow-return id="taskFlowReturn1">
+      <from-outcome>#{flow_b_Bean.returnValue}</from-outcome>
+    </flow-return>            
     
-    <f:metadata>
-
-        <j:flow-definition>
-            <j:flow-return id="taskFlowReturn1">
-                <j:from-outcome>#{flow_b_Bean.returnValue}</j:from-outcome>
-            </j:flow-return>            
-            
-            <j:switch id="switchA">
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchA_Case01}</j:if>
-                    <j:from-outcome>page01</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchA_Case02}</j:if>
-                    <j:from-outcome>page02</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchA_Case03}</j:if>
-                    <j:from-outcome>switchA_result</j:from-outcome>
-                </j:case>
-                <j:default-outcome>defaultPage</j:default-outcome>
-            </j:switch>
-            
-            <j:switch id="switchB">
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchB_Case01}</j:if>
-                    <j:from-outcome>page01</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchB_Case02}</j:if>
-                    <j:from-outcome>switchB_result</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchB_Case03}</j:if>
-                    <j:from-outcome>page03</j:from-outcome>
-                </j:case>
-                <j:default-outcome>defaultPage</j:default-outcome>
-            </j:switch>
-                        
-            <j:switch id="switchC">
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchC_Case01}</j:if>
-                    <j:from-outcome>page01</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchC_Case02}</j:if>
-                    <j:from-outcome>page02</j:from-outcome>
-                </j:case>
-                <j:case>
-                    <j:if>#{flow_b_Bean.switchC_Case03}</j:if>
-                    <j:from-outcome>page03</j:from-outcome>
-                </j:case>
-                <j:default-outcome>#{flow_b_Bean.defaultOutcome}</j:default-outcome>
-            </j:switch>
-        </j:flow-definition>
-
-    </f:metadata>
-</html>
+    <switch id="switchA">
+      <case>
+        <if>#{flow_b_Bean.switchA_Case01}</if>
+        <from-outcome>page01</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchA_Case02}</if>
+        <from-outcome>page02</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchA_Case03}</if>
+        <from-outcome>switchA_result</from-outcome>
+      </case>
+      <default-outcome>defaultPage</default-outcome>
+    </switch>
+    
+    <switch id="switchB">
+      <case>
+        <if>#{flow_b_Bean.switchB_Case01}</if>
+        <from-outcome>page01</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchB_Case02}</if>
+        <from-outcome>switchB_result</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchB_Case03}</if>
+        <from-outcome>page03</from-outcome>
+      </case>
+      <default-outcome>defaultPage</default-outcome>
+    </switch>
+    
+    <switch id="switchC">
+      <case>
+        <if>#{flow_b_Bean.switchC_Case01}</if>
+        <from-outcome>page01</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchC_Case02}</if>
+        <from-outcome>page02</from-outcome>
+      </case>
+      <case>
+        <if>#{flow_b_Bean.switchC_Case03}</if>
+        <from-outcome>page03</from-outcome>
+      </case>
+      <default-outcome>#{flow_b_Bean.defaultOutcome}</default-outcome>
+    </switch>
+  </flow-definition>
+  
+</faces-config>

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

M       jsf-api/doc/web-facesconfig_2_2.xsd

- Removed example from flow-definition XSD.

- Specified that the <faces-config><name> element is taken to be the
  defining document id.

M       usingFacesInWebapps.fm

- Added section 11.4.3.1 Defining Flows

M       applicationIntegration.fm
M       requestProcessingLifecycle.fm

- Cross References

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

- Fix bug where flowHandler could never be set.

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

- In processEvent(), Do not unconditionally initialize the flowHandler
  ivar, because it may have already been initialized due to XML
  processing.

M       jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java

- Use XPath to parse the config.  Still in progress.

M       jsf-ri/src/main/java/com/sun/faces/config/processor/ResourceLibraryContractsConfigProcessor.java
A       jsf-ri/src/main/java/com/sun/faces/config/processor/FacesConfigNamespaceContext.java

- Move out FacesConfigNamespaceContext so it can be used in other classes.

M       jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java

- Add WebAppFlowConfigResourceProvider to list of facesConfigProviders.

A  +    jsf-ri/src/main/java/com/sun/faces/config/configprovider/WebAppFlowConfigResourceProvider.java

- Make sure -flow.xml things get discovered.

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

- Make sure parameters get added correctly.

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

- Make _getFlow() public so it can be accessed from config subsystem.

M       test/web-profile/flow/basic-multi-page/src/main/webapp/bounded-task-flow/bounded-task-flow-flow.xml
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/flow-b/flow-b-flow.xml
M       test/web-profile/flow/factory/src/main/webapp/start-flow.xml
M       test/web-profile/flow/basic-implicit/src/main/webapp/start-flow.xml
M       test/web-profile/flow/intermediate/src/main/webapp/maintain-customer-record/maintain-customer-record-flow.xml
M       test/web-profile/flow/basic_method_call/src/main/webapp/flow-b/flow-b-flow.xml
M       test/web-profile/flow/basic-multi-page-fdl-in-web-inf/src/main/webapp/WEB-INF/bounded-task-flow/bounded-task-flow-flow.xml

- Convert to XML syntax.

D       test/web-profile/flow/basic-multi-page-fdl-in-web-inf/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/multi-page-from-jar/app/src/main/webapp/WEB-INF/faces-config.xml
A  +    test/web-profile/flow/multi-page-from-jar/jar/src/main/resources/META-INF/faces-config.xml
D       test/web-profile/flow/multi-page-from-jar/jar/src/main/resources/META-INF/flows/bounded-task-flow/bounded-task-flow-flow.xml
M       test/web-profile/flow/basic_switch/src/main/webapp/flow-b/flow-b-flow.xml
D       test/web-profile/flow/basic_switch/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/basic-multi-page/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/factory/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/basic-implicit/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/intermediate/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/basic_method_call/src/main/webapp/WEB-INF/faces-config.xml

- No longer need this.



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

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11582 761efcf2-d34d-6b61-9145-99dcacc3edf1
M       jsf-ri/conf/share/tlddoc-resources/stylesheet.css

- Make it so f:view shows up as modified in 2.2 even when looking at the
  Faces Core taglib.


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


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

- Prior to the impl of 2580, there wasn't much, if any, EL activity
  happening at startup time.  Now there is some.



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


SECTION: Modified Files
----------------------------
M       test/web-profile/flow/factory/src/test/java/com/sun/faces/test/webprofile/flow/factory/FlowHandlerFactoryTestImplIT.java
M       test/web-profile/flow/factory/src/main/webapp/index.xhtml
A  +    test/web-profile/flow/factory/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/factory/src/main/webapp/start-flow.xml

- Remove @Ignore and make the test work.


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


SECTION: Modified Files
----------------------------
M       test/web-profile/flow/basic-implicit/src/test/java/com/sun/faces/test/webprofile/flow/basic_implicit/BasicFlowEntryExitIT.java
M       test/web-profile/flow/basic-implicit/src/main/webapp/index.xhtml
A  +    test/web-profile/flow/basic-implicit/src/main/webapp/WEB-INF/faces-config.xml
D       test/web-profile/flow/basic-implicit/src/main/webapp/start-flow.xml

- Remove @Ignore, make the test run.


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

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
M       jsf-ri/src/main/java/com/sun/faces/config/configprovider/MetaInfFaceletTaglibraryConfigProvider.java
D       jsf-ri/conf/share/faces-flow.taglib.xml
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowCallTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/SwitchNodeTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowReturnTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/MethodCallTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/ValueTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/DefaultOutcomeTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/MethodTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/NameTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/ParameterTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/ViewNodeTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDefinitionTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/InitializerTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FinalizerTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/VDLDocumentTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowDocumentIdTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowIdTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowReferenceTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FlowNavigationCase.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/SwitchCaseTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/IfTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FacesFlowReference.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/InboundParameterTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/FromOutcomeTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/OutboundParameterTagHandler.java
D       jsf-ri/src/main/java/com/sun/faces/facelets/flow/StartNodeTagHandler.java

- remove the prototype facelet taglib based flow parsing system.


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11587 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2718, r=rogerk, make sure all potential view parameters are checked for inclusion

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11589 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2718, r=rogerk, make sure all potential view parameters are checked for inclusion

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11590 761efcf2-d34d-6b61-9145-99dcacc3edf1
Remove test for issue #2683 since work cannot continue presently

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

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

- Remove call to facelet VDL based flow definition.

M       jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java

- Use a PostConstructApplicationEvent to ensure that flow definitions
  are not processed until all the other config files have been
  processed.

M       jsf-ri/src/main/java/com/sun/faces/config/ConfigManager.java

- Change the order of config processers

+        facesConfigProviders.add(new WebAppFlowConfigResourceProvider());
         facesConfigProviders.add(new WebFacesConfigResourceProvider());
-        facesConfigProviders.add(new WebAppFlowConfigResourceProvider());

  so that decoration works as expected.

M       jsf-ri/src/main/java/com/sun/faces/config/InitFacesContext.java

- Revert r11584.  The ELContext of the InitFacesContext is necessarily a
  no-op until after all the config files have been processed.  This is
  due to the need to populate the ELResolver chain based on information
  in the config files.


A       jsf-test/JAVASERVERFACES_SPEC_PUBLIC-763/i_spec_763_war/src/main/webapp/WEB-INF/glassfish-web.xml

- For convenience


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


SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/config/processor/FacesFlowDefinitionConfigProcessor.java
M       test/web-profile/flow/basic_faces_flow_call/src/main/webapp/flow-b/flow-b-flow.xml
M       jsf-api/doc/web-facesconfig_2_2.xsd

- Rename element <faces-flow-reference> to <flow-reference>

- Rename element <faces-flow-id> to <flow-id>


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

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/config/DbfFactory.java
M       jsf-api/doc/web-facelettaglibrary_2_2.xsd
M       jsf-api/doc/web-facesconfig_2_2.xsd
M       jsf-api/doc/web-facesuicomponent_2_2.xsd

- Depend on the EE7 schema.

A       jsf-api/doc/javaee_7.xsd

- Include the SNAPSHOT ee7 schema.


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