6 Replies Latest reply on Oct 16, 2008 9:37 AM by Beletsky Andrey

    Problem with a4j:jsFunction data=

    Beletsky Andrey Newbie

      When I use a4j:jsFunction:

      <a4j:form>
       <a4j:jsFunction name="getWork" ajaxSingle="true"
       data="#{serializableBean.work}"
       oncomplete="alert('cool!')" />
      </a4j:form>
      
      <script ...>
      
       getWork();
      
      </script>
      



      class Work implements Serializable {
       private int id;
       private int fromHour;
       private int countHours;
       private String state;
      
       public int getId() {
       return id;
       }
      
       public void setId(int id) {
       this.id = id;
       }
      
       public int getFromHour() {
       return fromHour;
       }
      
       public void setFromHour(int fromHour) {
       this.fromHour = fromHour;
       }
      
       public int getCountHours() {
       return countHours;
       }
      
       public void setCountHours(int countHours) {
       this.countHours = countHours;
       }
      
       public String getState() {
       return state;
       }
      
       public void setState(String state) {
       this.state = state;
       }
      }
      


      Error:
      javax.servlet.ServletException: Property 'countHours' has no getter method at javax.faces.webapp.FacesServlet.service(FacesS...

      Please, help to understand this problem and give me same decision of this problem.