You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/03 23:46:24 UTC

svn commit: r673827 - in /myfaces/shared/trunk_3.0.x/core/src: main/java/org/apache/myfaces/shared/component/ main/java/org/apache/myfaces/shared/config/ main/java/org/apache/myfaces/shared/renderkit/ main/java/org/apache/myfaces/shared/renderkit/html/...

Author: skitching
Date: Thu Jul  3 14:46:23 2008
New Revision: 673827

URL: http://svn.apache.org/viewvc?rev=673827&view=rev
Log:
Tabs to spaces only

Modified:
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/component/DisplayValueOnlyCapable.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlFormRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/FormInfo.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentBodyELTagBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/core/ConvertDateTimeTagBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/html/HtmlDataTableELTagBase.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/ExceptionUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/MessageUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StringUtils.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java
    myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/AbstractStateUtilsTest.java
    myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/InitVector_CBCTestCase.java
    myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/MessageUtilsTest.java

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/component/DisplayValueOnlyCapable.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/component/DisplayValueOnlyCapable.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/component/DisplayValueOnlyCapable.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/component/DisplayValueOnlyCapable.java Thu Jul  3 14:46:23 2008
@@ -41,7 +41,7 @@
 
     String getDisplayValueOnlyStyle();
     void setDisplayValueOnlyStyle(String style);
-	
+    
     String getDisplayValueOnlyStyleClass();
     void setDisplayValueOnlyStyleClass(String styleClass);
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/config/MyfacesConfig.java Thu Jul  3 14:46:23 2008
@@ -170,9 +170,9 @@
         return myfacesConfig;
     }
 
