0 Replies Latest reply on Sep 1, 2008 6:46 AM by Sascha Janz

    rich:datatable setvalue not called on submit

    Sascha Janz Master

      i got an edittable data table.

      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
       <h:commandButton value="Test"></h:commandButton>
       <rich:dataTable value="#{TreeBean.texte}" var="text" id="test"
       cellpadding="0" cellspacing="0" rows="4"
       columnsWidth="100%" width="100%" border="0"
       <f:facet name="header">
       <rich:column colspan="1">
       <h:outputText value="Text" styleClass="toolbartext" />
      <rich:column colspan="1">
       <h:inputText value="#{text}" styleClass="outputtext_read}" />
      <h:inputText value="#{TreeBean.testtext}"></h:inputText>

      the corresponding java code is

       String testtext="";
       public String getTesttext() {
       return testtext;
       public void setTesttext(String testtext) {
       if (cat.isDebugEnabled())
       cat.debug("Set text =" + testtext);
       this.testtext = testtext;
       List<String> texte = new ArrayList();
       public List getTexte() {
       if ( texte.size() == 0) {
       texte.add(new String("1"));
       texte.add(new String("2"));
       return texte;
       public void setTexte(List texte) {
       if (cat.isDebugEnabled())
       cat.debug("set texte");
       for (int i = 0; i < texte.size(); i++) {
       if (cat.isDebugEnabled())
       cat.debug( "Wert:" + (String)texte.get(i));
       this.texte = texte;

      the method settext is called on submit.

      but the method settexte is not called.

      can you tell me why?