title: Consultation List cast an object in Primefaces?
body: <p>I have a datatable with primefaces, loaded about three records, it happens that I have in a column one inputText, it happens that the button is outside the datable record, and click the button I want to record, capture me inputText values​​, and to update records each dataTable.</p>
  
  <pre class="lang-html prettyprint-override"><code>    &lt;p:dataTable id="dataTable" var="confParamGen" value="#{regRolMB.paramLdap}"
          rowIndexVar="rowIndex"&gt; 
          &lt;p:column&gt;
              &lt;f:facet name="header" &gt;
                  &lt;h:outputText value="N°" /&gt;
              &lt;/f:facet&gt;
              &lt;h:outputText value="#{rowIndex+1}" /&gt;
          &lt;/p:column&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
                  &lt;h:outputText value="Number Long" /&gt;
              &lt;/f:facet&gt;
              &lt;h:outputText value="#{confParamGen.numberCort}" /&gt;
          &lt;/p:column&gt; 
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;
                  &lt;h:outputText value="Value Role" /&gt;
              &lt;/f:facet&gt;
              &lt;p:inputText value="#{confParamGen.valuesRole}" style="width: 200px;" /&gt;
          &lt;/p:column&gt; 
  &lt;/p:dataTable&gt;
  
  &lt;p:commandButton value="Save" rendered="#{regRolMB.showButtonUpdate}"
  actionListener="#{regRolMB.actualizarRol}" styleClass="positionButton"&gt; 
      &lt;f:attribute name="confParamGen" value="#{confParamGen}" /&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>In the controller I have it so, but it falls to cast the Arraylist.</p>
  
  <pre><code>public void updateRol(ActionEvent event) {
      List&lt;DateGeneral&gt; rolConPar = new ArrayList&lt;DateGeneral&gt;();
      rolConPar = ((ArrayList&lt;DateGeneral&gt;) event.getComponent().getAttributes().get("confParamGen"));
      for(DateGeneral dato: rolConPar){
          System.out.println("===&gt; "+dato.getValuesRole());
      }
  }   
  </code></pre>
  
  <p>I get this error, although the problem is not the modified data capture of inputText, only captures the data loaded from DataTable</p>
  
  <pre><code>java.lang.ClassCastException: com.bbva.sca.adm.bean.DatoGeneral cannot be cast to java.util.ArrayList
  </code></pre>