Fixes https://java.net/jira/browse/JAVASERVERFACES-3157, backport of issue #3156 and issue #3151

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/MOJARRA_2_1X_ROLLING@12803 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fixes https://java.net/jira/browse/JAVASERVERFACES-3159, backport issue #2883 to 2.1 branch

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/MOJARRA_2_1X_ROLLING@12805 761efcf2-d34d-6b61-9145-99dcacc3edf1
https://java.net/jira/browse/JAVASERVERFACES-3161


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

- Backport 2721.

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

- Backport 3150.


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/MOJARRA_2_1X_ROLLING@12807 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-3031

Author: Neil Griffin

Review notes: Ed Burns. These notes are a combination of descriptions
and questions.

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

- Make it so the namespaceParameters context-param will cause the
  correct interrogation of the ViewRoot for its containerClientId if and
  only if it is an instance of NamingContainer.

M       common/ant/dependencies.xml

- Replace download.java.net with <search.maven.org/remotecontent?filepath=>.

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

- Add com.sun.faces.namespaceParameters.

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

- in encodeBegin(), check the transient ivar corresponding to the
  namespaceParameters context-param, which is set in the ctor, and if it
  is set, append the return from viewRoot.getContainerClientId() to the
  attribute name.

M       jsf-ri/src/main/java/com/sun/faces/renderkit/ServerSideStateHelper.java
M       jsf-ri/src/main/java/com/sun/faces/renderkit/ClientSideStateHelper.java

- in the ctor, query the namespaceParameters context-param

- in the writeState(), use it.

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

In AjaxBehaviorRenderer in the buildAjaxCommand() method, the operative
change is to add an additional condition to an if, for
namespaceParameters.

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

- Use com.sun.faces.namespaceParameters.

- Add method getEncodedUrlElement().  This seems to be necessary because 

              var encodedUrlElement = form['javax.faces.encodedURL'];

  must not be enough, so this code makes it go through all the elements
  of the current form looking for it.

- in request(), prepend the namingContainerId option to all arguments,
  being careful not to miss any.


M       test/agnostic/pom.xml

- wire up new test

A       test/agnostic/ajax-namespace
A       test/agnostic/ajax-namespace/src
A       test/agnostic/ajax-namespace/src/test
A       test/agnostic/ajax-namespace/src/test/java
A       test/agnostic/ajax-namespace/src/test/java/com
A       test/agnostic/ajax-namespace/src/test/java/com/sun
A       test/agnostic/ajax-namespace/src/test/java/com/sun/faces
A       test/agnostic/ajax-namespace/src/test/java/com/sun/faces/test
A       test/agnostic/ajax-namespace/src/test/java/com/sun/faces/test/agnostic
A       test/agnostic/ajax-namespace/src/test/java/com/sun/faces/test/agnostic/ajax_namespace
A       test/agnostic/ajax-namespace/src/test/java/com/sun/faces/test/agnostic/ajax_namespace/Issue3031IT.java
A       test/agnostic/ajax-namespace/src/main
A       test/agnostic/ajax-namespace/src/main/resources
A       test/agnostic/ajax-namespace/src/main/webapp
A       test/agnostic/ajax-namespace/src/main/webapp/index.xhtml
A       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF
A       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF/glassfish-web.xml
A       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF/faces-config.xml
A       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF/beans.xml
A       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF/web.xml
A       test/agnostic/ajax-namespace/src/main/java
A       test/agnostic/ajax-namespace/src/main/java/com
A       test/agnostic/ajax-namespace/src/main/java/com/sun
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace/NamingContainerViewRoot.java
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace/ApplicationFactoryImpl.java
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace/UserBean.java
A       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace/ApplicationImpl.java
A       test/agnostic/ajax-namespace/pom.xml
A       test/agnostic/ajax-namespace/nbactions.xml

- new test


git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/MOJARRA_2_1X_ROLLING@12819 761efcf2-d34d-6b61-9145-99dcacc3edf1
Fix  Project com.sun.faces.test.agnostic.ajax-namespace:ajax-namespace is duplicated in the reactor

git-svn-id: https://svn.java.net/svn/mojarra~svn/branches/MOJARRA_2_1X_ROLLING@12820 761efcf2-d34d-6b61-9145-99dcacc3edf1
http://java.net/jira/browse/JAVASERVERFACES-3031

SECTION: Modified Files
----------------------------
M       test/agnostic/ajax-namespace/src/main/java/com/sun/faces/test/agnostic/ajax_namespace/UserBean.java
D       test/agnostic/ajax-namespace/src/main/webapp/WEB-INF/beans.xml

- convert from CDI to JSF managed bean


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