-	private static MyfacesConfig createAndInitializeMyFacesConfig(ExternalContext extCtx) {
-		
-		MyfacesConfig myfacesConfig = new MyfacesConfig();
+    private static MyfacesConfig createAndInitializeMyFacesConfig(ExternalContext extCtx) {
+        
+        MyfacesConfig myfacesConfig = new MyfacesConfig();
 
         myfacesConfig.setPrettyHtml(getBooleanInitParameter(extCtx, INIT_PARAM_PRETTY_HTML,
                                                             INIT_PARAM_PRETTY_HTML_DEFAULT));
@@ -218,7 +218,7 @@
         {
             if (log.isInfoEnabled())
             {
-            	log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.");
+                log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.");
             }
         }
 
@@ -242,8 +242,8 @@
         {
             log.error("Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.");
         }
-		return myfacesConfig;
-	}
+        return myfacesConfig;
+    }
 
     private static boolean getBooleanInitParameter(ExternalContext externalContext,
                                                    String paramName,
@@ -461,28 +461,28 @@
     /**
      * Should the environment be checked so that the ExtensionsFilter will work properly. 
      */
-	public boolean isCheckExtensionsFilter()
-	{
-		return _checkExtensionsFilter;
-	}
-
-	public void setCheckExtensionsFilter(boolean extensionsFilter)
-	{
-		_checkExtensionsFilter = extensionsFilter;
-	}
+    public boolean isCheckExtensionsFilter()
+    {
+        return _checkExtensionsFilter;
+    }
+
+    public void setCheckExtensionsFilter(boolean extensionsFilter)
+    {
+        _checkExtensionsFilter = extensionsFilter;
+    }
 
     /**
      * 
      */
-	public boolean isViewStateJavascript()
-	{
-		return _viewStateJavascript;
-	}
-
-	private void setViewStateJavascript(boolean viewStateJavascript)
-	{
-		_viewStateJavascript = viewStateJavascript;
-	}
+    public boolean isViewStateJavascript()
+    {
+        return _viewStateJavascript;
+    }
+
+    private void setViewStateJavascript(boolean viewStateJavascript)
+    {
+        _viewStateJavascript = viewStateJavascript;
+    }
 
     public void setRenderClearJavascriptOnButton(
             boolean renderClearJavascriptOnButton)

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/RendererUtils.java Thu Jul  3 14:46:23 2008
@@ -71,10 +71,10 @@
  */
 public final class RendererUtils
 {
-	private RendererUtils(){
-		//nope
-	}
-	
+    private RendererUtils(){
+        //nope
+    }
+    
     private static final Log log = LogFactory.getLog(RendererUtils.class);
 
     public static final String SELECT_ITEM_LIST_ATTR = RendererUtils.class.getName() + ".LIST";
@@ -989,7 +989,7 @@
         String[] ids = actionFor.split(",");
 
         for (int i = 0; i < ids.length; i++)
-		{
+        {
             String trimedId = ids[i].trim();
             if (trimedId.equals("none"))
                 li.add(trimedId);
@@ -1037,55 +1037,55 @@
 
         ByteArrayOutputStream content = new ByteArrayOutputStream(10240);
 
-		InputStream in = null;
-		try {
-			in = ctx.getExternalContext().getResourceAsStream(file);
-			if (in == null)
-			{
-				return null;
-			}
-
-			byte[] fileBuffer = new byte[10240];
-			int read;
-			while ((read = in.read(fileBuffer)) > -1)
-			{
-				content.write(fileBuffer, 0, read);
-			}
-		}
-		catch (FileNotFoundException e) {
-			if (log.isWarnEnabled())
-				log.warn("no such file " + file, e);
-			content = null;
-		}
-		catch (IOException e) {
-			if (log.isWarnEnabled())
-				log.warn("problems during processing resource " + file, e);
-			content = null;
-		}
-		finally
-		{
-			try
-			{
-				content.close();
-			}
-			catch (IOException e)
-			{
-				log.warn(e.getLocalizedMessage(), e);
-			}
-			if (in != null)
-			{
-				try
-				{
-					in.close();
-				}
-				catch (IOException e)
-				{
-					log.warn(e.getLocalizedMessage(), e);
-				}
-			}
-		}
+        InputStream in = null;
+        try {
+            in = ctx.getExternalContext().getResourceAsStream(file);
+            if (in == null)
+            {
+                return null;
+            }
+
+            byte[] fileBuffer = new byte[10240];
+            int read;
+            while ((read = in.read(fileBuffer)) > -1)
+            {
+                content.write(fileBuffer, 0, read);
+            }
+        }
+        catch (FileNotFoundException e) {
+            if (log.isWarnEnabled())
+                log.warn("no such file " + file, e);
+            content = null;
+        }
+        catch (IOException e) {
+            if (log.isWarnEnabled())
+                log.warn("problems during processing resource " + file, e);
+            content = null;
+        }
+        finally
+        {
+            try
+            {
+                content.close();
+            }
+            catch (IOException e)
+            {
+                log.warn(e.getLocalizedMessage(), e);
+            }
+            if (in != null)
+            {
+                try
+                {
+                    in.close();
+                }
+                catch (IOException e)
+                {
+                    log.warn(e.getLocalizedMessage(), e);
+                }
+            }
+        }
 
-		return content.toString();
+        return content.toString();
     }
 
     /**

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/_SharedRendererUtils.java Thu Jul  3 14:46:23 2008
@@ -42,7 +42,7 @@
  */
 class _SharedRendererUtils
 {
-	static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component)
+    static Converter findUIOutputConverter(FacesContext facesContext, UIOutput component)
     {
         // Attention!
         // This code is duplicated in jsfapi component package.

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java Thu Jul  3 14:46:23 2008
@@ -161,7 +161,7 @@
     protected StringBuffer buildOnClick(UIComponent uiComponent, FacesContext facesContext, ResponseWriter writer)
         throws IOException
     {
-    	/* DUMMY STUFF
+        /* DUMMY STUFF
         //Find form
         UIComponent parent = uiComponent.getParent();
         while (parent != null && !(parent instanceof UIForm))
@@ -188,14 +188,14 @@
             DummyFormUtils.setWriteDummyForm(facesContext, true);
         }
         */
-    	FormInfo formInfo = findNestingForm(uiComponent, facesContext);
-    	if (formInfo == null)
-    	{
-    		throw new IllegalArgumentException("Component " + uiComponent.getClientId(facesContext) + " must be embedded in an form");
-    	}
-    	String formName = formInfo.getFormName();
-    	UIComponent nestingForm = formInfo.getForm();
-    	
+        FormInfo formInfo = findNestingForm(uiComponent, facesContext);
+        if (formInfo == null)
+        {
+            throw new IllegalArgumentException("Component " + uiComponent.getClientId(facesContext) + " must be embedded in an form");
+        }
+        String formName = formInfo.getFormName();
+        UIComponent nestingForm = formInfo.getForm();
+        
         StringBuffer onClick = new StringBuffer();
         String commandOnClick = (String)uiComponent.getAttributes().get(HTML.ONCLICK_ATTR);
 
@@ -227,13 +227,13 @@
         return onClick;
     }
 
-	protected void addHiddenCommandParameter(FacesContext facesContext, UIComponent nestingForm, String hiddenFieldName)
-	{
-		if (nestingForm != null)
+    protected void addHiddenCommandParameter(FacesContext facesContext, UIComponent nestingForm, String hiddenFieldName)
+    {
+        if (nestingForm != null)
         {
             HtmlFormRendererBase.addHiddenCommandParameter(facesContext, nestingForm, hiddenFieldName);
         }
-	}
+    }
 
     /**
      * find nesting form<br />

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlCheckboxRendererBase.java Thu Jul  3 14:46:23 2008
@@ -119,8 +119,8 @@
             SelectItem selectItem = (SelectItem) it.next();
             
             renderGroupOrItemCheckbox(facesContext, selectMany, 
-            		selectItem, useSubmittedValues, lookupSet, 
-            		converter, pageDirectionLayout, new Integer(itemNum));
+                    selectItem, useSubmittedValues, lookupSet, 
+                    converter, pageDirectionLayout, new Integer(itemNum));
 
             itemNum++;
         }
@@ -253,7 +253,7 @@
         }
         
         if (disabled) {
-        	writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
+            writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
         }
 
         if ((value != null) && (value.length() > 0)) {

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlFormRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlFormRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlFormRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlFormRendererBase.java Thu Jul  3 14:46:23 2008
@@ -94,7 +94,7 @@
     }
 
     protected String getAcceptCharset(FacesContext facesContext, UIForm form ) {
-    	return (String)form.getAttributes().get( JSFAttr.ACCEPTCHARSET_ATTR );
+        return (String)form.getAttributes().get( JSFAttr.ACCEPTCHARSET_ATTR );
     }
 
     public void encodeEnd(FacesContext facesContext, UIComponent component)

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlLinkRendererBase.java Thu Jul  3 14:46:23 2008
@@ -46,7 +46,7 @@
 public abstract class HtmlLinkRendererBase
     extends HtmlRenderer
 {
-	/* this one is never used
+    /* this one is never used
     public static final String URL_STATE_MARKER      = "JSF_URL_STATE_MARKER=DUMMY";
     public static final int    URL_STATE_MARKER_LEN  = URL_STATE_MARKER.length();
     */
@@ -217,18 +217,18 @@
         throws IOException
     {
         //Find form
-    	FormInfo formInfo = findNestingForm(component, facesContext);
-    	if (formInfo == null)
-    	{
+        FormInfo formInfo = findNestingForm(component, facesContext);
+        if (formInfo == null)
+        {
             String path = RendererUtils.getPathToComponent(component);
             String msg = "Link is not embedded in a form. Change component/tag '" + clientId + "' from javax.faces.*/<h:tagName /> " +
                 "to org.apache.myfaces.*/<t:tagName />, or embed it in a form.  This is not a bug. " +
                 "Please see: http://wiki.apache.org/myfaces/Upgrading_to_Tomahawk_1.1.3 " +
                 "The path to this component is " + path + ". If you need to render a special form and a JSF-form's attributes are not enough," +
                 "consider using the s:form tag of the MyFaces sandbox.";
-    		throw new IllegalArgumentException(msg);
-    	}
-    	UIComponent nestingForm = formInfo.getForm();
+            throw new IllegalArgumentException(msg);
+        }
+        UIComponent nestingForm = formInfo.getForm();
         String formName = formInfo.getFormName();
 
         StringBuffer onClick = new StringBuffer();
@@ -352,16 +352,16 @@
      */
     protected FormInfo findNestingForm(UIComponent uiComponent, FacesContext facesContext)
     {
-    	return _ComponentUtils.findNestingForm(uiComponent, facesContext);
+        return _ComponentUtils.findNestingForm(uiComponent, facesContext);
     }
 
-	protected void addHiddenCommandParameter(FacesContext facesContext, UIComponent nestingForm, String hiddenFieldName)
-	{
-		if (nestingForm != null)
+    protected void addHiddenCommandParameter(FacesContext facesContext, UIComponent nestingForm, String hiddenFieldName)
+    {
+        if (nestingForm != null)
         {
             HtmlFormRendererBase.addHiddenCommandParameter(facesContext, nestingForm, hiddenFieldName);
         }
-	}
+    }
 
 
     protected void renderNonJavaScriptAnchorStart(FacesContext facesContext,

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRadioRendererBase.java Thu Jul  3 14:46:23 2008
@@ -142,7 +142,7 @@
 
         // TODO : Check here for getSubmittedValue. Look at RendererUtils.getValue
         // this is useless object creation
-//    	Object itemValue = selectItem.getValue();
+//        Object itemValue = selectItem.getValue();
 
         UISelectOne selectOne = (UISelectOne)uiComponent;
 

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java Thu Jul  3 14:46:23 2008
@@ -71,11 +71,11 @@
 
     private static final String FIRST_SUBMIT_SCRIPT_ON_PAGE = "org.apache.MyFaces.FIRST_SUBMIT_SCRIPT_ON_PAGE";
 
-	public static final String NON_SUBMITTED_VALUE_WARNING
-	= "There should always be a submitted value for an input if it is rendered,"
-	+ " its form is submitted, and it was not originally rendered disabled or read-only."
-	+ "  You cannot submit a form after disabling an input element via javascript."
-	+ "  Consider setting read-only to true instead"
+    public static final String NON_SUBMITTED_VALUE_WARNING
+    = "There should always be a submitted value for an input if it is rendered,"
+    + " its form is submitted, and it was not originally rendered disabled or read-only."
+    + "  You cannot submit a form after disabling an input element via javascript."
+    + "  Consider setting read-only to true instead"
     + " or resetting the disabled value back to false prior to form submission.";
 
 
@@ -968,8 +968,8 @@
         writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
 
         final ExternalContext externalContext = facesContext.getExternalContext();
-		final MyfacesConfig currentInstance = MyfacesConfig.getCurrentInstance(externalContext);
-		boolean autoScroll = currentInstance.isAutoScroll();
+        final MyfacesConfig currentInstance = MyfacesConfig.getCurrentInstance(externalContext);
+        boolean autoScroll = currentInstance.isAutoScroll();
 
         ScriptContext context = new ScriptContext(currentInstance
             .isPrettyHtml());
@@ -1288,11 +1288,11 @@
     }
 
     public static boolean isAllowedCdataSection(FacesContext fc) {
-		Boolean value = null;
+        Boolean value = null;
 
-		if (fc != null) {
-			value = (Boolean) fc.getExternalContext().getRequestMap().get(ALLOW_CDATA_SECTION_ON);
-		}
+        if (fc != null) {
+            value = (Boolean) fc.getExternalContext().getRequestMap().get(ALLOW_CDATA_SECTION_ON);
+        }
 
         return value != null && ((Boolean) value).booleanValue();
     }
@@ -1530,7 +1530,7 @@
             if(context != null)
             {
                 contentTypeListString = (String)
-					context.getExternalContext().getRequestHeaderMap().get("Accept");
+                    context.getExternalContext().getRequestHeaderMap().get("Accept");
             }
 
             if(contentTypeListString == null)
@@ -1655,23 +1655,23 @@
         writer.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
 
         final ExternalContext externalContext = facesContext.getExternalContext();
-		final MyfacesConfig currentInstance = MyfacesConfig.getCurrentInstance(externalContext);
+        final MyfacesConfig currentInstance = MyfacesConfig.getCurrentInstance(externalContext);
 
         ScriptContext context = new ScriptContext(currentInstance.isPrettyHtml());
         context.prettyLine();
         context.increaseIndent();
 
-		context.append("function setViewState() {\n");
-		context.append("\tvar state = '");
-		context.append(serializedState);
-		context.append("';\n");
-		context.append("\tfor (var i = 0; i < document.forms.length; i++) {\n");
-		context.append("\t\tdocument.forms[i]['" + hiddenId + "'].value = state;\n");
-		context.append("\t}\n");
-		context.append("}\n");
-		context.append("setViewState();\n");
+        context.append("function setViewState() {\n");
+        context.append("\tvar state = '");
+        context.append(serializedState);
+        context.append("';\n");
+        context.append("\tfor (var i = 0; i < document.forms.length; i++) {\n");
+        context.append("\t\tdocument.forms[i]['" + hiddenId + "'].value = state;\n");
+        context.append("\t}\n");
+        context.append("}\n");
+        context.append("setViewState();\n");
 
-		context.decreaseIndent();
+        context.decreaseIndent();
 
         writer.writeText(context.toString(), null);
 

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.java Thu Jul  3 14:46:23 2008
@@ -454,7 +454,7 @@
         else
         {
             // We map successive spaces to &nbsp; and Newlines to <br/>
-        	org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(cbuf, off, len, true, true, !UTF8.equals(_characterEncoding), _writer);
+            org.apache.myfaces.shared.renderkit.html.util.HTMLEncoder.encode(cbuf, off, len, true, true, !UTF8.equals(_characterEncoding), _writer);
         }
     }
 

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTableRendererBase.java Thu Jul  3 14:46:23 2008
@@ -108,20 +108,20 @@
 
         beforeTable(facesContext, (UIData) uiComponent);
 
-		startTable(facesContext, uiComponent);
+        startTable(facesContext, uiComponent);
     }
 
-	/**
-	 * actually render the start of the table
-	 */
-	protected void startTable(FacesContext facesContext, UIComponent uiComponent) throws IOException
-	{
-		ResponseWriter writer = facesContext.getResponseWriter();
-		HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-		writer.startElement(HTML.TABLE_ELEM, uiComponent);
-		HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext);
-		HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, org.apache.myfaces.shared.renderkit.html.HTML.TABLE_PASSTHROUGH_ATTRIBUTES);
-	}
+    /**
+     * actually render the start of the table
+     */
+    protected void startTable(FacesContext facesContext, UIComponent uiComponent) throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
+        HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+        writer.startElement(HTML.TABLE_ELEM, uiComponent);
+        HtmlRendererUtils.writeIdIfNecessary(writer, uiComponent, facesContext);
+        HtmlRendererUtils.renderHTMLAttributes(writer, uiComponent, org.apache.myfaces.shared.renderkit.html.HTML.TABLE_PASSTHROUGH_ATTRIBUTES);
+    }
 
     /**
      * Render the TBODY section of the html table. See also method encodeInnerHtml.
@@ -287,7 +287,7 @@
             for(int nc = 0; nc < newspaperColumns; nc++) {
 
                 // the current row in the 'real' table
-            	int currentRow;
+                int currentRow;
                 if (newspaperHorizontalOrientation)
                     currentRow = nr * newspaperColumns + nc + first;
                 else
@@ -304,7 +304,7 @@
                 }
     
                 if (nc == 0) {
-                	// first column in table, start new row
+                    // first column in table, start new row
                     beforeRow(facesContext, uiData);
 
                     HtmlRendererUtils.writePrettyLineSeparator(facesContext);
@@ -561,20 +561,20 @@
     {
         RendererUtils.checkParamValidity(facesContext, uiComponent, UIData.class);
 
-		endTable(facesContext, uiComponent);
+        endTable(facesContext, uiComponent);
 
         afterTable(facesContext, (UIData) uiComponent);
     }
 
-	/**
-	 * actually render the end of the table
-	 */
-	protected void endTable(FacesContext facesContext, UIComponent uiComponent) throws IOException
-	{
-		ResponseWriter writer = facesContext.getResponseWriter();
-		writer.endElement(HTML.TABLE_ELEM);
-		HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-	}
+    /**
+     * actually render the end of the table
+     */
+    protected void endTable(FacesContext facesContext, UIComponent uiComponent) throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
+        writer.endElement(HTML.TABLE_ELEM);
+        HtmlRendererUtils.writePrettyLineSeparator(facesContext);
+    }
 
     /**
      * Renders either the header or the footer facets for the UIData component
@@ -627,11 +627,11 @@
             String elemName = determineHeaderFooterTag(facesContext, component, header);
 
             HtmlRendererUtils.writePrettyLineSeparator(facesContext);
-			if (elemName != null)
-			{
-				writer.startElement(elemName, component);
-			}
-			if (header)
+            if (elemName != null)
+            {
+                writer.startElement(elemName, component);
+            }
+            if (header)
             {
                 String headerStyleClass = getHeaderClass(component);
                 if (facet != null)
@@ -647,17 +647,17 @@
                 if (facet != null)
                     renderTableFooterRow(facesContext, writer, component, facet, footerStyleClass, colspan);
             }
-			if (elemName != null)
-			{
-	            writer.endElement(elemName);
-			}
-		}
+            if (elemName != null)
+            {
+                writer.endElement(elemName);
+            }
+        }
     }
 
-	protected String determineHeaderFooterTag(FacesContext facesContext, UIComponent component, boolean header)
-	{
-		return header ? HTML.THEAD_ELEM : HTML.TFOOT_ELEM;
-	}
+    protected String determineHeaderFooterTag(FacesContext facesContext, UIComponent component, boolean header)
+    {
+        return header ? HTML.THEAD_ELEM : HTML.TFOOT_ELEM;
+    }
 
     /**
      * @param header
@@ -812,7 +812,7 @@
                     if (component instanceof UIData && uiComponent instanceof UIColumn)
                         beforeColumnHeaderOrFooter(facesContext, (UIData)component, header, columnIndex);
                 
-                	renderColumnChildHeaderOrFooterRow(facesContext, writer, uiComponent, styleClass, header);
+                    renderColumnChildHeaderOrFooterRow(facesContext, writer, uiComponent, styleClass, header);
                     
                     if (component instanceof UIData && uiComponent instanceof UIColumn)
                         afterColumnHeaderOrFooter(facesContext, (UIData)component, header, columnIndex);
@@ -938,10 +938,10 @@
         writer.endElement(determineHeaderCellTag(facesContext, uiComponent.getParent()));
     }
 
-	protected String determineHeaderCellTag(FacesContext facesContext, UIComponent uiComponent)
-	{
-		return HTML.TH_ELEM;
-	}
+    protected String determineHeaderCellTag(FacesContext facesContext, UIComponent uiComponent)
+    {
+        return HTML.TH_ELEM;
+    }
 
     /**
      * Renders the footer facet for the given <code>UIColumn</code>.

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlTextRendererBase.java Thu Jul  3 14:46:23 2008
@@ -70,7 +70,7 @@
     protected static void renderOutput(FacesContext facesContext, UIComponent component)
         throws IOException
     {
-    	
+        
         String text = org.apache.myfaces.shared.renderkit.RendererUtils.getStringValue(facesContext, component);
         if (log.isDebugEnabled()) log.debug("renderOutput '" + text + "'");
         boolean escape;
@@ -117,7 +117,7 @@
 
             if (escape)
             {
-            	if (log.isDebugEnabled()) log.debug("renderOutputText writing '" + text + "'");
+                if (log.isDebugEnabled()) log.debug("renderOutputText writing '" + text + "'");
                 writer.writeText(text, org.apache.myfaces.shared.renderkit.JSFAttr.VALUE_ATTR);
             }
             else

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/FormInfo.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/FormInfo.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/FormInfo.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/FormInfo.java Thu Jul  3 14:46:23 2008
@@ -22,22 +22,22 @@
 
 public class FormInfo
 {
-	private final UIComponent form;
-	private final String formName;
-	
-	public FormInfo(final UIComponent form, final String formName)
-	{
-		this.form = form;
-		this.formName = formName;
-	}
+    private final UIComponent form;
+    private final String formName;
+    
+    public FormInfo(final UIComponent form, final String formName)
+    {
+        this.form = form;
+        this.formName = formName;
+    }
 
-	public UIComponent getForm()
-	{
-		return form;
-	}
+    public UIComponent getForm()
+    {
+        return form;
+    }
 
-	public String getFormName()
-	{
-		return formName;
-	}
+    public String getFormName()
+    {
+        return formName;
+    }
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/HTMLEncoder.java Thu Jul  3 14:46:23 2008
@@ -26,252 +26,252 @@
  */
 public abstract class HTMLEncoder
 {
-	/**
-	 * Variant of {@link #encode} where encodeNewline is false and encodeNbsp is true.
-	 */
-	public static String encode (String string)
-	{
-		return encode(string, false, true);
-	}
-
-	/**
-	 * Variant of {@link #encode} where encodeNbsp is true.
-	 */
-	public static String encode (String string, boolean encodeNewline)
-	{
-		return encode(string, encodeNewline, true);
-	}
-
-	/**
-	 * Variant of {@link #encode} where encodeNbsp and encodeNonLatin are true 
-	 */
-	public static String encode (String string, boolean encodeNewline, boolean encodeSubsequentBlanksToNbsp)
-	{
-		return encode(string, encodeNewline, encodeSubsequentBlanksToNbsp, true);
-	}
-
-	/**
-	 * Encodes the given string, so that it can be used within a html page.
-	 * @param string the string to convert
-	 * @param encodeNewline if true newline characters are converted to &lt;br&gt;'s
-	 * @param encodeSubsequentBlanksToNbsp if true subsequent blanks are converted to &amp;nbsp;'s
-	 * @param encodeNonLatin if true encode non-latin characters as numeric character references
-	 */
-	public static String encode (String string,
-								 boolean encodeNewline,
-								 boolean encodeSubsequentBlanksToNbsp,
-								 boolean encodeNonLatin)
-	{
-		if (string == null)
-		{
-			return "";
-		}
-
-		StringBuilder sb = null;	//create later on demand
-		String app;
-		char c;
-		for (int i = 0; i < string.length (); ++i)
-		{
-			app = null;
-			c = string.charAt(i);
-			
-			// All characters before letters
-			if ((int)c < 0x41)
-			{
-				switch (c)
-				{
-					case '"': app = "&quot;"; break;    //"
-					case '&': app = "&amp;"; break;     //&
-					case '<': app = "&lt;"; break;      //<
-					case '>': app = "&gt;"; break;      //>
-					case ' ':
-						if (encodeSubsequentBlanksToNbsp &&
-								(i == 0 || (i - 1 >= 0 && string.charAt(i - 1) == ' ')))
-						{
-							//Space at beginning or after another space
-							app = "&#160;";
-						}
-						break;
-					case '\n':
-						if (encodeNewline)
-						{
-							app = "<br/>";
-						}
-						break;
-				}
-			} else if (encodeNonLatin && (int)c > 0x80) {
-				 switch(c) {
-					//german umlauts
-					case '\u00E4' : app = "&auml;";  break;
-					case '\u00C4' : app = "&Auml;";  break;
-					case '\u00F6' : app = "&ouml;";  break;
-					case '\u00D6' : app = "&Ouml;";  break;
-					case '\u00FC' : app = "&uuml;";  break;
-					case '\u00DC' : app = "&Uuml;";  break;
-					case '\u00DF' : app = "&szlig;"; break;
-
-					//misc
-					//case 0x80: app = "&euro;"; break;  sometimes euro symbol is ascii 128, should we suport it?
-					case '\u20AC': app = "&euro;";  break;
-					case '\u00AB': app = "&laquo;"; break;
-					case '\u00BB': app = "&raquo;"; break;
-					case '\u00A0': app = "&#160;"; break;
-
-					default :
-						//encode all non basic latin characters
-						app = "&#" + ((int)c) + ";";
-					break;
-				}
-			}
-			if (app != null)
-			{
-				if (sb == null)
-				{
-					sb = new StringBuilder(string.substring(0, i));
-				}
-				sb.append(app);
-			} else {
-				if (sb != null)
-				{
-					sb.append(c);
-				}
-			}
-		}
-
-		if (sb == null)
-		{
-			return string;
-		}
-		else
-		{
-			return sb.toString();
-		}
-	}
-
-	/**
-	 * Variant of {@link #encode} where encodeNewline is false and encodeNbsp is true.
-	 */
-	public static void encode (char[] string, int offset, int length, Writer writer) throws IOException
-	{
-		encode(string, offset, length, false, true, writer);
-	}
-
-	/**
-	 * Variant of {@link #encode} where encodeNbsp is true.
-	 */
-	public static void encode (char[] string, int offset, int length, boolean encodeNewline, Writer writer) throws IOException
-	{
-		encode(string, offset, length, encodeNewline, true, writer);
-	}
-
-	/**
-	 * Variant of {@link #encode} where encodeNbsp and encodeNonLatin are true 
-	 */
-	public static void encode (char[] string, int offset, int length, boolean encodeNewline, boolean encodeSubsequentBlanksToNbsp, Writer writer) throws IOException
-	{
-		encode(string, offset, length, encodeNewline, encodeSubsequentBlanksToNbsp, true, writer);
-	}
-
-
-	/**
-	 * Encodes the given string, so that it can be used within a html page.
-	 * @param string the string to convert
-	 * @param encodeNewline if true newline characters are converted to &lt;br&gt;'s
-	 * @param encodeSubsequentBlanksToNbsp if true subsequent blanks are converted to &amp;nbsp;'s
-	 * @param encodeNonLatin if true encode non-latin characters as numeric character references
-	 */
-	public static void encode (char[] string, int offset, int length,
-								 boolean encodeNewline,
-								 boolean encodeSubsequentBlanksToNbsp,
-								 boolean encodeNonLatin, Writer writer) throws IOException
-	{
-		if (string == null || length < 0 || offset >= string.length)
-		{
-			return;
-		}
-		offset = Math.max(0, offset);
-		int realLength = Math.min(length, string.length - offset);
-
-		StringBuilder sb = null;	//create later on demand
-		String app;
-		char c;
-		
-		for (int i = offset; i < offset + realLength; ++i)
-		{
-			app = null;
-			c = string[i];
-
-			// All characters before letters
-			if ((int)c < 0x41)
-			{
-				switch (c)
-				{
-					case '"': app = "&quot;"; break;    //"
-					case '&': app = "&amp;"; break;     //&
-					case '<': app = "&lt;"; break;      //<
-					case '>': app = "&gt;"; break;      //>
-					case ' ':
-						if (encodeSubsequentBlanksToNbsp &&
-								(i == 0 || (i - 1 >= 0 && string[i - 1] == ' ')))
-						{
-							//Space at beginning or after another space
-							app = "&#160;";
-						}
-						break;
-					case '\n':
-						if (encodeNewline)
-						{
-							app = "<br/>";
-						}
-						break;
-				}
-			} else if (encodeNonLatin && (int)c > 0x80) {
-				 switch(c) {
-					//german umlauts
-					case '\u00E4' : app = "&auml;";  break;
-					case '\u00C4' : app = "&Auml;";  break;
-					case '\u00F6' : app = "&ouml;";  break;
-					case '\u00D6' : app = "&Ouml;";  break;
-					case '\u00FC' : app = "&uuml;";  break;
-					case '\u00DC' : app = "&Uuml;";  break;
-					case '\u00DF' : app = "&szlig;"; break;
-
-					//misc
-					//case 0x80: app = "&euro;"; break;  sometimes euro symbol is ascii 128, should we suport it?
-					case '\u20AC': app = "&euro;";  break;
-					case '\u00AB': app = "&laquo;"; break;
-					case '\u00BB': app = "&raquo;"; break;
-					case '\u00A0': app = "&#160;"; break;
-
-					default :
-						//encode all non basic latin characters
-						app = "&#" + ((int)c) + ";";
-					break;
-				}
-			}
-			if (app != null)
-			{
-				if (sb == null)
-				{
-					sb = new StringBuilder(realLength*2);
-					sb.append(string, offset, i - offset);
-				}
-				sb.append(app);
-			} else {
-				if (sb != null)
-				{
-					sb.append(c);
-				}
-			}
-		}
-
-		if (sb == null)
-		{
-			writer.write(string, offset, realLength);
-		}
-		else
-		{
-			writer.write(sb.toString());
-		}
-	}
+    /**
+     * Variant of {@link #encode} where encodeNewline is false and encodeNbsp is true.
+     */
+    public static String encode (String string)
+    {
+        return encode(string, false, true);
+    }
+
+    /**
+     * Variant of {@link #encode} where encodeNbsp is true.
+     */
+    public static String encode (String string, boolean encodeNewline)
+    {
+        return encode(string, encodeNewline, true);
+    }
+
+    /**
+     * Variant of {@link #encode} where encodeNbsp and encodeNonLatin are true 
+     */
+    public static String encode (String string, boolean encodeNewline, boolean encodeSubsequentBlanksToNbsp)
+    {
+        return encode(string, encodeNewline, encodeSubsequentBlanksToNbsp, true);
+    }
+
+    /**
+     * Encodes the given string, so that it can be used within a html page.
+     * @param string the string to convert
+     * @param encodeNewline if true newline characters are converted to &lt;br&gt;'s
+     * @param encodeSubsequentBlanksToNbsp if true subsequent blanks are converted to &amp;nbsp;'s
+     * @param encodeNonLatin if true encode non-latin characters as numeric character references
+     */
+    public static String encode (String string,
+                                 boolean encodeNewline,
+                                 boolean encodeSubsequentBlanksToNbsp,
+                                 boolean encodeNonLatin)
+    {
+        if (string == null)
+        {
+            return "";
+        }
+
+        StringBuilder sb = null;    //create later on demand
+        String app;
+        char c;
+        for (int i = 0; i < string.length (); ++i)
+        {
+            app = null;
+            c = string.charAt(i);
+            
+            // All characters before letters
+            if ((int)c < 0x41)
+            {
+                switch (c)
+                {
+                    case '"': app = "&quot;"; break;    //"
+                    case '&': app = "&amp;"; break;     //&
+                    case '<': app = "&lt;"; break;      //<
+                    case '>': app = "&gt;"; break;      //>
+                    case ' ':
+                        if (encodeSubsequentBlanksToNbsp &&
+                                (i == 0 || (i - 1 >= 0 && string.charAt(i - 1) == ' ')))
+                        {
+                            //Space at beginning or after another space
+                            app = "&#160;";
+                        }
+                        break;
+                    case '\n':
+                        if (encodeNewline)
+                        {
+                            app = "<br/>";
+                        }
+                        break;
+                }
+            } else if (encodeNonLatin && (int)c > 0x80) {
+                 switch(c) {
+                    //german umlauts
+                    case '\u00E4' : app = "&auml;";  break;
+                    case '\u00C4' : app = "&Auml;";  break;
+                    case '\u00F6' : app = "&ouml;";  break;
+                    case '\u00D6' : app = "&Ouml;";  break;
+                    case '\u00FC' : app = "&uuml;";  break;
+                    case '\u00DC' : app = "&Uuml;";  break;
+                    case '\u00DF' : app = "&szlig;"; break;
+
+                    //misc
+                    //case 0x80: app = "&euro;"; break;  sometimes euro symbol is ascii 128, should we suport it?
+                    case '\u20AC': app = "&euro;";  break;
+                    case '\u00AB': app = "&laquo;"; break;
+                    case '\u00BB': app = "&raquo;"; break;
+                    case '\u00A0': app = "&#160;"; break;
+
+                    default :
+                        //encode all non basic latin characters
+                        app = "&#" + ((int)c) + ";";
+                    break;
+                }
+            }
+            if (app != null)
+            {
+                if (sb == null)
+                {
+                    sb = new StringBuilder(string.substring(0, i));
+                }
+                sb.append(app);
+            } else {
+                if (sb != null)
+                {
+                    sb.append(c);
+                }
+            }
+        }
+
+        if (sb == null)
+        {
+            return string;
+        }
+        else
+        {
+            return sb.toString();
+        }
+    }
+
+    /**
+     * Variant of {@link #encode} where encodeNewline is false and encodeNbsp is true.
+     */
+    public static void encode (char[] string, int offset, int length, Writer writer) throws IOException
+    {
+        encode(string, offset, length, false, true, writer);
+    }
+
+    /**
+     * Variant of {@link #encode} where encodeNbsp is true.
+     */
+    public static void encode (char[] string, int offset, int length, boolean encodeNewline, Writer writer) throws IOException
+    {
+        encode(string, offset, length, encodeNewline, true, writer);
+    }
+
+    /**
+     * Variant of {@link #encode} where encodeNbsp and encodeNonLatin are true 
+     */
+    public static void encode (char[] string, int offset, int length, boolean encodeNewline, boolean encodeSubsequentBlanksToNbsp, Writer writer) throws IOException
+    {
+        encode(string, offset, length, encodeNewline, encodeSubsequentBlanksToNbsp, true, writer);
+    }
+
+
+    /**
+     * Encodes the given string, so that it can be used within a html page.
+     * @param string the string to convert
+     * @param encodeNewline if true newline characters are converted to &lt;br&gt;'s
+     * @param encodeSubsequentBlanksToNbsp if true subsequent blanks are converted to &amp;nbsp;'s
+     * @param encodeNonLatin if true encode non-latin characters as numeric character references
+     */
+    public static void encode (char[] string, int offset, int length,
+                                 boolean encodeNewline,
+                                 boolean encodeSubsequentBlanksToNbsp,
+                                 boolean encodeNonLatin, Writer writer) throws IOException
+    {
+        if (string == null || length < 0 || offset >= string.length)
+        {
+            return;
+        }
+        offset = Math.max(0, offset);
+        int realLength = Math.min(length, string.length - offset);
+
+        StringBuilder sb = null;    //create later on demand
+        String app;
+        char c;
+        
+        for (int i = offset; i < offset + realLength; ++i)
+        {
+            app = null;
+            c = string[i];
+
+            // All characters before letters
+            if ((int)c < 0x41)
+            {
+                switch (c)
+                {
+                    case '"': app = "&quot;"; break;    //"
+                    case '&': app = "&amp;"; break;     //&
+                    case '<': app = "&lt;"; break;      //<
+                    case '>': app = "&gt;"; break;      //>
+                    case ' ':
+                        if (encodeSubsequentBlanksToNbsp &&
+                                (i == 0 || (i - 1 >= 0 && string[i - 1] == ' ')))
+                        {
+                            //Space at beginning or after another space
+                            app = "&#160;";
+                        }
+                        break;
+                    case '\n':
+                        if (encodeNewline)
+                        {
+                            app = "<br/>";
+                        }
+                        break;
+                }
+            } else if (encodeNonLatin && (int)c > 0x80) {
+                 switch(c) {
+                    //german umlauts
+                    case '\u00E4' : app = "&auml;";  break;
+                    case '\u00C4' : app = "&Auml;";  break;
+                    case '\u00F6' : app = "&ouml;";  break;
+                    case '\u00D6' : app = "&Ouml;";  break;
+                    case '\u00FC' : app = "&uuml;";  break;
+                    case '\u00DC' : app = "&Uuml;";  break;
+                    case '\u00DF' : app = "&szlig;"; break;
+
+                    //misc
+                    //case 0x80: app = "&euro;"; break;  sometimes euro symbol is ascii 128, should we suport it?
+                    case '\u20AC': app = "&euro;";  break;
+                    case '\u00AB': app = "&laquo;"; break;
+                    case '\u00BB': app = "&raquo;"; break;
+                    case '\u00A0': app = "&#160;"; break;
+
+                    default :
+                        //encode all non basic latin characters
+                        app = "&#" + ((int)c) + ";";
+                    break;
+                }
+            }
+            if (app != null)
+            {
+                if (sb == null)
+                {
+                    sb = new StringBuilder(realLength*2);
+                    sb.append(string, offset, i - offset);
+                }
+                sb.append(app);
+            } else {
+                if (sb != null)
+                {
+                    sb.append(c);
+                }
+            }
+        }
+
+        if (sb == null)
+        {
+            writer.write(string, offset, realLength);
+        }
+        else
+        {
+            writer.write(sb.toString());
+        }
+    }
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/JavascriptUtils.java Thu Jul  3 14:46:23 2008
@@ -196,7 +196,7 @@
         {
             return "";
         }
-        StringBuffer sb = null;	//create later on demand
+        StringBuffer sb = null;    //create later on demand
         String app;
         char c;
         for (int i = 0; i < string.length (); ++i)
@@ -284,7 +284,7 @@
 
     public static void setJavascriptDetected(HttpSession session, boolean value)
     {
-    	session.setAttribute(JAVASCRIPT_DETECTED, Boolean.valueOf(value));
+        session.setAttribute(JAVASCRIPT_DETECTED, Boolean.valueOf(value));
     }
     
     public static boolean isJavascriptDetected(ExternalContext externalContext)

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/util/UnicodeEncoder.java Thu Jul  3 14:46:23 2008
@@ -24,41 +24,41 @@
  */
 public abstract class UnicodeEncoder
 {
-	/**
-	 * Encodes the given string, so that it can be used within a html page.
-	 * @param string the string to convert
-	 */
-	public static String encode (String string)
-	{
-		if (string == null)
-		{
-			return "";
-		}
+    /**
+     * Encodes the given string, so that it can be used within a html page.
+     * @param string the string to convert
+     */
+    public static String encode (String string)
+    {
+        if (string == null)
+        {
+            return "";
+        }
 
-		StringBuilder sb = null;
-		char c;
-		for (int i = 0; i < string.length (); ++i)
-		{
-			c = string.charAt(i);
-			if (((int)c) >= 0x80)
-			{
-				if( sb == null ){
-					sb = new StringBuilder( string.length()+4 );
-					sb.append( string.substring(0,i) );
-				}
-				//encode all non basic latin characters
-				sb.append("&#");
-				sb.append((int)c);
-				sb.append(";");
-			}
-			else if( sb != null )
-			{
-				sb.append(c);
-			}
-		}
+        StringBuilder sb = null;
+        char c;
+        for (int i = 0; i < string.length (); ++i)
+        {
+            c = string.charAt(i);
+            if (((int)c) >= 0x80)
+            {
+                if( sb == null ){
+                    sb = new StringBuilder( string.length()+4 );
+                    sb.append( string.substring(0,i) );
+                }
+                //encode all non basic latin characters
+                sb.append("&#");
+                sb.append((int)c);
+                sb.append(";");
+            }
+            else if( sb != null )
+            {
+                sb.append(c);
+            }
+        }
 
-		return sb != null ? sb.toString() : string;
-	}
+        return sb != null ? sb.toString() : string;
+    }
 
 
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentBodyELTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentBodyELTagBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentBodyELTagBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentBodyELTagBase.java Thu Jul  3 14:46:23 2008
@@ -257,7 +257,7 @@
             String propName,
             ValueExpression value)
     {
-    	UIComponentELTagUtils.setValueBinding(getFacesContext(), component, propName, value);
+        UIComponentELTagUtils.setValueBinding(getFacesContext(), component, propName, value);
     }
 
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/UIComponentELTagUtils.java Thu Jul  3 14:46:23 2008
@@ -375,7 +375,7 @@
      */
     public static Object evaluateValueExpression(ELContext elContext, ValueExpression valueExpression )
     {
-    	return valueExpression.isLiteralText() ? valueExpression.getExpressionString() : valueExpression.getValue(elContext);
+        return valueExpression.isLiteralText() ? valueExpression.getExpressionString() : valueExpression.getValue(elContext);
     }
 
     /**
@@ -396,7 +396,7 @@
             return Integer.valueOf(valueExpression.getExpressionString());
         }
         
-       	return (Integer) valueExpression.getValue(elContext);
+           return (Integer) valueExpression.getValue(elContext);
     }
 
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/core/ConvertDateTimeTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/core/ConvertDateTimeTagBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/core/ConvertDateTimeTagBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/core/ConvertDateTimeTagBase.java Thu Jul  3 14:46:23 2008
@@ -114,7 +114,7 @@
         }
         else
         {
-            locale = LocaleUtils.converterTagLocaleFromString(	value);
+            locale = LocaleUtils.converterTagLocaleFromString(    value);
         }
         converter.setLocale(locale);
     }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/html/HtmlDataTableELTagBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/html/HtmlDataTableELTagBase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/html/HtmlDataTableELTagBase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/taglib/html/HtmlDataTableELTagBase.java Thu Jul  3 14:46:23 2008
@@ -118,7 +118,7 @@
         setIntegerProperty(component, JSFAttr.FIRST_ATTR, _first);
         
         if(_var != null)
-        	component.getAttributes().put(JSFAttr.VAR_ATTR, _var);
+            component.getAttributes().put(JSFAttr.VAR_ATTR, _var);
     }
 
     public void setAlign(ValueExpression align)

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/ExceptionUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/ExceptionUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/ExceptionUtils.java Thu Jul  3 14:46:23 2008
@@ -29,74 +29,74 @@
  */
 public final class ExceptionUtils
 {
-	private ExceptionUtils()
-	{
-	}
+    private ExceptionUtils()
+    {
+    }
 
-	/**
-	 * <p>
-	 * returns a list of all throwables (including the one you passed in) wrapped by the given throwable.
-	 * In contrast to a simple call to <code>getClause()</code> on each throwable it will also check if the throwable class
-	 * contain a method <code>getRootCause()</code> (e.g. ServletException or JspException) and call it instead.
-	 * </p>
-	 * <p>
-	 * The first list element will your passed in exception, the last list element is the cause. 
-	 * </p>
-	 */
-	public static List getExceptions(Throwable cause)
-	{
-		List exceptions = new ArrayList(10);
-		exceptions.add(cause);
-		
-		do
-		{
-			Throwable nextCause;
-			try
-			{
-				Method rootCause = cause.getClass().getMethod("getRootCause", new Class[]{});
-				nextCause = (Throwable) rootCause.invoke(cause, new Object[]{});
-			}
-			catch(Exception e)
-			{
-				nextCause = cause.getCause();
-			}
-			if (cause == nextCause)
-			{
-				break;
-			}
-			
-			if (nextCause != null)
-			{
-				exceptions.add(nextCause);
-			}
-			
-			cause = nextCause;
-		}
-		while (cause != null);
-		
-		return exceptions;
-	}
+    /**
+     * <p>
+     * returns a list of all throwables (including the one you passed in) wrapped by the given throwable.
+     * In contrast to a simple call to <code>getClause()</code> on each throwable it will also check if the throwable class
+     * contain a method <code>getRootCause()</code> (e.g. ServletException or JspException) and call it instead.
+     * </p>
+     * <p>
+     * The first list element will your passed in exception, the last list element is the cause. 
+     * </p>
+     */
+    public static List getExceptions(Throwable cause)
+    {
+        List exceptions = new ArrayList(10);
+        exceptions.add(cause);
+        
+        do
+        {
+            Throwable nextCause;
+            try
+            {
+                Method rootCause = cause.getClass().getMethod("getRootCause", new Class[]{});
+                nextCause = (Throwable) rootCause.invoke(cause, new Object[]{});
+            }
+            catch(Exception e)
+            {
+                nextCause = cause.getCause();
+            }
+            if (cause == nextCause)
+            {
+                break;
+            }
+            
+            if (nextCause != null)
+            {
+                exceptions.add(nextCause);
+            }
+            
+            cause = nextCause;
+        }
+        while (cause != null);
+        
+        return exceptions;
+    }
 
-	/**
-	 * Find a throwable message starting with the last element.<br />
-	 * Returns the first throwable message where <code>throwable.getMessage() != null</code> 
-	 */
-	public static String getExceptionMessage(List throwables)
-	{
-		if (throwables == null)
-		{
-			return null;
-		}
+    /**
+     * Find a throwable message starting with the last element.<br />
+     * Returns the first throwable message where <code>throwable.getMessage() != null</code> 
+     */
+    public static String getExceptionMessage(List throwables)
+    {
+        if (throwables == null)
+        {
+            return null;
+        }
 
-		for (int i = throwables.size()-1; i>0; i--)
-		{
-			Throwable t = (Throwable) throwables.get(i);
-			if (t.getMessage() != null)
-			{
-				return t.getMessage();
-			}
-		}
-		
-		return null;
-	}
+        for (int i = throwables.size()-1; i>0; i--)
+        {
+            Throwable t = (Throwable) throwables.get(i);
+            if (t.getMessage() != null)
+            {
+                return t.getMessage();
+            }
+        }
+        
+        return null;
+    }
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/MessageUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/MessageUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/MessageUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/MessageUtils.java Thu Jul  3 14:46:23 2008
@@ -49,12 +49,12 @@
 public final class MessageUtils
 {
     /** Utility class, do not instatiate */
-	private MessageUtils()
-	{
-		// nope
-	}
+    private MessageUtils()
+    {
+        // nope
+    }
 
-	/** Default bundle for messages (<code>javax.faces.Messages</code>) */
+    /** Default bundle for messages (<code>javax.faces.Messages</code>) */
     private static final String DEFAULT_BUNDLE = "javax.faces.Messages";
 
     /** Suffix for message details (<code>_detail</code>)*/
@@ -158,7 +158,7 @@
         StringBuffer b = new StringBuffer(100);
         if(locale != null)
         {
-            MessageFormat mf = new MessageFormat(msgtext,locale);        	
+            MessageFormat mf = new MessageFormat(msgtext,locale);            
             b.append(mf.format(params));
             localizedStr = b.toString();
         }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java Thu Jul  3 14:46:23 2008
@@ -102,18 +102,18 @@
     /** Utility class, do not instatiate */
     private StateUtils()
     {
-    	//nope
+        //nope
     }
 
     private static void testConfiguration(ExternalContext ctx){
 
-    	String algorithmParams = ctx.getInitParameter(INIT_ALGORITHM_PARAM);
-    	String iv = ctx.getInitParameter(INIT_ALGORITHM_IV);
-    	
+        String algorithmParams = ctx.getInitParameter(INIT_ALGORITHM_PARAM);
+        String iv = ctx.getInitParameter(INIT_ALGORITHM_IV);
+        
         if (algorithmParams != null && algorithmParams.startsWith("CBC") )
         {
-        	if(iv == null)
-        		throw new FacesException(INIT_ALGORITHM_PARAM +
+            if(iv == null)
+                throw new FacesException(INIT_ALGORITHM_PARAM +
                                     " parameter has been set with CBC mode," +
                                     " but no initialization vector has been set " +
                                     " with " + INIT_ALGORITHM_IV);
@@ -131,10 +131,10 @@
     
     public static boolean isSecure(ExternalContext ctx)
     {
-    	
-    	if(ctx == null)
-    		throw new NullPointerException("ExternalContext ctx");
-    	
+        
+        if(ctx == null)
+            throw new NullPointerException("ExternalContext ctx");
+        
         return ! "false".equals(ctx.getInitParameter(USE_ENCRYPTION));
     }
 
@@ -145,7 +145,7 @@
     public static final String construct(Object object, ExternalContext ctx){
         byte[] bytes = getAsByteArray(object, ctx);
         if( enableCompression(ctx) )
-            	bytes = compress(bytes);
+                bytes = compress(bytes);
         if(isSecure(ctx))
                 bytes = encrypt(bytes, ctx);
         bytes = encode(bytes);
@@ -170,7 +170,7 @@
     
     public static final byte[] getAsByteArray(Object object, ExternalContext ctx)
     {
-    	ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
         
         // get the Factory that was instantiated @ startup
         SerialFactory serialFactory = (SerialFactory) ctx.getApplicationMap().get(SERIAL_FACTORY);
@@ -197,7 +197,7 @@
 
     public static byte[] encrypt(byte[] insecure, ExternalContext ctx)
     {
-    	return symmetric(insecure, ctx, Cipher.ENCRYPT_MODE);
+        return symmetric(insecure, ctx, Cipher.ENCRYPT_MODE);
     }
 
     public static final byte[] compress(byte[] bytes)
@@ -223,7 +223,7 @@
 
     public static final byte[] encode(byte[] bytes)
     {
-    	  return new Base64().encode(bytes);
+          return new Base64().encode(bytes);
     }
 
     /**
@@ -231,7 +231,7 @@
      */
 
     public static final Object reconstruct(String string, ExternalContext ctx){
-    	byte[] bytes;
+        byte[] bytes;
         try
         {
             bytes = string.getBytes(ZIP_CHARSET);
@@ -250,17 +250,17 @@
 
     public static final byte[] decode(byte[] bytes)
     {
-    	  return new Base64().decode(bytes);
+          return new Base64().decode(bytes);
     }
 
     public static final byte[] decompress(byte[] bytes)
     {
-    	if(bytes == null)
-    		throw new NullPointerException("byte[] bytes");
-    	
-    	ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
-    	ByteArrayOutputStream baos = new ByteArrayOutputStream();
-    	byte[] buffer = new byte[bytes.length];
+        if(bytes == null)
+            throw new NullPointerException("byte[] bytes");
+        
+        ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        byte[] buffer = new byte[bytes.length];
         int length;
 
         try
@@ -288,7 +288,7 @@
     
     public static byte[] decrypt(byte[] secure, ExternalContext ctx)
     {
-    	return symmetric(secure, ctx, Cipher.DECRYPT_MODE); 
+        return symmetric(secure, ctx, Cipher.DECRYPT_MODE); 
     }
 
     /**
@@ -302,7 +302,7 @@
     
     public static final Object getAsObject(byte[] bytes, ExternalContext ctx)
     {
-    	ByteArrayInputStream input = new ByteArrayInputStream(bytes);
+        ByteArrayInputStream input = new ByteArrayInputStream(bytes);
 
         // get the Factory that was instantiated @ startup
         SerialFactory serialFactory = (SerialFactory) ctx.getApplicationMap().get(SERIAL_FACTORY);
@@ -310,7 +310,7 @@
         if(serialFactory == null)
             throw new NullPointerException("serialFactory");
         
-    	try
+        try
         {
             ObjectInputStream s = serialFactory.getObjectInputStream(input); 
             Object object = s.readObject();
@@ -336,7 +336,7 @@
     public static void main (String[] args) throws UnsupportedEncodingException
     {
         byte[] bytes = encode(args[0].getBytes(ZIP_CHARSET));
-      	System.out.println(new String(bytes, ZIP_CHARSET));
+          System.out.println(new String(bytes, ZIP_CHARSET));
     }
     
     private static byte[] symmetric(byte[] data, SecretKey secretKey,
@@ -412,21 +412,21 @@
             
     }
 
-	private static byte[] findInitializationVector(ExternalContext ctx) {
-		
-		byte[] iv = null;
+    private static byte[] findInitializationVector(ExternalContext ctx) {
+        
+        byte[] iv = null;
         String _iv = ctx.getInitParameter(INIT_ALGORITHM_IV);
         
         if (_iv != null)
             iv = new Base64().decode(_iv.getBytes());
         
-		return iv;
-	}
+        return iv;
+    }
 
-	private static String findAlgorithmParams(ExternalContext ctx) {
-		
-		String algorithmParams = ctx.getInitParameter(INIT_ALGORITHM_PARAM);
-		
+    private static String findAlgorithmParams(ExternalContext ctx) {
+        
+        String algorithmParams = ctx.getInitParameter(INIT_ALGORITHM_PARAM);
+        
         if (algorithmParams == null)
         {
             algorithmParams = DEFAULT_ALGORITHM_PARAMS;
@@ -437,23 +437,23 @@
             log.debug("Using algorithm paramaters " + algorithmParams);
         }
         
-		return algorithmParams;
-	}
+        return algorithmParams;
+    }
 
-	private static String findAlgorithm(ExternalContext ctx) {
-		
-		return findAlgorithm( ctx.getInitParameter(INIT_ALGORITHM) );
-
-	}
-	
-	private static String findAlgorithm(ServletContext ctx) {
-		
-		return findAlgorithm( ctx.getInitParameter(INIT_ALGORITHM) );
-		
-	}
-	
-	private static String findAlgorithm(String initParam) {
-		
+    private static String findAlgorithm(ExternalContext ctx) {
+        
+        return findAlgorithm( ctx.getInitParameter(INIT_ALGORITHM) );
+
+    }
+    
+    private static String findAlgorithm(ServletContext ctx) {
+        
+        return findAlgorithm( ctx.getInitParameter(INIT_ALGORITHM) );
+        
+    }
+    
+    private static String findAlgorithm(String initParam) {
+        
         if (initParam == null)
         {
             initParam = DEFAULT_ALGORITHM;
@@ -464,9 +464,9 @@
             log.debug("Using algorithm " + initParam);
         }
         
-		return initParam;
-		
-	}
+        return initParam;
+        
+    }
 
     /**
      * Does nothing if the user has disabled the SecretKey cache. This is
@@ -491,25 +491,25 @@
         
     }
 
-	private static byte[] findSecret(ServletContext ctx) {
-		String _secret = ctx.getInitParameter(INIT_SECRET);
+    private static byte[] findSecret(ServletContext ctx) {
+        String _secret = ctx.getInitParameter(INIT_SECRET);
         byte[] bytes = null;
-		
+        
         if(_secret == null)
         {
-        	int length = 8;
-        	bytes = new byte[length];
-        	new Random().nextBytes(bytes);
-        	
-        	if(log.isDebugEnabled())
-        		log.debug("generated random password of length " + length);
+            int length = 8;
+            bytes = new byte[length];
+            new Random().nextBytes(bytes);
+            
+            if(log.isDebugEnabled())
+                log.debug("generated random password of length " + length);
         }
         else 
         {
-        	bytes = new Base64().decode(_secret.getBytes());
+            bytes = new Base64().decode(_secret.getBytes());
         }
         
         return bytes;
-	}
+    }
 
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StringUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StringUtils.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StringUtils.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/StringUtils.java Thu Jul  3 14:46:23 2008
@@ -417,7 +417,7 @@
      */
     public static String[] splitLongString(String str, char separator)
     {
-    	int len;
+        int len;
         if (str == null || (len = str.length()) == 0)
         {
             return ArrayUtils.EMPTY_STRING_ARRAY;
@@ -453,7 +453,7 @@
     public static String[] splitLongString(
         String str, char separator, char quote)
     {
-    	int len;
+        int len;
         if (str == null || (len = str.length()) == 0)
         {
             return ArrayUtils.EMPTY_STRING_ARRAY;
@@ -518,7 +518,7 @@
      */
     public static String[] splitShortString(String str, char separator)
     {
-    	int len;
+        int len;
         if (str == null || (len = str.length()) == 0)
         {
             return org.apache.myfaces.shared.util.ArrayUtils.EMPTY_STRING_ARRAY;
@@ -569,7 +569,7 @@
     public static String[] splitShortString(
         String str, char separator, char quote)
     {
-    	int len;
+        int len;
         if (str == null || (len = str.length()) == 0)
         {
             return ArrayUtils.EMPTY_STRING_ARRAY;

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/util/el/ActionsMap.java Thu Jul  3 14:46:23 2008
@@ -29,14 +29,14 @@
  * Example : in JSF pages, for dataTable, to remove elements :
  * Backing bean (#{inboxFace}).
  * public ActionsMap getRemoveEmailUnid(){
- * 		return new ActionsMap(){
- *			public void performAction(String unid) {
- *				InboxMailDAO<TInboxMail> dao = getInboxMailDAO();
- *				TInboxMail email = dao.getByPrimaryKey( unid );
- *				dao.remove( email );
- *			}
- *		};
- *	}
+ *         return new ActionsMap(){
+ *            public void performAction(String unid) {
+ *                InboxMailDAO<TInboxMail> dao = getInboxMailDAO();
+ *                TInboxMail email = dao.getByPrimaryKey( unid );
+ *                dao.remove( email );
+ *            }
+ *        };
+ *    }
  * JSF page :
  * &lt;h:selectBooleanCheckbox value="#{inboxFace.removeEmailUnid[email.unid]}"/&gt;
  */

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXml.java Thu Jul  3 14:46:23 2008
@@ -162,12 +162,12 @@
             String filterName = (String)entry.getKey();
             String filterClassName = (String)entry.getValue();
             
-    		if (!"org.apache.myfaces.component.html.util.ExtensionsFilter".equals(filterClassName) &&
-    			!"org.apache.myfaces.webapp.filter.ExtensionsFilter".equals(filterClassName))
-    		{
-    			// not an extensions filter
-    			continue;
-    		}
+            if (!"org.apache.myfaces.component.html.util.ExtensionsFilter".equals(filterClassName) &&
+                !"org.apache.myfaces.webapp.filter.ExtensionsFilter".equals(filterClassName))
+            {
+                // not an extensions filter
+                continue;
+            }
             
             Class filterClass = org.apache.myfaces.shared.util.ClassUtils.simpleClassForName(filterClassName);
             List urlPatterns = (List)_filterMappings.get(filterName);
@@ -177,7 +177,7 @@
                 {
                     String urlpattern = (String)it2.next();
                     _facesExtensionsFilterMappings.add(new org.apache.myfaces.shared.webapp.webxml.FilterMapping(
-                    	filterName, filterClass, urlpattern));
+                        filterName, filterClass, urlpattern));
                     if (log.isTraceEnabled())
                         log.trace("adding mapping for filter + " + filterName + " urlpattern = " + urlpattern);
                 }

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/webapp/webxml/WebXmlParser.java Thu Jul  3 14:46:23 2008
@@ -350,7 +350,7 @@
                 }
                 else if (n.getNodeName().equals("servlet-name"))
                 {
-                	// we are not interested in servlet-name based mapping - for now
+                    // we are not interested in servlet-name based mapping - for now
                 }
                 else
                 {

Modified: myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/AbstractStateUtilsTest.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/AbstractStateUtilsTest.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/AbstractStateUtilsTest.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/AbstractStateUtilsTest.java Thu Jul  3 14:46:23 2008
@@ -31,10 +31,10 @@
 public abstract class AbstractStateUtilsTest extends AbstractJsfTestCase implements Serializable
 {
     public AbstractStateUtilsTest(String name) {
-		super(name);
-	}
+        super(name);
+    }
 
-	//private static final Log log = LogFactory.getLog(StateUtilsAbstractCase.class);
+    //private static final Log log = LogFactory.getLog(StateUtilsAbstractCase.class);
     protected String sensitiveString;
     private static final String TEST_DATA = "This is the test data.";
     // 76543210
@@ -47,14 +47,14 @@
 
     public void setUp() throws Exception
     {
-    	super.setUp();
+        super.setUp();
         sensitiveString = "this is my secret";
         externalContext.getApplicationMap().put(StateUtils.SERIAL_FACTORY, new DefaultSerialFactory());
     }
 
     public void tearDown() throws Exception
     {
-    	super.tearDown();
+        super.tearDown();
         sensitiveString = null;
     }
 

Modified: myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/InitVector_CBCTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/InitVector_CBCTestCase.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/InitVector_CBCTestCase.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/InitVector_CBCTestCase.java Thu Jul  3 14:46:23 2008
@@ -28,59 +28,59 @@
 
 public class InitVector_CBCTestCase extends AbstractJsfTestCase {
 
-	public InitVector_CBCTestCase(String name) {
-		super(name);
-	}
-	
+    public InitVector_CBCTestCase(String name) {
+        super(name);
+    }
+    
     public static Test suite() {
         return null; // keep this method or maven won't run it
-    }	
+    }    
 
-	public void setUp() throws Exception{
-	
-		super.setUp();
-		
-		servletContext.addInitParameter(StateUtils.INIT_SECRET, "shouldn't matter");
+    public void setUp() throws Exception{
+    
+        super.setUp();
+        
+        servletContext.addInitParameter(StateUtils.INIT_SECRET, "shouldn't matter");
         servletContext.addInitParameter(StateUtils.INIT_ALGORITHM, "shouldn't matter either");
         servletContext.addInitParameter(StateUtils.INIT_ALGORITHM_PARAM, "CBC/PKCS5Padding");
         servletContext.addInitParameter(StateUtils.INIT_SECRET_KEY_CACHE, "false");
         // DO NOT UNCOMMENT THIS ! we are simulating a bad conf
-        //servletContext.addInitParameter(org.apache.myfaces.shared.util.StateUtils.INIT_ALGORITHM_IV, BASE64_KEY_SIZE_16);		
-		
-	}
+        //servletContext.addInitParameter(org.apache.myfaces.shared.util.StateUtils.INIT_ALGORITHM_IV, BASE64_KEY_SIZE_16);        
+        
+    }
 
-	public void testDecryption() {
-		
-	    byte[] sensitiveBytes = "bound to fail".getBytes();
-	    
-	    try{
-	    	
-	    	StateUtils.decrypt(sensitiveBytes, externalContext);
-	    	
-	    	fail("MyFaces should throw a meaningful " +
-		    		"exception when users opt for CBC mode " +
-		    		"encryption w/out an initialization vector.");
-	    	
-	    }catch(FacesException fe){
-	    }
-		
-	}
-	
-	public void testEncryption() {
-		
-	    byte[] sensitiveBytes = "bound to fail".getBytes();
-	    
-	    try{
-	    	
-	    	StateUtils.encrypt(sensitiveBytes, externalContext);
-	    	
-	    	fail("MyFaces should throw a meaningful " +
-		    		"exception when users opt for CBC mode " +
-		    		"encryption w/out an initialization vector.");
-	    	
-	    }catch(FacesException fe){
-	    }
-	    
-	}
-	
+    public void testDecryption() {
+        
+        byte[] sensitiveBytes = "bound to fail".getBytes();
+        
+        try{
+            
+            StateUtils.decrypt(sensitiveBytes, externalContext);
+            
+            fail("MyFaces should throw a meaningful " +
+                    "exception when users opt for CBC mode " +
+                    "encryption w/out an initialization vector.");
+            
+        }catch(FacesException fe){
+        }
+        
+    }
+    
+    public void testEncryption() {
+        
+        byte[] sensitiveBytes = "bound to fail".getBytes();
+        
+        try{
+            
+            StateUtils.encrypt(sensitiveBytes, externalContext);
+            
+            fail("MyFaces should throw a meaningful " +
+                    "exception when users opt for CBC mode " +
+                    "encryption w/out an initialization vector.");
+            
+        }catch(FacesException fe){
+        }
+        
+    }
+    
 }

Modified: myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/MessageUtilsTest.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/MessageUtilsTest.java?rev=673827&r1=673826&r2=673827&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/MessageUtilsTest.java (original)
+++ myfaces/shared/trunk_3.0.x/core/src/test/java/org/apache/myfaces/shared/util/MessageUtilsTest.java Thu Jul  3 14:46:23 2008
@@ -195,19 +195,19 @@
      * testSubstituteParamsWithDELocale(
      */
     public void testSubstituteParamsWithDELocale() {
-    	String paramString = MessageUtils.substituteParams(Locale.GERMANY, "currency {0,number,currency}", new Object[]{100});
+        String paramString = MessageUtils.substituteParams(Locale.GERMANY, "currency {0,number,currency}", new Object[]{100});
 
-    	assertEquals("currency 100,00 \u20ac",paramString);
+        assertEquals("currency 100,00 \u20ac",paramString);
     }
 
     /**
      * testSubstituteParamsWithGBLocale(
      */
     public void testSubstituteParamsWithGBLocale() {
-    	String paramString = MessageUtils.substituteParams(Locale.UK, "currency {0,number,currency}", new Object[]{100});
+        String paramString = MessageUtils.substituteParams(Locale.UK, "currency {0,number,currency}", new Object[]{100});
 
-    	System.out.println(paramString);
-    	assertEquals("currency \u00a3100.00",paramString);
+        System.out.println(paramString);
+        assertEquals("currency \u00a3100.00",paramString);
     }
 
 }