3 Replies Latest reply on Feb 9, 2010 4:50 AM by ilya_shaikovsky

    extendedDataTable sortBy doesnt work

    eugenbesel

      Hello everybody,

       

      I'm a newbie in Richfaces and try to use ExtendedDataTable with dynamic creation of columns.

      I can see the table, but if I try to sort the data, it doesn't work. after I click on a column, only wait symbol is shown.

       

      If I try to filter the data, I enter a letter and the table is rerended. but nothing happend. just my filter is dissapeard.

       

      I took a look at many threads in this forum, but haven't found the answer on my question.

       

      I use Richfaces 3.2.2 with facelets.

       

      my last version of xhtml file looks like:

       

      <rich:extendedDataTable value="#{searchModul.columnData}" var="data" width="500px" height="600px" sortMode="single" selectionMode="multi">
                   <f:facet name="header">
                       <h:outputText value="#{searchModul.tableHeader}"></h:outputText>
                   </f:facet>
                       <rich:columns id="col_#{col}" value="#{searchModul.columns}" var="col" index="ind" filterBy="#{data[ind]}" sortBy="#{data[ind]}" sortOrder="#{searchModul.sortOrder}" filterEvent="onkeyup">
                   <f:facet name="header"> 
                       <h:outputText value="#{col}"/> 
                   </f:facet> 
                   <h:outputText value="#{data[ind]}"></h:outputText>
                  </rich:columns>
                  </rich:extendedDataTable>

       

       

      Java:

      public void init(){

               for(ColumnConfigurationVO columnsIter : confVO.getColumns()){
                   sortOrder.put(columnsIter.getCaption(),Ordering.UNSORTED);
                  }
      }

       

      public Map<String, Object> getSortOrder() {

           return sortOrder;
           }

       

      private List<ArrayList<String>> dataList = new ArrayList<ArrayList<String>>();

       

          /**
           * this method create the data values for displaing n GUI
           * @return
           */
          public List<ArrayList<String>> getColumnData(){
             
              return dataList;
          }

       

      What have I done wrong?????????

       

      thank you

        • 1. Re: extendedDataTable sortBy doesnt work
          ilya_shaikovsky
          please try under 3.3.3 latest milestone. 3.2.2 is too old version and we do not patch previous version. Current version seems works fine at demos.
          • 2. Re: extendedDataTable sortBy doesnt work
            eugenbesel

            hello Ilja,

             

            I also looked at

            http://ludvigsens.net/richfaces-3.3.2/richfaces/columns.jsf?c=columns&tab=usage

            but my code looks like on this page.

            I take the new version of Richfaces: 3.3.3 Beta, but I have still the old behavior.

             

            I have the methode getSortOrder in my Bean.

             

            <rich:extendedDataTable value="#{searchModul.columnData}" var="data" width="500px" height="600px" sortMode="single" selectionMode="multi">
                         <f:facet name="header">
                             <h:outputText value="#{searchModul.tableHeader}"></h:outputText>
                         </f:facet>
                             <rich:columns id="col_#{col}" value="#{searchModul.columns}"
                             var="col" index="ind" filterBy="#{data[ind]}" sortBy="#{data[ind]}"
                             sortOrder="#{searchModul.sortOrder[col]}" filterEvent="onkeyup" filterValue="#{searchModul.filterValue}">
                         <f:facet name="header"> 
                             <h:outputText value="#{col}"/> 
                         </f:facet> 
                         <h:outputText value="#{data[ind]}"></h:outputText>
                        </rich:columns>
                        </rich:extendedDataTable>

             

            BBean

            public Map<String, Object> getSortOrder() {    
                 return sortOrder;
                 }

             

                public List<ArrayList<String>> getColumnData(){
                   
                    return dataList;
                }

                public String getFilterValue() {
                    return filterValue;
                }

             

                public void setFilterValue(String filterValue) {
                    this.filterValue = filterValue;
                }

             

            I have the same behavior as before. after click on the header for sorting of data, I get the wait symbol, which never ended.

            • 3. Re: extendedDataTable sortBy doesnt work
              ilya_shaikovsky
              let's move the discussion into single thread