You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2016/09/08 15:26:56 UTC
svn commit: r1759848 -
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java
Author: lofwyr
Date: Thu Sep 8 15:26:56 2016
New Revision: 1759848
URL: http://svn.apache.org/viewvc?rev=1759848&view=rev
Log:
TOBAGO-1524: Use standard AJAX mechanism
* A tc:form component can now be used for execute and render
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java?rev=1759848&r1=1759847&r2=1759848&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FormRenderer.java Thu Sep 8 15:26:56 2016
@@ -19,7 +19,33 @@
package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
+import org.apache.myfaces.tobago.internal.component.AbstractUIForm;
import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
+import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
+import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import java.io.IOException;
public class FormRenderer extends RendererBase {
+
+ @Override
+ public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final AbstractUIForm form = (AbstractUIForm) component;
+ final TobagoResponseWriter writer = getResponseWriter(facesContext);
+ final String clientId = form.getClientId(facesContext);
+
+ writer.startElement(HtmlElements.DIV);
+ writer.writeIdAttribute(clientId);
+ writer.writeClassAttribute(TobagoClass.FORM);;
+ }
+
+ @Override
+ public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
+ final TobagoResponseWriter writer = getResponseWriter(facesContext);
+ writer.endElement(HtmlElements.DIV);
+ }
+
}