You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/11/16 00:51:37 UTC
svn commit: r1202478 [8/8] - in /myfaces/shared/trunk: ./ core/
core/src/main/java/org/apache/myfaces/shared/application/
core/src/main/java/org/apache/myfaces/shared/component/
core/src/main/java/org/apache/myfaces/shared/config/ core/src/main/java/or...
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/WebConfigParamUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/WebConfigParamUtils.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/WebConfigParamUtils.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/WebConfigParamUtils.java Tue Nov 15 23:51:35 2011
@@ -70,7 +70,9 @@ public final class WebConfigParamUtils
public static String getStringInitParameter(ExternalContext context, String name, String defaultValue)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
String param = context.getInitParameter(name);
@@ -89,13 +91,15 @@ public final class WebConfigParamUtils
}
/**
- * Gets the String init parameter value from the specified context. If the parameter is an empty String or a String
+ * Gets the String init parameter value from the specified context. If the parameter is an
+ * empty String or a String
* containing only white space, this method returns <code>null</code>
*
* @param context
* the application's external context
* @param names
- * the init parameter's names, the first one is scanned first. Usually used when a param has multiple aliases
+ * the init parameter's names, the first one is scanned first. Usually used when a
+ * param has multiple aliases
*
* @return the parameter if it was specified and was not empty, <code>null</code> otherwise
*
@@ -108,13 +112,14 @@ public final class WebConfigParamUtils
}
/**
- * Gets the String init parameter value from the specified context. If the parameter is an empty String or a String
- * containing only white space, this method returns <code>null</code>
+ * Gets the String init parameter value from the specified context. If the parameter is an empty
+ * String or a String containing only white space, this method returns <code>null</code>
*
* @param context
* the application's external context
* @param names
- * the init parameter's names, the first one is scanned first. Usually used when a param has multiple aliases
+ * the init parameter's names, the first one is scanned first. Usually used when a param has
+ * multiple aliases
* @param defaultValue
* the value by default if null or empty
*
@@ -126,14 +131,18 @@ public final class WebConfigParamUtils
public static String getStringInitParameter(ExternalContext context, String[] names, String defaultValue)
{
if (names == null)
+ {
throw new NullPointerException();
+ }
String param = null;
for (String name : names)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
param = context.getInitParameter(name);
if (param != null)
@@ -200,7 +209,9 @@ public final class WebConfigParamUtils
public static boolean getBooleanInitParameter(ExternalContext context, String name, boolean defaultValue)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
String param = getStringInitParameter(context, name);
if (param == null)
@@ -214,7 +225,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default
+ * Gets the boolean init parameter value from the specified context. If the parameter
+ * was not specified, the default
* value is used instead.
*
* @param context
@@ -235,10 +247,13 @@ public final class WebConfigParamUtils
* @throws NullPointerException
* if context or name is <code>null</code>
*/
- public static boolean getBooleanInitParameter(ExternalContext context, String name, boolean defaultValue, String [] valuesIgnoreCase, boolean returnOnValueEqualsIgnoreCase)
+ public static boolean getBooleanInitParameter(ExternalContext context, String name,
+ boolean defaultValue, String [] valuesIgnoreCase, boolean returnOnValueEqualsIgnoreCase)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
String param = getStringInitParameter(context, name);
if (param == null)
@@ -266,8 +281,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the boolean init parameter value from the specified context. If the parameter was not specified,
+ * the default value is used instead.
*
* @param context
* the application's external context
@@ -286,8 +301,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the boolean init parameter value from the specified context. If the parameter was not specified,
+ * the default value is used instead.
*
* @param context
* the application's external context
@@ -304,13 +319,17 @@ public final class WebConfigParamUtils
public static boolean getBooleanInitParameter(ExternalContext context, String[] names, boolean defaultValue)
{
if (names == null)
+ {
throw new NullPointerException();
+ }
String param = null;
for (String name : names)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
param = getStringInitParameter(context, name);
if (param != null)
@@ -329,8 +348,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the boolean init parameter value from the specified context. If the parameter was not specified,
+ * the default value is used instead.
*
* @param context
* the application's external context
@@ -349,16 +368,21 @@ public final class WebConfigParamUtils
* if context or name is <code>null</code>
*/
- public static boolean getBooleanInitParameter(ExternalContext context, String[] names, boolean defaultValue, String [] valuesIgnoreCase, boolean returnOnValueEqualsIgnoreCase)
+ public static boolean getBooleanInitParameter(ExternalContext context, String[] names, boolean defaultValue,
+ String [] valuesIgnoreCase, boolean returnOnValueEqualsIgnoreCase)
{
if (names == null)
+ {
throw new NullPointerException();
+ }
String param = null;
for (String name : names)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
param = getStringInitParameter(context, name);
if (param != null)
@@ -391,8 +415,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the int init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the int init parameter value from the specified context. If the parameter was not
+ * specified, the default value is used instead.
*
* @param context
* the application's external context
@@ -414,8 +438,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the int init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the int init parameter value from the specified context. If the parameter was not specified,
+ * the default value is used instead.
*
* @param context
* the application's external context
@@ -434,7 +458,9 @@ public final class WebConfigParamUtils
public static int getIntegerInitParameter(ExternalContext context, String name, int defaultValue)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
String param = getStringInitParameter(context, name);
if (param == null)
@@ -448,8 +474,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the int init parameter value from the specified context. If the parameter was not specified, the default
- * value is used instead.
+ * Gets the int init parameter value from the specified context. If the parameter was not specified,
+ * the default value is used instead.
*
* @param context
* the application's external context
@@ -486,13 +512,17 @@ public final class WebConfigParamUtils
public static int getIntegerInitParameter(ExternalContext context, String[] names, int defaultValue)
{
if (names == null)
+ {
throw new NullPointerException();
+ }
String param = null;
for (String name : names)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
param = getStringInitParameter(context, name);
if (param != null)
@@ -554,7 +584,9 @@ public final class WebConfigParamUtils
public static long getLongInitParameter(ExternalContext context, String name, long defaultValue)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
String param = getStringInitParameter(context, name);
if (param == null)
@@ -607,13 +639,17 @@ public final class WebConfigParamUtils
public static long getLongInitParameter(ExternalContext context, String[] names, long defaultValue)
{
if (names == null)
+ {
throw new NullPointerException();
+ }
String param = null;
for (String name : names)
{
if (name == null)
+ {
throw new NullPointerException();
+ }
param = getStringInitParameter(context, name);
if (param != null)
@@ -632,8 +668,8 @@ public final class WebConfigParamUtils
}
/**
- * Gets the init parameter value from the specified context and instanciate it. If the parameter was not specified,
- * the default value is used instead.
+ * Gets the init parameter value from the specified context and instanciate it.
+ * If the parameter was not specified, the default value is used instead.
*
* @param context
* the application's external context
@@ -650,7 +686,8 @@ public final class WebConfigParamUtils
* if context or name is <code>null</code>
*/
@SuppressWarnings("unchecked")
- public static <T> T getInstanceInitParameter(ExternalContext context, String name, String deprecatedName, T defaultValue)
+ public static <T> T getInstanceInitParameter(ExternalContext context, String name,
+ String deprecatedName, T defaultValue)
{
String param = getStringInitParameter(context, name, deprecatedName);
if (param == null)
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java Tue Nov 15 23:51:35 2011
@@ -18,7 +18,12 @@
*/
package org.apache.myfaces.shared.util.el;
-import java.util.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
/**
* @author Sylvain Vieujot (latest modification by $Author$)
@@ -40,15 +45,18 @@ import java.util.*;
* JSF page :
* <h:selectBooleanCheckbox value="#{inboxFace.removeEmailUnid[email.unid]}"/>
*/
-public abstract class ActionsMap implements Map {
+public abstract class ActionsMap implements Map
+{
private Set keys;
- public ActionsMap(){
+ public ActionsMap()
+ {
// NoOp
}
- public ActionsMap(Set keys){
+ public ActionsMap(Set keys)
+ {
this.keys = keys;
}
@@ -57,41 +65,55 @@ public abstract class ActionsMap impleme
*/
public abstract void performAction(String command);
- public int size() {
+ public int size()
+ {
return keys.size();
}
- public boolean isEmpty() {
+ public boolean isEmpty()
+ {
return keys.isEmpty();
}
- public boolean containsKey(Object key) {
+ public boolean containsKey(Object key)
+ {
return keys.contains( key );
}
- public boolean containsValue(Object value) {
+ public boolean containsValue(Object value)
+ {
if( ! (value instanceof Boolean) )
+ {
return false;
+ }
return ((Boolean)value).booleanValue();
}
- public Object get( Object key) {
+ public Object get( Object key)
+ {
return Boolean.FALSE;
}
- public Boolean put(String key, Boolean value) {
+ public Boolean put(String key, Boolean value)
+ {
if( value!=null && value.booleanValue() )
- performAction( key );
+ {
+ performAction(key);
+ }
return Boolean.FALSE;
}
- public Object remove(Object key) {
+ public Object remove(Object key)
+ {
if( keys.remove( key ) )
+ {
return Boolean.FALSE;
+ }
return null;
}
- public void putAll(Map map) {
+ public void putAll(Map map)
+ {
Iterator it = map.entrySet().iterator();
while (it.hasNext())
@@ -99,23 +121,29 @@ public abstract class ActionsMap impleme
Entry entry = (Entry) it.next();
Object obj = entry.getValue();
if( (obj instanceof Boolean) && ((Boolean) obj).booleanValue() )
- performAction( (String) entry.getKey() );
+ {
+ performAction((String) entry.getKey());
+ }
}
}
- public void clear() {
+ public void clear()
+ {
keys.clear();
}
- public Set keySet() {
+ public Set keySet()
+ {
return keys;
}
- public Collection values() {
+ public Collection values()
+ {
return Collections.nCopies(keys.size(), Boolean.FALSE);
}
- public Set entrySet() {
+ public Set entrySet()
+ {
Set set = new HashSet( keys.size() );
Iterator it = keys.iterator();
@@ -129,25 +157,31 @@ public abstract class ActionsMap impleme
return set;
}
- private class CommandEntry implements Entry{
+ private class CommandEntry implements Entry
+ {
private final String command;
private boolean commandPerformed = false;
- public CommandEntry(String command){
+ public CommandEntry(String command)
+ {
this.command = command;
}
- public Object getKey() {
+ public Object getKey()
+ {
return command;
}
- public Object getValue() {
+ public Object getValue()
+ {
return Boolean.valueOf(commandPerformed);
}
- public Object setValue(Object performCommand) {
- if( (performCommand instanceof Boolean) && ((Boolean)performCommand).booleanValue() ){
+ public Object setValue(Object performCommand)
+ {
+ if( (performCommand instanceof Boolean) && ((Boolean)performCommand).booleanValue() )
+ {
performAction( command );
commandPerformed = true;
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/GenericMap.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/GenericMap.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/GenericMap.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/GenericMap.java Tue Nov 15 23:51:35 2011
@@ -18,67 +18,80 @@
*/
package org.apache.myfaces.shared.util.el;
+import java.util.Collection;
import java.util.Map;
import java.util.Set;
-import java.util.Collection;
/**
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
*
*/
-public abstract class GenericMap implements Map {
+public abstract class GenericMap implements Map
+{
/**
* This method should return the result of the test.
*/
protected abstract Object getValue(Object key);
- public int size() {
+ public int size()
+ {
return 1;
}
- public boolean isEmpty() {
+ public boolean isEmpty()
+ {
return false;
}
- public boolean containsKey(Object key) {
+ public boolean containsKey(Object key)
+ {
return true;
}
- public boolean containsValue(Object value) {
+ public boolean containsValue(Object value)
+ {
return value instanceof Boolean;
}
- public Object get(Object key) {
+ public Object get(Object key)
+ {
return getValue(key);
}
- public Object put(Object key, Object value) {
+ public Object put(Object key, Object value)
+ {
return null;
}
- public Object remove(Object key) {
+ public Object remove(Object key)
+ {
return null;
}
- public void putAll(Map m) {
+ public void putAll(Map m)
+ {
// NoOp
}
- public void clear() {
+ public void clear()
+ {
// NoOp
}
- public Set keySet() {
+ public Set keySet()
+ {
return null;
}
- public Collection values() {
+ public Collection values()
+ {
return null;
}
- public Set entrySet() {
+ public Set entrySet()
+ {
return null;
}
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/StringMap.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/StringMap.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/StringMap.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/StringMap.java Tue Nov 15 23:51:35 2011
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.shared.util.el;
-import org.apache.myfaces.shared.util.el.GenericMap;
/**
* You can use this class to perform tests.
@@ -28,20 +27,25 @@ import org.apache.myfaces.shared.util.el
* @version $Revision$ $Date$
*
*/
-public abstract class StringMap extends GenericMap {
+public abstract class StringMap extends GenericMap
+{
/**
* This method should return the result of the test.
*/
public abstract String getString(String testKey);
- public Object getValue(Object testKey){
+ public Object getValue(Object testKey)
+ {
return getString( (String) testKey );
}
- public Object get(Object key) {
+ public Object get(Object key)
+ {
if( ! (key instanceof String) )
+ {
return null;
+ }
return getString( (String)key );
}
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/TestsMap.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/TestsMap.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/TestsMap.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/el/TestsMap.java Tue Nov 15 23:51:35 2011
@@ -18,7 +18,6 @@
*/
package org.apache.myfaces.shared.util.el;
-import org.apache.myfaces.shared.util.el.GenericMap;
/**
* You can use this class to perform tests.
@@ -27,24 +26,30 @@ import org.apache.myfaces.shared.util.el
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
*/
-public abstract class TestsMap extends GenericMap {
+public abstract class TestsMap extends GenericMap
+{
/**
* This method should return the result of the test.
*/
public abstract boolean getTest(String testKey);
- protected Object getValue(Object testKey){
+ protected Object getValue(Object testKey)
+ {
return Boolean.valueOf(getTest( (String) testKey ));
}
- public Object get(Object key) {
+ public Object get(Object key)
+ {
if( ! (key instanceof String) )
+ {
return null;
+ }
return Boolean.valueOf(getTest( (String)key ));
}
- public Boolean put(String key, Boolean value) {
+ public Boolean put(String key, Boolean value)
+ {
return Boolean.FALSE;
}
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/servlet/SourceCodeServlet.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/servlet/SourceCodeServlet.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/servlet/SourceCodeServlet.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/servlet/SourceCodeServlet.java Tue Nov 15 23:51:35 2011
@@ -18,9 +18,16 @@
*/
package org.apache.myfaces.shared.util.servlet;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import java.io.*;
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
public class SourceCodeServlet extends HttpServlet
{
@@ -55,8 +62,12 @@ public class SourceCodeServlet extends H
out.print((char)ch);
}
}
- finally {
- if (in != null) in.close(); // very important
+ finally
+ {
+ if (in != null)
+ {
+ in.close(); // very important
+ }
}
}
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/xml/MyFacesErrorHandler.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/xml/MyFacesErrorHandler.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/xml/MyFacesErrorHandler.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/xml/MyFacesErrorHandler.java Tue Nov 15 23:51:35 2011
@@ -41,7 +41,10 @@ public class MyFacesErrorHandler
public void warning(SAXParseException exception)
{
- if (_log.isLoggable(Level.WARNING)) _log.log(Level.WARNING, getMessage(exception), exception);
+ if (_log.isLoggable(Level.WARNING))
+ {
+ _log.log(Level.WARNING, getMessage(exception), exception);
+ }
}
public void error(SAXParseException exception)
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/view/JspViewDeclarationLanguageBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/view/JspViewDeclarationLanguageBase.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/view/JspViewDeclarationLanguageBase.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/view/JspViewDeclarationLanguageBase.java Tue Nov 15 23:51:35 2011
@@ -22,7 +22,6 @@ import java.beans.BeanInfo;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;
-import java.net.MalformedURLException;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -124,7 +123,9 @@ public abstract class JspViewDeclaration
if (!view.isRendered())
{
if (log.isLoggable(Level.FINEST))
+ {
log.finest("View is not rendered");
+ }
return;
}
@@ -143,13 +144,16 @@ public abstract class JspViewDeclaration
String viewId = context.getViewRoot().getViewId();
if (log.isLoggable(Level.FINEST))
+ {
log.finest("Rendering JSP view: " + viewId);
+ }
// handle character encoding as of section 2.5.2.2 of JSF 1.1
if(null != externalContext.getSession(false))
{
- externalContext.getSessionMap().put(ViewHandler.CHARACTER_ENCODING_KEY, externalContext.getResponseCharacterEncoding());
+ externalContext.getSessionMap().put(ViewHandler.CHARACTER_ENCODING_KEY,
+ externalContext.getResponseCharacterEncoding());
}
// render the view in this method (since JSF 1.2)
@@ -159,7 +163,8 @@ public abstract class JspViewDeclaration
ResponseWriter responseWriter = context.getResponseWriter();
if (responseWriter == null)
{
- responseWriter = renderKit.createResponseWriter(externalContext.getResponseOutputWriter(), null, externalContext.getRequestCharacterEncoding());
+ responseWriter = renderKit.createResponseWriter(externalContext.getResponseOutputWriter(),
+ null, externalContext.getRequestCharacterEncoding());
context.setResponseWriter(responseWriter);
}
@@ -229,7 +234,8 @@ public abstract class JspViewDeclaration
// afterViewTagResponse is null if the current request is a partial request
if (afterViewTagResponse != null)
{
- afterViewTagResponse.flushToWriter(externalContext.getResponseOutputWriter(), externalContext.getResponseCharacterEncoding());
+ afterViewTagResponse.flushToWriter(externalContext.getResponseOutputWriter(),
+ externalContext.getResponseCharacterEncoding());
}
//TODO sobryan: Is this right?
@@ -319,7 +325,8 @@ public abstract class JspViewDeclaration
}
}
- protected void writePartialBuffer(StringBuffer contentBuffer, int beginIndex, int endIndex, Writer writer) throws IOException
+ protected void writePartialBuffer(StringBuffer contentBuffer, int beginIndex,
+ int endIndex, Writer writer) throws IOException
{
int index = beginIndex;
int bufferSize = 2048;
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java Tue Nov 15 23:51:35 2011
@@ -113,7 +113,10 @@ public class WebXml
public List getFacesServletMappings()
{
- if (_facesServletMappings != null) return _facesServletMappings;
+ if (_facesServletMappings != null)
+ {
+ return _facesServletMappings;
+ }
List tempFacesServletMappings = new ArrayList();
for (Iterator it = _servlets.entrySet().iterator(); it.hasNext(); )
@@ -141,17 +144,23 @@ public class WebXml
for (Iterator it2 = urlPatterns.iterator(); it2.hasNext(); )
{
String urlpattern = (String)it2.next();
- tempFacesServletMappings.add(new org.apache.myfaces.shared.webapp.webxml.ServletMapping(servletName,
- servletClass,
- urlpattern));
+ tempFacesServletMappings.add(
+ new org.apache.myfaces.shared.webapp.webxml.ServletMapping(servletName,
+ servletClass,
+ urlpattern));
if (log.isLoggable(Level.FINEST))
+ {
log.finest("adding mapping for servlet + " + servletName + " urlpattern = " + urlpattern);
+ }
}
}
}
else
{
- if (log.isLoggable(Level.FINEST)) log.finest("ignoring servlet + " + servletName + " " + servletClass + " (no FacesServlet)");
+ if (log.isLoggable(Level.FINEST))
+ {
+ log.finest("ignoring servlet + " + servletName + " " + servletClass + " (no FacesServlet)");
+ }
}
}
@@ -167,7 +176,10 @@ public class WebXml
*/
public List getFacesExtensionsFilterMappings()
{
- if (_facesExtensionsFilterMappings != null) return _facesExtensionsFilterMappings;
+ if (_facesExtensionsFilterMappings != null)
+ {
+ return _facesExtensionsFilterMappings;
+ }
List tempExtensionsFilterMappings = new ArrayList();
for (Iterator it = _filters.entrySet().iterator(); it.hasNext(); )
@@ -193,7 +205,9 @@ public class WebXml
tempExtensionsFilterMappings.add(new org.apache.myfaces.shared.webapp.webxml.FilterMapping(
filterName, filterClass, urlpattern));
if (log.isLoggable(Level.FINEST))
+ {
log.finest("adding mapping for filter + " + filterName + " urlpattern = " + urlpattern);
+ }
}
}
}
@@ -234,9 +248,11 @@ public class WebXml
protected boolean isOld(ExternalContext context)
{
- if (refreshPeriod > 0) {
+ if (refreshPeriod > 0)
+ {
long ttl = this.parsingTime + refreshPeriod;
- if (System.currentTimeMillis() > ttl) {
+ if (System.currentTimeMillis() > ttl)
+ {
long lastModified = WebXmlParser.getWebXmlLastModified(context);
return lastModified == 0 || lastModified > ttl;
}
@@ -274,7 +290,8 @@ public class WebXml
public static void update(ExternalContext context)
{
- if (getWebXml(context).isOld(context)){
+ if (getWebXml(context).isOld(context))
+ {
WebXml.init(context);
}
}
Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java (original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java Tue Nov 15 23:51:35 2011
@@ -120,11 +120,16 @@ public class WebXmlParser
public static long getWebXmlLastModified(ExternalContext context)
{
- try {
+ try
+ {
URL url = context.getResource(WEB_XML_PATH);
if (url != null)
+ {
return url.openConnection().getLastModified();
- } catch (IOException e) {
+ }
+ }
+ catch (IOException e)
+ {
log.log(Level.SEVERE, "Could not find web.xml in path " + WEB_XML_PATH);
}
return 0L;
@@ -227,7 +232,10 @@ public class WebXmlParser
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ }
}
}
}
@@ -250,18 +258,26 @@ public class WebXmlParser
{
servletClass = org.apache.myfaces.shared.util.xml.XmlUtils.getElementText((Element)n).trim();
}
- else if (n.getNodeName().equals("description") || n.getNodeName().equals("load-on-startup") || n.getNodeName().equals("init-param"))
+ else if (n.getNodeName().equals("description") || n.getNodeName().equals("load-on-startup")
+ || n.getNodeName().equals("init-param"))
{
//ignore
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored element '" + n.getNodeName() + "' as child of '" + servletElem.getNodeName() + "'.");
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored element '" + n.getNodeName() + "' as child of '" +
+ servletElem.getNodeName() + "'.");
+ }
}
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ }
}
}
_webXml.addServlet(servletName, servletClass);
@@ -288,12 +304,19 @@ public class WebXmlParser
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored element '" + n.getNodeName() + "' as child of '" + servletMappingElem.getNodeName() + "'.");
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored element '" + n.getNodeName() + "' as child of '" +
+ servletMappingElem.getNodeName() + "'.");
+ }
}
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ }
}
}
urlPattern = urlPattern.trim();
@@ -324,12 +347,19 @@ public class WebXmlParser
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored element '" + n.getNodeName() + "' as child of '" + filterElem.getNodeName() + "'.");
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored element '" + n.getNodeName() + "' as child of '" +
+ filterElem.getNodeName() + "'.");
+ }
}
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ }
}
}
_webXml.addFilter(filterName, filterClass);
@@ -360,12 +390,19 @@ public class WebXmlParser
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored element '" + n.getNodeName() + "' as child of '" + filterMappingElem.getNodeName() + "'.");
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored element '" + n.getNodeName() + "' as child of '" +
+ filterMappingElem.getNodeName() + "'.");
+ }
}
}
else
{
- if (log.isLoggable(Level.FINE)) log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine("Ignored node '" + n.getNodeName() + "' of type " + n.getNodeType());
+ }
}
}
_webXml.addFilterMapping(filterName, urlPattern);
Modified: myfaces/shared/trunk/core/src/main/resources/META-INF/myfaces-metadata.xml
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/resources/META-INF/myfaces-metadata.xml?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/resources/META-INF/myfaces-metadata.xml (original)
+++ myfaces/shared/trunk/core/src/main/resources/META-INF/myfaces-metadata.xml Tue Nov 15 23:51:35 2011
@@ -75,7 +75,7 @@ component. The id is not necessarily uni
<name>binding</name>
<className>javax.faces.component.UIComponent</className>
<desc>backing bean property to bind to this component instance</desc>
- <longDesc>Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind to this component instance. This value must be an EL expression.</longDesc>
+ <longDesc>Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind " + "to this component instance. This value must be an EL expression.</longDesc>
<generated>false</generated>
</property>
</component>
@@ -7552,11 +7552,12 @@ tree.
<defaultValue>.class .jsp .jspx .properties .xhtml .groovy</defaultValue>
<sourceClassName>javax.faces.application.ResourceHandler</sourceClassName>
<since>2.0</since>
+ <group>resources</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.STATE_SAVING_METHOD</name>
<fieldName>STATE_SAVING_METHOD_PARAM_NAME</fieldName>
- <desc>Define the state method to be used. There are two different options defined by the specification: 'client' and 'server' state.</desc>
+ <desc>Define the state method to be used. There are two different options " + "defined by the specification: 'client' and 'server' state.</desc>
<longDesc>
<![CDATA[
Define the state method to be used. There are two different options defined by the
@@ -7578,14 +7579,19 @@ token is embedded in the data rendered t
<expectedValues>server,client</expectedValues>
<sourceClassName>javax.faces.application.StateManager</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>javax.faces.FULL_STATE_SAVING_VIEW_IDS</name>
<fieldName>FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME</fieldName>
- <desc>Indicate the viewId(s) separated by commas that should be saved and restored fully, without use Partial State Saving (PSS)</desc>
- <longDesc>Indicate the viewId(s) separated by commas that should be saved and restored fully, without use Partial State Saving (PSS).</longDesc>
+ <desc>Indicate the viewId(s) separated by commas that should be saved and restored fully,
+without use Partial State Saving (PSS)</desc>
+ <longDesc>Indicate the viewId(s) separated by commas that should be saved and restored fully,
+without use Partial State Saving (PSS).</longDesc>
<sourceClassName>javax.faces.application.StateManager</sourceClassName>
<since>2.0</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.PARTIAL_STATE_SAVING</name>
@@ -7605,6 +7611,8 @@ state of the view.</p>
<expectedValues>true,false</expectedValues>
<sourceClassName>javax.faces.application.StateManager</sourceClassName>
<since>2.0</since>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>javax.faces.DEFAULT_SUFFIX</name>
@@ -7616,6 +7624,7 @@ used by JSF to create views and render p
<defaultValue>.xhtml .view.xml .jsp</defaultValue>
<sourceClassName>javax.faces.application.ViewHandler</sourceClassName>
<since>1.1</since>
+ <group>viewhandler</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.FACELETS_SUFFIX</name>
@@ -7625,6 +7634,7 @@ used by JSF to create views and render p
<defaultValue>.xhtml</defaultValue>
<sourceClassName>javax.faces.application.ViewHandler</sourceClassName>
<since>2.0</since>
+ <group>viewhandler</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.FACELETS_VIEW_MAPPINGS</name>
@@ -7633,6 +7643,7 @@ used by JSF to create views and render p
<longDesc>Set of extensions handled by facelets, separated by ';'.</longDesc>
<sourceClassName>javax.faces.application.ViewHandler</sourceClassName>
<since>2.0</since>
+ <group>viewhandler</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.HONOR_CURRENT_COMPONENT_ATTRIBUTES</name>
@@ -7657,6 +7668,7 @@ enabled when Bean Validation binaries ar
<expectedValues>auto, true, false</expectedValues>
<sourceClassName>javax.faces.component.UIInput</sourceClassName>
<since>2.0</since>
+ <group>validation</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</name>
@@ -7673,6 +7685,7 @@ Submitted values are decoded as null val
<expectedValues>true, false</expectedValues>
<sourceClassName>javax.faces.component.UIInput</sourceClassName>
<since>2.0</since>
+ <group>validation</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH</name>
@@ -7685,6 +7698,7 @@ See MYFACES-2739 for details.</longDesc>
<expectedValues>true,false</expectedValues>
<sourceClassName>javax.faces.convert.EnumConverter</sourceClassName>
<since>2.0.1</since>
+ <group>validation</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR</name>
@@ -7696,6 +7710,7 @@ Explicitly adding a BeanValidator to an
<expectedValues>true, false</expectedValues>
<sourceClassName>javax.faces.validator.BeanValidator</sourceClassName>
<since>2.0</since>
+ <group>validation</group>
</webConfigParam>
<webConfigParam>
<name>javax.faces.CONFIG_FILES</name>
@@ -7733,6 +7748,7 @@ Furthermore, the init parameter only wor
</longDesc>
<sourceClassName>javax.faces.webapp.PreJsf2ExceptionHandlerFactory$PreJsf2ExceptionHandlerImpl</sourceClassName>
<since>1.2.4</since>
+ <deprecated>true</deprecated>
</webConfigParam>
</webConfig>
<webConfig>
@@ -7740,22 +7756,36 @@ Furthermore, the init parameter only wor
<webConfigParam>
<name>org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE</name>
<fieldName>CHECKED_VIEWID_CACHE_SIZE_ATTRIBUTE</fieldName>
- <desc>Controls the size of the cache used to "remember" if a view exists or not</desc>
+ <desc>Controls the size of the cache used to 'remember' if a view exists or not.</desc>
<longDesc>Controls the size of the cache used to "remember" if a view exists or not.</longDesc>
<defaultValue>500</defaultValue>
<sourceClassName>org.apache.myfaces.shared.application.DefaultViewHandlerSupport</sourceClassName>
<since>2.0.2</since>
+ <group>viewhandler</group>
+ <tags>performance</tags>
+ <classType>java.lang.Integer</classType>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED</name>
<fieldName>CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE</fieldName>
- <desc>Enable or disable a cache used to "remember" if a view exists or not and reduce the impact of
-sucesive calls to ExternalContext</desc>
+ <desc>Enable or disable a cache used to 'remember' if a view exists or not and reduce the impact " + "of sucesive calls to ExternalContext.getResource().</desc>
<longDesc>Enable or disable a cache used to "remember" if a view exists or not and reduce the impact of
sucesive calls to ExternalContext.getResource().</longDesc>
<defaultValue>true</defaultValue>
+ <expectedValues>true, false</expectedValues>
<sourceClassName>org.apache.myfaces.shared.application.DefaultViewHandlerSupport</sourceClassName>
<since>2.0.2</since>
+ <group>viewhandler</group>
+ <tags>performance</tags>
+ </webConfigParam>
+ <webConfigParam>
+ <name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</name>
+ <fieldName>INIT_PARAM_RESOURCE_VIRTUAL_PATH</fieldName>
+ <desc>Set the virtual path used to serve resources using tomahawk addResource API</desc>
+ <longDesc>Set the virtual path used to serve resources using tomahawk addResource API. Note ExtensionsFilter should
+be able to receive request on the prefix used here.</longDesc>
+ <sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
+ <tags>tomahawk</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.PRETTY_HTML</name>
@@ -7765,9 +7795,11 @@ sucesive calls to ExternalContext.getRes
i.e. additional line separators and whitespace will be written, that do not
influence the HTML code. Default: "true"</longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ALLOW_JAVASCRIPT</name>
@@ -7780,19 +7812,25 @@ If javascript is not allowed, the state
added as url parameters.
Default: "true"</longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.DETECT_JAVASCRIPT</name>
<fieldName>INIT_PARAM_DETECT_JAVASCRIPT</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Deprecated: tomahawk specific param to detect javascript, but it is no longer valid anymore</desc>
+ <longDesc>Deprecated: tomahawk specific param to detect javascript, but it is no longer valid anymore.</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>render</group>
+ <tags>tomahawk</tags>
+ <deprecated>true</deprecated>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.AUTO_SCROLL</name>
@@ -7805,15 +7843,16 @@ with long lists and you do not want the
if you trigger a link or button action that stays on the same page.
Default: "false"</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <tags>tomahawk</tags>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ADD_RESOURCE_CLASS</name>
<fieldName>INIT_PARAM_ADD_RESOURCE_CLASS</fieldName>
- <desc>Tomahawk specific: A class implementing the
-org</desc>
+ <desc>Tomahawk specific: Indicate the class responsible to place scripts and css using " + "tomahawk AddResource API</desc>
<longDesc>Tomahawk specific: A class implementing the
org.apache.myfaces.shared.renderkit.html.util.AddResource
interface. It is responsible to
@@ -7825,13 +7864,12 @@ gain performance.</longDesc>
<defaultValue>org.apache.myfaces. renderkit.html.util. DefaultAddResource</defaultValue>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <tags>tomahawk</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</name>
<fieldName>INIT_CHECK_EXTENSIONS_FILTER</fieldName>
- <desc>Tomahawk specific: A very common problem in configuring MyFaces-web-applications
-is that the Extensions-Filter is not configured at all
-or improperly configured</desc>
+ <desc>Tomahawk specific: This parameter will check for a properly configured Extensions-Filter if " + "it is needed by the web-app.</desc>
<longDesc>Tomahawk specific: A very common problem in configuring MyFaces-web-applications
is that the Extensions-Filter is not configured at all
or improperly configured. This parameter will check for a properly
@@ -7843,58 +7881,105 @@ this parameter to false.
In tomahawk for JSF 2.0 since version 1.1.11, this param is set by default to false, otherwise is true.</longDesc>
<defaultValue>for JSF 2.0 since 1.1.11 false, otherwise true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <tags>tomahawk</tags>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</name>
<fieldName>INIT_READONLY_AS_DISABLED_FOR_SELECT</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Tomahawk specific: Interpret "readonly" property as "disable" for select components like t:selectOneRow</desc>
+ <longDesc>Tomahawk specific: Interpret "readonly" property as "disable" for select components like t:selectOneRow.</longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>render</group>
+ <tags>tomahawk</tags>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</name>
<fieldName>INIT_PARAM_CONFIG_REFRESH_PERIOD</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Set the time in seconds that check for updates of web</desc>
+ <longDesc>Set the time in seconds that check for updates of web.xml and faces-config descriptors and
+refresh the configuration.
+This param is valid only if project stage is not production. Set this param to 0 disable this feature.</longDesc>
<defaultValue>2</defaultValue>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <classType>java.lang.Long</classType>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.VIEWSTATE_JAVASCRIPT</name>
<fieldName>INIT_PARAM_VIEWSTATE_JAVASCRIPT</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Set the view state using a javascript function instead a hidden input field</desc>
+ <longDesc>Set the view state using a javascript function instead a hidden input field.</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <deprecated>true</deprecated>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RENDER_VIEWSTATE_ID</name>
<fieldName>INIT_PARAM_RENDER_VIEWSTATE_ID</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Define if the input field that should store the state (javax</desc>
+ <longDesc>
+<![CDATA[
+Define if the input field that should store the state (javax.faces.ViewState) should render
+id="javax.faces.ViewState".
+
+JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name"
+and the "id" attribute of the hidden input that is rendered for the purpose of state saving
+(see ResponseStateManager.VIEW_STATE_PARAM).
+Actually this causes duplicate id attributes and thus invalid XHTML pages when multiple forms are rendered on
+one page. With the org.apache.myfaces.RENDER_VIEWSTATE_ID context parameter you can tune this behaviour.
+<br/>Set it to
+<ul><li>true - to render JSF 1.2 compliant id attributes (that might cause invalid XHTML), or</li>
+<li>false - to omit rendering of the id attribute (which is only needed for very special
+AJAX/Javascript components)</li></ul>
+Default value is: true (for backwards compatibility and JSF 1.2 compliancy)
+]]>
+ </longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.STRICT_XHTML_LINKS</name>
<fieldName>INIT_PARAM_STRICT_XHTML_LINKS</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc><![CDATA[Use "&amp;" entity instead a plain "&" character within HTML]]></desc>
+ <longDesc>
+<![CDATA[
+Use "&amp;" entity instead a plain "&" character within HTML.
+<p>W3C recommends to use the "&amp;" entity instead of a plain "&" character within HTML.
+This also applies to attribute values and thus to the "href" attribute of <a> elements as well.
+Even more, when XHTML is used as output the usage of plain "&" characters is forbidden and would lead to
+invalid XML code.
+Therefore, since version 1.1.6 MyFaces renders the correct "&amp;" entity for links.</p>
+<p>The init parameter
+org.apache.myfaces.STRICT_XHTML_LINKS makes it possible to restore the old behaviour and to make MyFaces
+"bug compatible" to the Sun RI which renders plain "&" chars in links as well.</p>
+<p>
+See: <a href="http://www.w3.org/TR/html401/charset.html#h-5.3.2">HTML 4.01 Specification</a>
+See: <a href="http://issues.apache.org/jira/browse/MYFACES-1774">Jira: MYFACES-1774</a>
+</p>
+]]>
+ </longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
- <since>1.1</since>
+ <since>1.1.6</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON</name>
@@ -7906,23 +7991,28 @@ compatibility with hidden fields feature
because jsf ri does not render javascript on onclick method for button,
so myfaces should do this.</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.2.3</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS</name>
<fieldName>INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS</fieldName>
- <desc>This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used, instead
-use javascript to create them</desc>
- <longDesc>This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used, instead
-use javascript to create them. Set this param to true also enables org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON
-automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in this environment,
-document.createElement() and form.appendChild() javascript methods are not supported.</longDesc>
+ <desc>This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used,
+instead use javascript to create them</desc>
+ <longDesc>This param renders hidden fields at the end of h:form for link params when h:commandLink + f:param is used,
+instead use javascript to create them. Set this param to true also enables
+org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON
+automatically to ensure consistency. This feature is required to support Windows Mobile 6, because in
+this environment, document.createElement() and form.appendChild() javascript methods are not supported.</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.2.9</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE</name>
@@ -7932,15 +8022,27 @@ link (call to window</desc>
<longDesc>Add a code that save the form before submit using a
link (call to window.external.AutoCompleteSaveForm(form) ). It's a bug on IE.</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.1</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.DELEGATE_FACES_SERVLET</name>
<fieldName>INIT_PARAM_DELEGATE_FACES_SERVLET</fieldName>
- <desc>no description</desc>
- <longDesc></longDesc>
+ <desc>Define an alternate class name that will be used to initialize MyFaces, instead the default
+javax</desc>
+ <longDesc>
+<![CDATA[
+Define an alternate class name that will be used to initialize MyFaces, instead the default
+javax.faces.webapp.FacesServlet.
+
+<p>This helps MyFaces to detect the mappings and other additional configuration used to setup the
+environment, and prevent abort initialization if no FacesServlet config is detected.
+</p>
+]]>
+ </longDesc>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>1.2.7</since>
</webConfigParam>
@@ -7950,11 +8052,12 @@ link (call to window.external.AutoComple
<desc>Indicate if the facelet associated to the view should be reapplied when the view is refreshed</desc>
<longDesc>
<![CDATA[
-Indicate if the facelet associated to the view should be reapplied when the view is refreshed. Default mode is "auto".
+Indicate if the facelet associated to the view should be reapplied when the view is refreshed.
+ Default mode is "auto".
<p>This param is only valid when partial state saving is on.
-If this is set as true, the tag-handlers are always reapplied before render view, like in facelets 1.1.x, allowing
-c:if work correctly to "toggle" components based on a value changed on invoke application phase.
+If this is set as true, the tag-handlers are always reapplied before render view, like in facelets 1.1.x,
+allowing c:if work correctly to "toggle" components based on a value changed on invoke application phase.
If the param is set as "auto", the implementation check if c:if, c:forEach,
c:choose and ui:include with src=ELExpression is used on the page and if that so, mark the view
to be refreshed.</p>
@@ -7964,6 +8067,9 @@ to be refreshed.</p>
<expectedValues>true,false,auto</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0</since>
+ <group>state</group>
+ <tags>performance</tags>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE</name>
@@ -7982,8 +8088,12 @@ is preserved between request.</p>
]]>
</longDesc>
<defaultValue>false</defaultValue>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0</since>
+ <group>state</group>
+ <tags>performance</tags>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.VALIDATE_XML</name>
@@ -8000,9 +8110,10 @@ If set to <code>true</code>, tag library
will be validated during application start up
]]>
</longDesc>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0</since>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG</name>
@@ -8010,9 +8121,11 @@ will be validated during application sta
<desc>Wrap content inside script with xml comment to prevent old browsers to display it</desc>
<longDesc>Wrap content inside script with xml comment to prevent old browsers to display it. By default it is true.</longDesc>
<defaultValue>true</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0.1</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE</name>
@@ -8020,25 +8133,68 @@ will be validated during application sta
<desc>If set true, render the form submit script inline, as in myfaces core 1</desc>
<longDesc>If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions</longDesc>
<defaultValue>false</defaultValue>
- <expectedValues>true,false</expectedValues>
+ <expectedValues>true, false, on, off, yes, no</expectedValues>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0.2</since>
+ <group>render</group>
+ <ignoreUpperLowerCase>true</ignoreUpperLowerCase>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.DEBUG_PHASE_LISTENER</name>
<fieldName>INIT_PARAM_DEBUG_PHASE_LISTENER</fieldName>
- <desc>Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value)</desc>
- <longDesc>Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value).
-Note evaluate those getters for each component could cause some unwanted side effects when using "access" type scopes like on MyFaces CODI.
+ <desc>Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder
+variables (submittedValue, localValue, value)</desc>
+ <longDesc>Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder
+variables (submittedValue, localValue, value).
+Note evaluate those getters for each component could cause some unwanted side effects when
+using "access" type scopes like on MyFaces CODI.
This param only has effect when project stage is Development.</longDesc>
<sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
<since>2.0.8</since>
</webConfigParam>
<webConfigParam>
+ <name>org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX</name>
+ <fieldName>INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX</fieldName>
+ <desc>Detect if a target (usually head) should be update for the current view in an ajax render
+operation</desc>
+ <longDesc>Detect if a target (usually head) should be update for the current view in an ajax render
+operation. This is activated if a css or js resource is added dynamically by effect of a refresh
+(c:if, ui:include src="#{...}" or a manipulation of the tree). This ensures ajax updates of content
+using ui:include will be consistent. Note this behavior is a myfaces specific extension, so to ensure strict compatibility with the spec,
+set this param to false (default false).</longDesc>
+ <defaultValue>false</defaultValue>
+ <expectedValues>true, false</expectedValues>
+ <sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
+ <since>2.0.10</since>
+ </webConfigParam>
+ <webConfigParam>
+ <name>org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER</name>
+ <fieldName>INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER</fieldName>
+ <desc>Change default getType() behavior for composite component EL resolver, from return null (see JSF 2_0 spec section 5_6_2_2) to
+use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the
+right type when a getType() is called over the source EL expression</desc>
+ <longDesc>Change default getType() behavior for composite component EL resolver, from return null (see JSF 2_0 spec section 5_6_2_2) to
+use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the
+right type when a getType() is called over the source EL expression.
+
+To ensure strict compatibility with the spec set this param to true (by default is false, so the change is enabled by default).</longDesc>
+ <defaultValue>false</defaultValue>
+ <expectedValues>true, false</expectedValues>
+ <sourceClassName>org.apache.myfaces.shared.config.MyfacesConfig</sourceClassName>
+ <since>2.0.10</since>
+ <group>EL</group>
+ </webConfigParam>
+ <webConfigParam>
<name>org.apache.myfaces.FLASH_SCOPE_DISABLED</name>
<fieldName>FLASH_SCOPE_DISABLED_PARAM</fieldName>
- <desc>Defines whether flash scope is disabled</desc>
- <longDesc>Defines whether flash scope is disabled.</longDesc>
+ <desc>Defines whether flash scope is disabled, preventing add the Flash cookie to the response</desc>
+ <longDesc>
+<![CDATA[
+Defines whether flash scope is disabled, preventing add the Flash cookie to the response.
+
+<p>This is useful for applications that does not require to use flash scope, and instead uses other scopes.</p>
+]]>
+ </longDesc>
<defaultValue>false</defaultValue>
<sourceClassName>org.apache.myfaces.shared.context.flash.FlashImpl</sourceClassName>
<since>2.0.5</since>
@@ -8046,28 +8202,48 @@ This param only has effect when project
<webConfigParam>
<name>org.apache.myfaces.RESOURCE_MAX_TIME_EXPIRES</name>
<fieldName>RESOURCE_MAX_TIME_EXPIRES</fieldName>
- <desc>Set the max time in miliseconds set on the "Expires" header for a resource</desc>
- <longDesc>Set the max time in miliseconds set on the "Expires" header for a resource.
+ <desc>Set the max time in miliseconds set on the "Expires" header for a resource rendered by
+the default ResourceHandler</desc>
+ <longDesc>Set the max time in miliseconds set on the "Expires" header for a resource rendered by
+the default ResourceHandler.
(default to one week in miliseconds or 604800000)</longDesc>
<defaultValue>604800000</defaultValue>
<sourceClassName>org.apache.myfaces.shared.resource.BaseResourceHandlerSupport</sourceClassName>
<since>2.0</since>
+ <group>resources</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE</name>
<fieldName>RESOURCE_HANDLER_CACHE_SIZE_ATTRIBUTE</fieldName>
- <desc>no description</desc>
+ <desc>Controls the size of the cache used to check if a resource exists or not</desc>
+ <longDesc>
+<![CDATA[
+Controls the size of the cache used to check if a resource exists or not.
+
+<p>See org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED for details.</p>
+]]>
+ </longDesc>
<defaultValue>500</defaultValue>
<sourceClassName>org.apache.myfaces.shared.resource.ResourceHandlerCache</sourceClassName>
<since>2.0.2</since>
+ <group>resources</group>
+ <tags>performance</tags>
+ <classType>java.lang.Integer</classType>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED</name>
<fieldName>RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE</fieldName>
- <desc>no description</desc>
+ <desc>Enable or disable the cache used to "remember" if a resource handled by
+the default ResourceHandler exists or not</desc>
+ <longDesc>Enable or disable the cache used to "remember" if a resource handled by
+the default ResourceHandler exists or not.</longDesc>
<defaultValue>true</defaultValue>
+ <expectedValues>true,false</expectedValues>
<sourceClassName>org.apache.myfaces.shared.resource.ResourceHandlerCache</sourceClassName>
<since>2.0.2</since>
+ <group>resources</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.USE_ENCRYPTION</name>
@@ -8078,6 +8254,7 @@ This param only has effect when project
<expectedValues>true,false</expectedValues>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.SECRET</name>
@@ -8090,6 +8267,7 @@ for instructions on how to configure an
different encryption strengths.</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ALGORITHM</name>
@@ -8099,6 +8277,8 @@ different encryption strengths.</longDes
<defaultValue>DES</defaultValue>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.SECRET.CACHE</name>
@@ -8108,6 +8288,7 @@ different encryption strengths.</longDes
when the returned SecretKey for encryption algorithm is not thread safe.</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ALGORITHM.IV</name>
@@ -8116,6 +8297,7 @@ when the returned SecretKey for encrypti
<longDesc>Defines the initialization vector (Base64 encoded) used for the encryption algorithm</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.ALGORITHM.PARAMETERS</name>
@@ -8125,6 +8307,7 @@ when the returned SecretKey for encrypti
<defaultValue>ECB/PKCS5Padding</defaultValue>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.SERIAL_FACTORY</name>
@@ -8136,6 +8319,8 @@ by state manager into a byte array. The
org.apache.myfaces.shared.util.serial.SerialFactory interface.</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.COMPRESS_STATE_IN_CLIENT</name>
@@ -8146,6 +8331,8 @@ org.apache.myfaces.shared.util.serial.Se
<expectedValues>true,false</expectedValues>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
<since>1.1</since>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.MAC_ALGORITHM</name>
@@ -8156,6 +8343,8 @@ added to the view state</desc>
added to the view state.</longDesc>
<defaultValue>HmacSHA1</defaultValue>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
+ <group>state</group>
+ <tags>performance</tags>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.MAC_SECRET</name>
@@ -8165,6 +8354,7 @@ on the Message Authentication Code algor
<longDesc>Define the initialization code that are used to initialize the secret key used
on the Message Authentication Code algorithm</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
+ <group>state</group>
</webConfigParam>
<webConfigParam>
<name>org.apache.myfaces.MAC_SECRET.CACHE</name>
@@ -8173,7 +8363,7 @@ on the Message Authentication Code algor
<longDesc>If is set to "false", the secret key used for MAC algorithm is not cached. This is used
when the returned SecretKey for mac algorithm is not thread safe.</longDesc>
<sourceClassName>org.apache.myfaces.shared.util.StateUtils</sourceClassName>
+ <group>state</group>
</webConfigParam>
</webConfig>
-</model>
-
+</model>
\ No newline at end of file
Modified: myfaces/shared/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/pom.xml?rev=1202478&r1=1202477&r2=1202478&view=diff
==============================================================================
--- myfaces/shared/trunk/pom.xml (original)
+++ myfaces/shared/trunk/pom.xml Tue Nov 15 23:51:35 2011
@@ -134,7 +134,7 @@
<dependency>
<groupId>org.apache.myfaces.buildtools</groupId>
<artifactId>myfaces-builder-annotations</artifactId>
- <version>1.0.6</version>
+ <version>1.0.9</version>
<scope>provided</scope>
</dependency>