http://java.net/jira/browse/JAVASERVERFACES-2511

Author: Frank Caputo and Ed Burns

Frank, it's very important that we tie up the loose ends you have
flagged with FCAPUTO in this code.  I've surrounded each of them with
PENDING() to match our convention.

SECTION: API Changes
--------------------

M       jsf-api/src/main/java/javax/faces/component/UIViewRoot.java
M       jsf-api/src/main/java/javax/faces/context/FacesContext.java
M       jsf-api/src/main/java/javax/faces/context/FacesContextWrapper.java
M       integrationWithFacelets.fm
M       applicationIntegration.fm

- At Frank's suggestion, move the resourceLibraryContracts property from
  being on the UIViewRoot to being on the FacesContext.

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

- Update section references to account for new head2 section on
  FlowHandler in chapter 7.

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

- Flag createView() as having changed in 2.2.

M       jsf-api/src/main/java/javax/faces/webapp/FacesServlet.java

- Instead of "starts with" now use "contains" with respect to WEB-INF
  and META-INF in the path.


SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/facelets/impl/DefaultFaceletFactory.java

- has now a cache per contracts (i.e. the cache key is the complete list).

- relativeLocations are no longer cached (see my comment in the code).

- the cache per contracts doesn't honor
  com.sun.faces.config.WebConfiguration.WebContextInitParameter#FaceletCache
  (it uses FaceletCacheFactory)

- needsToBeRefreshed returns true if any cache doesn't have the facelet (I'm sure this is wrong)

M       jsf-ri/src/main/java/com/sun/faces/facelets/impl/DefaultFacelet.java

- relativeLocations are no longer cached.

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

- Don't just call my calculateResourceLibraryContracts().  Instead, get
  the VDL from the VH and call that, which may be the same thing, but
  will not be in the case that method is decorated.

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

- Make it so the contracts are considered for caching.

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

- The keys of MultiKeyConcurrentHashMap are now Object, because Frank
  added List<String> as the fourth cache key.

M       jsf-ri/src/main/java/com/sun/faces/context/FacesContextImpl.java
M       jsf-ri/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java
M       jsf-ri/src/main/java/com/sun/faces/application/resource/WebappResourceHelper.java
M       jsf-ri/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java

- Account for the new home of the resourceLibraryContracts property.

A       test/agnostic/vdl/facelets/contracts/vhosts
A       test/agnostic/vdl/facelets/contracts/vhosts/src
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl/facelets
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl/facelets/contracts
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl/facelets/contracts/vhosts
A       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl/facelets/contracts/vhosts/Issue2511IT.java
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test/vdl
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test/vdl/facelets
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test/vdl/facelets/contracts
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test/vdl/facelets/contracts/vhosts
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/java/com/sun/faces/test/vdl/facelets/contracts/vhosts/VDLFactory.java
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host2
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host2/template.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host3
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host3/index.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host4
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host4/index.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host1
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host1/header.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host1/css
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/contracts/host1/css/layout.css
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/index.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/header.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/template.xhtml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/WEB-INF
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/WEB-INF/faces-config.xml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/WEB-INF/web.xml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/WEB-INF/glassfish-web.xml
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/resources
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/resources/css
A       test/agnostic/vdl/facelets/contracts/vhosts/src/main/webapp/resources/css/layout.css
A       test/agnostic/vdl/facelets/contracts/vhosts/pom.xml
A       test/agnostic/vdl/facelets/contracts/pom.xml

- new test content.



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


SECTION: Modified Files
----------------------------
M       jsf-api/build.xml

- add clean.javadoc.cache target.


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

SECTION: Modified Files
----------------------------
M       test/agnostic/vdl/facelets/contracts/vhosts/src/test/java/com/sun/faces/test/agnostic/vdl/facelets/contracts/vhosts/Issue2511IT.java

- @Ignore failing tests until Frank helps me fix them.  They did work
  for me locally, though.

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

- add missing </code>


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

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/facelets/impl/DefaultFaceletFactory.java
M       jsf-ri/src/main/java/com/sun/faces/application/resource/FaceletWebappResourceHelper.java

- Remove unused imports.


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


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

- Modify the javadoc for javax.faces.bean.ViewScoped and
  javax.faces.view.ViewScoped to explicitly require that
  UIViewRoot.getViewMap() is used to store the beans.

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

- Modify the spec for UIViewRoot.getViewMap(boolean) to explicitly state
  that the map is backed by the session. And that passing true will
  cause a new session to be created if one does not exist already.

M       valueReferences.fm

- Modify the spec for Scoped Attribute ELResolver (table 5-14) so that
  it requires checking the view map after the request and before the
  session.


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

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

- Require the backing component to be a ClientBehaviorHolder with
  specific qualities.

- Add events from renderkit

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

- make the passthrough element renderer have events.

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

- Fix javadoc errors.


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

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

- Add missing actionListener attribute.


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

Forward port bug fix.

SECTION: Modified Files
----------------------------
M       jsf-ri/src/main/java/com/sun/faces/facelets/impl/DefaultFaceletFactory.java

- Make it so DefaultFaceleteFactory puts the doctype and XMLDecl into
  the place where they can be retrieved during rendering.  This is
  important because for all renderings other than the initial rendering
  this information comes from the cache.

M       jsf-ri/src/main/java/com/sun/faces/facelets/compiler/SAXCompiler.java

- Added clarifying comment.

M       test/agnostic/vdl/facelets/ui/src/test/java/com/sun/faces/test/agnostic/vdl/facelets/ui/Issue2453IT.java
A       test/agnostic/vdl/facelets/ui/src/main/webapp/Issue2575_templateClient.xhtml
A       test/agnostic/vdl/facelets/ui/src/main/webapp/Issue2575_templates
A       test/agnostic/vdl/facelets/ui/src/main/webapp/Issue2575_templates/Issue2575_template.xhtml

- New test content.


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

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

- Doug's testing regime noted that {get,set}ResourceLibraryContracts()
  does not assertNotReleased().


git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11175 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2642, r=rogerk, Guard against FacesContext.getCurrentInstance() return null.

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11177 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes http://java.net/jira/browse/JAVASERVERFACES-2642, r=rogerk, Guard against FacesContext.getCurrentInstance() return null.

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11179 761efcf2-d34d-6b61-9145-99dcacc3edf1
Add pre-maven-rename stuff

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11180 761efcf2-d34d-6b61-9145-99dcacc3edf1
modified for jboss as inclusion

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11181 761efcf2-d34d-6b61-9145-99dcacc3edf1
Moved quality project so it runs as part of the tests.

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11188 761efcf2-d34d-6b61-9145-99dcacc3edf1
Moved quality project so it runs as part of the tests.

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

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

SECTION: Modified Files
----------------------------
M jsf-api/src/main/java/javax/faces/context/FacesContext.java

- Add 

     * 
     * @throws IllegalStateException if this method is called after
     *  this instance has been released

  to {get,set}ResourceLibraryContracts().



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

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11196 761efcf2-d34d-6b61-9145-99dcacc3edf1
Added @JsfTest and @RunWith(JsfTestRunner.class)

git-svn-id: https://svn.java.net/svn/mojarra~svn/trunk@11197 761efcf2-d34d-6b61-9145-99dcacc3edf1
Added @JsfTest and @RunWith(JsfTestRunner.class)

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