title: The class 'de.workshop.sales_tool.Model.Antwort' does not have a readable property 'text'. JSF
body: <p>Hi i alwys get en error that The class '***.Model.Antwort' does not have a readable property 'text'.</p>
  
  <p>here is the code:</p>
  
  <p>the xhtml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding= "Utf-8"?&gt;
  &lt;ui:composition xmlns="http://www.w3.org/1999/xhtml"
                  xmlns:ui="http://java.sun.com/jsf/facelets"
                  template="templates/default.xhtml"
                  xmlns:h="http://xmlns.jcp.org/jsf/html"&gt;
      &lt;ui:define name="content"&gt;
          &lt;h1&gt;Wizard&lt;/h1&gt;
          &lt;h:form&gt;
                  &lt;ui:repeat value="#{wizardControler.fragen}" var="frage"&gt;
                      &lt;h:outputText value="#{frage.text}"/&gt;
                      &lt;br/&gt;
                      &lt;ui:repeat value="#{frage.antworten}" var="antwort"&gt;
                          &lt;h:outputText value="#{antwort.text}"/&gt;
                          &lt;br/&gt;
                          &lt;ui:repeat value="#{answer.teile}" var="teil"&gt;
                              &lt;h:outputText value="#{teil.name}"/&gt;
                              &lt;br/&gt;
                          &lt;/ui:repeat&gt;
                      &lt;/ui:repeat&gt;
                  &lt;/ui:repeat&gt;
          &lt;/h:form&gt;
      &lt;/ui:define&gt;
  &lt;/ui:composition&gt;
  </code></pre>
  
  <p>the Controler: </p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.ManagedProperty;
  import javax.faces.bean.ViewScoped;
  import lombok.Data;
  
  @Data
  @ManagedBean
  @ViewScoped
  public class WizardControler {
  
      private List&lt;Frage&gt; fragen;
  
      public void setFragen(List&lt;Frage&gt; fragen) {
          this.fragen = fragen;
      }
  
  
  
      public List&lt;Frage&gt; getFragen() {
          fragen = new ArrayList&lt;&gt;();
          try {
              Connection con = DatabaseConector.getConnection();
  
              Statement stm = con.createStatement();
  
              String statement = "SELECT * FROM Fragen";
  
              ResultSet res = stm.executeQuery(statement);
  
              while(res.next()){
                  String text = res.getString(2);
                  int nr = res.getInt(1);
                  Frage frage = new Frage(text,nr);
                  fragen.add(frage);
              }
  
  
          } catch (SQLException ex) {
              Logger.getLogger(WizardControler.class.getName()).log(Level.SEVERE, null, ex);
          }
          return fragen;
      }
  
  }
  </code></pre>
  
  <p>the other java classes:</p>
  
  <p>Frage : </p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  import java.util.LinkedList;
  import java.util.List;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.RequestScoped;
  import javax.faces.bean.ViewScoped;
  import lombok.Data;
  
  @Data
  @ManagedBean
  @RequestScoped
  public class Frage {
  
      private String text;
      private int nr;
      List&lt;Antwort&gt; antworten = new LinkedList&lt;&gt;();
  
      public Frage(String text,int nr) {
          this.text = text;
          this.nr = nr;
          try {
              Connection con = DatabaseConector.getConnection();
  
              Statement stm = con.createStatement();
  
              String statement = "SELECT * FROM Antworten WHERE FragenID = "+nr;
  
              ResultSet res = stm.executeQuery(statement);
  
              while(res.next()){
                  Antwort antwort = new Antwort(res.getString(2),res.getInt(1));
                  antworten.add(antwort);
              }
  
  
          } catch (SQLException ex) {
              Logger.getLogger(WizardControler.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
  
  
  }
  </code></pre>
  
  <p>Antwort : </p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  import java.util.LinkedList;
  import java.util.List;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.RequestScoped;
  import javax.faces.bean.ViewScoped;
  import lombok.Data;
  
  @Data
  @ManagedBean
  @RequestScoped
  class Antwort {
  
  
      private String text;
      private int nr;
      List&lt;Teil&gt; teile = new LinkedList&lt;&gt;();
  
      public Antwort(String text, int nr) {
          this.text = text;
          this.nr = nr;
          try {
              Connection con = DatabaseConector.getConnection();
  
              Statement stm = con.createStatement();
  
              String statement = "SELECT * FROM Teile WHERE TID = (SELECT TID FROM setztvoraus WHERE AntwortID = "+nr+")";
  
              ResultSet res = stm.executeQuery(statement);
  
              while(res.next()){
                  Teil teil = new Teil(res.getInt(1),res.getString(2));
                  teile.add(teil);
              }
  
  
          } catch (SQLException ex) {
              Logger.getLogger(WizardControler.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
  }
  </code></pre>
  
  <p>the exact error is :</p>
  
  <pre><code>/wizard.xhtml @13,64 value="#{antwort.text}": The class 'de.workshop.sales_tool.Model.Antwort' does not have a readable property 'text'.
  </code></pre>
  
  <p>and here is the scope variables value of the wizardControler : </p>
  
  <p>WizardControler(fragen=[Frage(text=Frage 1, nr=1, antworten=[Antwort(text=Antwort 1, nr=1, teile=[Teil(TID=1, name=Teil 1)]), Antwort(text=Atwort 2, nr=2, teile=[Teil(TID=1, name=Teil 1)])]), Frage(text=Frage 2, nr=2, antworten=[Antwort(text=Antwort 1, nr=5, teile=[Teil(TID=3, name=Teil 3)]), Antwort(text=Atwort 2, nr=6, teile=[Teil(TID=2, name=Teil 2)]), Antwort(text=Antwort 3, nr=7, teile=[Teil(TID=3, name=Teil 3)])]), Frage(text=Frage 3, nr=3, antworten=[Antwort(text=Atwort 2, nr=3, teile=[Teil(TID=2, name=Teil 2)]), Antwort(text=Antwort 1, nr=4, teile=[Teil(TID=1, name=Teil 1)])])])</p>
  
  <p>EDIT1 : </p>
  
  <p>Just tried and added the real getter for the text fild and made an brakpint there and after the error is displayed in the browser it gets triggert^^</p>