title: Cannot get JSF dataTable to submit just 1 row
body: <p>I am trying to update values in an <code>h:dataTable</code> and have reached my limit in request parameters allowed in a single POST.  After firebugging it I see that the whole table is being sent for an update on a single row.  I tried moving the <code>h:form</code> to surround just the <code>a4j:commandButton</code> but this does not update the property value.  I thought of using <code>f:ajax</code>, but everything I've seen mentioned there talks about changes in <code>ManagedBean</code>s.  The problem with that is that the backing class is used in standard Java applications also so I want to keep it as a nice clean POJO and not add dependencies on Java EE specific libraries.  </p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>As requested by @Luiggi Mendoza I have broken down the problem into an <a href="http://sscce.org/" rel="nofollow">SSCCE</a> with two Java classes and a single xhtml:</p>
  
  <p>testDT.xhtml:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; 
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:a4j="http://richfaces.org/a4j"
        xmlns:rich="http://richfaces.org/rich"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"&gt; 
  
  &lt;h:head&gt;&lt;/h:head&gt; 
  &lt;body&gt;
      &lt;rich:panel id="props"&gt;
  
        &lt;h:form&gt;
        &lt;h:dataTable value="#{propertyEditor.properties}" var="prop"&gt;
          &lt;h:column&gt;
            &lt;f:facet name="header"&gt;
              &lt;h:outputText value="Value"/&gt;
            &lt;/f:facet&gt;
            &lt;h:inputText value="#{prop.value}"&gt;
              &lt;f:ajax/&gt;
            &lt;/h:inputText&gt;
          &lt;/h:column&gt;
          &lt;h:column&gt;
            &lt;a4j:commandButton
                value="Update Property"
                action="#{propertyEditor.updateProperty(prop.id)}"
                render="props"
                execute="@this"/&gt;
          &lt;/h:column&gt;
        &lt;/h:dataTable&gt;
      &lt;/h:form&gt;
      &lt;/rich:panel&gt;
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>PropertyEditor.java</p>
  
  <pre><code>package com.test;
  
  import java.io.Serializable;
  import java.util.ArrayList;
  
  import javax.annotation.PostConstruct;
  import javax.enterprise.context.SessionScoped;
  import javax.inject.Named;
  
  @Named
  @SessionScoped
  public class PropertyEditor implements Serializable
  {
  
    private ArrayList&lt;Property&gt; properties = new ArrayList&lt;Property&gt;();
  
    public PropertyEditor() {}
  
    @PostConstruct
    private void initProperties() {
      for (int i = 0; i &lt; 510; i++) {
        Property p = new Property(i,"key"+i,"value"+i);
        properties.add(p);
      }
    }
  
    public ArrayList&lt;Property&gt; getProperties() {
      return properties;
    }
  
    public void updateProperty(int id) {
      System.out.println("we are updating: " + id);
    }
  
  }
  </code></pre>
  
  <p>Property.java</p>
  
  <pre><code>package com.test;
  
  public class Property
  {
    private int id;
    private String key;
    private String value;
    public Property(int id, String key, String value)
    {
      super();
      this.id = id;
      this.key = key;
      this.value = value;
    }
    public int getId()
    {
      return id;
    }
    public void setId(int id)
    {
      this.id = id;
    }
    public String getKey()
    {
      return key;
    }
    public void setKey(String key)
    {
      this.key = key;
    }
    public String getValue()
    {
      return value;
    }
    public void setValue(String value)
    {
      this.value = value;
    }
  
  }
  </code></pre>
  
  <p>Also, here are my config files (beans.xml, faces-config.xml, and web.xml):</p>
  
  <p>beans.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:plidm="urn:java:org.jboss.seam.security.management.picketlink"
         xmlns:security="urn:java:org.jboss.seam.security"
         xmlns:s="urn:java:ee"
         xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://jboss.org/schema/cdi/beans_1_0.xsd"&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>faces-config.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;faces-config
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
      version="2.0"&gt;
  
  &lt;/faces-config&gt;
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
    &lt;display-name&gt;DataTableSubmit1&lt;/display-name&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
  
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I also have the following jars in my <code>WEB-INF/lib</code> directory:</p>
  
  <pre><code>common-annotations.jar
  commons-beanutils.jar
  commons-collections.jar
  commons-digester.jar
  commons-logging.jar
  cssparser-0.9.5.jar
  guava.jar
  jsf-api-2.0.4-b09.jar
  jsf-impl-2.0.4-b09.jar
  jstl.jar
  richfaces-components-api-4.2.0.Final.jar
  richfaces-components-ui-4.2.0.Final.jar
  richfaces-core-api-4.2.0.Final.jar
  richfaces-core-impl-4.2.0.Final.jar
  sac-1.3.jar
  standard.jar
  </code></pre>
  
  <p>I am running on JBoss 7.1.1.Final using Java 1.6.  This still submits the whole table every time I try to update 1 row.  I know I could increase the number of allowed request parameters but that seems like a total hack.  The response message I get when looking at it in firebug is:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;partial-response&gt;&lt;error&gt;&lt;error-name&gt;class java.lang.IllegalStateException&lt;/error-name&gt;&lt;error-message&gt;&lt;![CDATA[More than the maximum number of request parameters (GET plus POST) for a single request ([512]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.]]&gt;&lt;/error-message&gt;&lt;/error&gt;&lt;/partial-response&gt;
  </code></pre>
  
  <p>Thanks</p>