myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1520364 - /myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Date Thu, 05 Sep 2013 16:23:17 GMT
Author: lu4242
Date: Thu Sep  5 16:23:16 2013
New Revision: 1520364

URL: http://svn.apache.org/r1520364
Log:
MYFACES-3771 - h:commandButton renderer now can have children 

Modified:
    myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java

Modified: myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java?rev=1520364&r1=1520363&r2=1520364&view=diff
==============================================================================
--- myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
(original)
+++ myfaces/core/trunk/shared/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Thu Sep  5 16:23:16 2013
@@ -111,8 +111,8 @@ public class HtmlButtonRendererBase
             || HtmlRendererUtils.isPartialOrBehaviorSubmit(facesContext, clientId);
     }
 
-    public void encodeEnd(FacesContext facesContext, UIComponent uiComponent)
-            throws IOException
+    @Override
+    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException
     {
         org.apache.myfaces.shared.renderkit.RendererUtils.checkParamValidity(
                 facesContext, uiComponent, UICommand.class);
@@ -299,9 +299,16 @@ public class HtmlButtonRendererBase
             writer.writeAttribute(HTML.READONLY_ATTR, Boolean.TRUE, 
                     org.apache.myfaces.shared.renderkit.JSFAttr.READONLY_ATTR);
         }
+    }
+    
+    public void encodeEnd(FacesContext facesContext, UIComponent uiComponent)
+            throws IOException
+    {
+        ResponseWriter writer = facesContext.getResponseWriter();
 
         writer.endElement(HTML.INPUT_ELEM);
         
+        FormInfo formInfo = findNestingForm(uiComponent, facesContext);
         if (formInfo != null)
         {
             HtmlFormRendererBase.renderScrollHiddenInputIfNecessary(



Mime
View raw message