myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r376993 - in /myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html: HtmlFormRendererBase.java HtmlRenderer.java
Date Sat, 11 Feb 2006 15:35:01 GMT
Author: matzew
Date: Sat Feb 11 07:34:59 2006
New Revision: 376993

URL: http://svn.apache.org/viewcvs?rev=376993&view=rev
Log:
some refactoring (moving getActionUrl() into HtmlRenderer)

Modified:
    myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormRendererBase.java
    myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java

Modified: myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormRendererBase.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormRendererBase.java?rev=376993&r1=376992&r2=376993&view=diff
==============================================================================
--- myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormRendererBase.java
(original)
+++ myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormRendererBase.java
Sat Feb 11 07:34:59 2006
@@ -57,7 +57,7 @@
 
         ResponseWriter writer = facesContext.getResponseWriter();
         String clientId = htmlForm.getClientId(facesContext);
-        String actionURL = getActionUrl(facesContext, htmlForm);
+        String actionURL = getActionUrl(facesContext);
 
         writer.startElement(HTML.FORM_ELEM, htmlForm);
         writer.writeAttribute(HTML.ID_ATTR, clientId, null);
@@ -70,19 +70,6 @@
         HtmlRendererUtils.renderHTMLAttributes(writer, htmlForm, HTML.FORM_PASSTHROUGH_ATTRIBUTES);
 
         writer.write(""); // force start element tag to be closed
-    }
-
-
-    /**
-     * @param facesContext
-     * @param form
-     * @return String A String representing the action URL
-     */
-    protected String getActionUrl(FacesContext facesContext, UIForm form)
-    {
-        ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
-        String viewId = facesContext.getViewRoot().getViewId();
-        return viewHandler.getActionURL(facesContext, viewId);
     }
 
 

Modified: myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java?rev=376993&r1=376992&r2=376993&view=diff
==============================================================================
--- myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java
(original)
+++ myfaces/commons/trunk/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderer.java
Sat Feb 11 07:34:59 2006
@@ -17,7 +17,9 @@
 
 import java.util.List;
 
+import javax.faces.application.ViewHandler;
 import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
 import javax.faces.render.Renderer;
 
 import org.apache.commons.logging.Log;
@@ -61,4 +63,15 @@
     {
         return component.getChildCount();
     }
-}
+    
+    /**
+     * @param facesContext
+     * @return String A String representing the action URL
+     */
+    protected String getActionUrl(FacesContext facesContext)
+    {
+        ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
+        String viewId = facesContext.getViewRoot().getViewId();
+        return viewHandler.getActionURL(facesContext, viewId);
+    }
+}
\ No newline at end of file



Mime
View raw message