2 Replies Latest reply on May 7, 2009 10:50 AM by muhammed sabir

    I have  problem  dataTable help me,please

    muhammed sabir Newbie

      return error jsp page
      Http:status 500
      The class 'org.my.dataTable.TaskListData' does not have the property 'WorkName'.
      root cause
      this jsp page
      ///
      <rich:dataTable value="#{TaskListBean.dataList}" var="list"
      rowClasses="row1, row2" id="taskList" rows="10"
      columnClasses="50,100,100,100"
      onRowMouseOver="this.style.backgroundColor='#B5F3FB'"
      onRowMouseOut="this.style.backgroundColor='#{a4jSkin.rowBackgroundColor}'"
      width="777">
      <f:facet name="header">
      <rich:columnGroup>
      <rich:column colspan="8">
      <h:outputText value="Trouble Tickets opened" />
      </rich:column>

      <rich:column breakBefore="true">
      <h:outputText value="Çağrı Numarası" />
      </rich:column>

      <rich:column>
      <h:outputText value="Arıza Tanım" />
      </rich:column>

      <rich:column>
      <h:outputText value="Åžube" />
      </rich:column>

      <rich:column>
      <h:outputText value="Açıklama" />
      </rich:column>
      <rich:column>
      <h:outputText value="Tarih" />
      </rich:column>
      <rich:column>
      <h:outputText value="Saat" />
      </rich:column>
      <rich:column>
      <h:outputText value="Yetkili" />
      </rich:column>
      <rich:column>
      <h:outputText value="Adres" />
      </rich:column>
      </rich:columnGroup>
      </f:facet>

      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="#{list.WorkName}" />
      </rich:column>
      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="" />
      </rich:column>
      <rich:column>
      <h:outputText value="" />
      </rich:column>

      <rich:column>
      <h:outputText value="" />
      </rich:column>
      </rich:dataTable>
      <rich:datascroller align="center" for="taskList" maxPages="20" />
      </rich:simpleTogglePanel>
      </rich:tab>
      ///this bean class
      public class TaskListBean {

      private CallableStatement Ctmt;
      private ResultSet rs;
      private int id;
      private Connection conn;
      //private List dataList;
      // private TaskListData emp;

      private ListdataList;
      public List getDataList(){
      return dataList;
      }
      @PostConstruct
      public void init(){
      dataList = new ArrayList();
      dataList.add(new TaskListData("Bir","iki"));
      dataList.add(new TaskListData("Uc","Dort"));
      }
      ////get and setter class
      public class TaskListData {
      private String WorkName;
      private String WorkPlace;
      private String WorkDetail;
      private String WorkDate;
      private String WorkTime;
      private String ContactName;
      private String WorkAddress;
      private int WorkId;

      public TaskListData(String WorkName,String WorkPlace){
      this.WorkName =WorkName;
      this.WorkPlace =WorkPlace;
      }
      /**
      * @return the WorkName
      */
      public String getWorkName() {
      return WorkName;
      }

      /**
      * @param WorkName the WorkName to set
      */
      public void setWorkName(String WorkName) {
      this.WorkName = WorkName;
      }

      /**
      * @return the WorkPlace
      */
      public String getWorkPlace() {
      return WorkPlace;
      }

      /**
      * @param WorkPlace the WorkPlace to set
      */
      public void setWorkPlace(String WorkPlace) {
      this.WorkPlace = WorkPlace;
      }