myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject svn commit: r608435 - in /myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html: HtmlFormRendererBase.java HtmlLinkRendererBase.java
Date Thu, 03 Jan 2008 10:49:05 GMT
Author: imario
Date: Thu Jan  3 02:49:04 2008
New Revision: 608435

URL: http://svn.apache.org/viewvc?rev=608435&view=rev
Log:
MYFACES-1753: removed writing of unused jsf_sequence hidden field/parameter

Modified:
    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

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=608435&r1=608434&r2=608435&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 Jan  3 02:49:04 2008
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -60,7 +60,7 @@
 
         ResponseWriter writer = facesContext.getResponseWriter();
         String clientId = htmlForm.getClientId(facesContext);
-        String acceptCharset = getAcceptCharset(htmlForm); 
+        String acceptCharset = getAcceptCharset(htmlForm);
         String actionURL = getActionUrl(facesContext);
 
         writer.startElement(HTML.FORM_ELEM, htmlForm);
@@ -135,7 +135,8 @@
 
         renderScrollHiddenInputIfNecessary(component, facesContext, writer);
 
-        if(!facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext))
+		/* this one is encoded into the ViewState hidden field now
+		if(!facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext))
         {
             writer.startElement(HTML.INPUT_ELEM, component);
             writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_HIDDEN, null);
@@ -143,6 +144,7 @@
             writer.writeAttribute(org.apache.myfaces.shared.renderkit.html.HTML.VALUE_ATTR,
org.apache.myfaces.shared.renderkit.RendererUtils.getViewSequence(facesContext), null);
             writer.endElement(HTML.INPUT_ELEM);
         }
+        */
 
         //write state marker at the end of the form
         //Todo: this breaks client-side enabled AJAX components again which are searching
for the state
@@ -232,7 +234,7 @@
         }
         return (String)uiComponent.getAttributes().get(JSFAttr.ACCEPTCHARSET_ATTR);
     }
-    
+
     /**
      * Called before the state and any elements are added to the form tag in the
      * encodeBegin method

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=608435&r1=608434&r2=608435&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 Jan  3 02:49:04 2008
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,7 +25,6 @@
 import org.apache.myfaces.shared.util._ComponentUtils;
 import org.apache.myfaces.shared.config.MyfacesConfig;
 
-import javax.faces.application.StateManager;
 import javax.faces.application.ViewHandler;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
@@ -47,8 +46,10 @@
 public abstract class HtmlLinkRendererBase
     extends HtmlRenderer
 {
+	/* 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();
+    */
 
     //private static final Log log = LogFactory.getLog(HtmlLinkRenderer.class);
 
@@ -121,7 +122,7 @@
         }
 
         return (String)link.getAttributes().get(HTML.STYLE_ATTR);
-        
+
     }
 
     /**
@@ -135,7 +136,7 @@
         }
 
         return (String)link.getAttributes().get(HTML.STYLE_CLASS_ATTR);
-        
+
     }
 
     public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException
@@ -345,7 +346,7 @@
     {
     	return _ComponentUtils.findNestingForm(uiComponent, facesContext);
     }
-    
+
 	protected void addHiddenCommandParameter(FacesContext facesContext, UIComponent nestingForm,
String hiddenFieldName)
 	{
 		if (nestingForm != null)
@@ -396,7 +397,8 @@
                                      writer.getCharacterEncoding());
         }
 
-        StateManager stateManager = facesContext.getApplication().getStateManager();
+		/* this one is never used
+		StateManager stateManager = facesContext.getApplication().getStateManager();
         if (strictXhtmlLinks) {
             hrefBuf.append("&");
         } else {
@@ -406,12 +408,15 @@
         {
             hrefBuf.append(URL_STATE_MARKER);
         }
+        */
+		/* this one is encoded into the ViewState hidden field now
         else
         {
             hrefBuf.append(RendererUtils.SEQUENCE_PARAM);
             hrefBuf.append('=');
             hrefBuf.append(org.apache.myfaces.shared.renderkit.RendererUtils.getViewSequence(facesContext));
         }
+        */
         String href = facesContext.getExternalContext().encodeActionURL(hrefBuf.toString());
         writer.startElement(HTML.ANCHOR_ELEM, component);
         writer.writeURIAttribute(HTML.HREF_ATTR,



Mime
View raw message