1 Reply Latest reply on Dec 17, 2009 5:36 PM by ZJ DA

    How to get rid of "No Data" in rich:extendedDataTable

    ZJ DA Newbie

      Hi, I use rich:extendedDataTable with rich:datascroller to display children of a folder. When I add some new items in the folder, I want to display them in the table with the following function in my subclass of ExtendedDataModel:


       public void displayNewObjects(Collection<ObjectBean> newObjects) {
       if (this.selection != null) {
       } else {
       this.selection = new SimpleSelection();
       for (ObjectBean o : newObjects) {
       ObjectBeanRowAdapter newObjectItem = new ObjectBeanRowAdapter(o);
       this.dataItem = newObjectItem;
       this.cachedItems.add(0, newObjectItem);


      If the table contained some rows before, it works fine by adding the new rows to the table for the new objects.  But if the table was empty, "No Data" will still be there and the new rows are appended to it.


      I am doing it in this way because I want the user to see the new items immediately.  If I go back to the database after the creation, the new objects may not display in the table due to the pagination.


      Any suggestion will be appreciated.