5 Replies Latest reply on Sep 12, 2007 2:44 AM by sergeysmirnov

    sortable column

    tjakopec

      What is status on sortable column? I see sortable and sortExpression attributes but they are not working. Why even sortExpression? Isn't sortable generic thing, you said sortable="true" (default behavior) and column is sortable by clickin on column header?

        • 1. Re: sortable column
          tjakopec

          I use trunk build (20070911)

          • 2. Re: sortable column

            All this stuff has been designed and works well for rich:scrollableDataTable. Including those features in the functionality of rich:dataTable is under consideration.

            • 3. Re: sortable column
              tjakopec

              Do you recommend that we transform our dataTable components into scrollableDataTable components or to wait that you implement in dataTable?

              • 4. Re: sortable column
                tjakopec

                I try to use scrollableDataTable instead dataTable and I must said I am not happy. That is two different worlds.

                In dataTable you recommend

                <r:dataTable id="tablicaKriteriji" var="v"value="#{natjecaj.kriterijiNaNatjecaju}">
                
                 <f:facet name="header">
                 <r:columnGroup>
                
                 <r:column>
                 <t:outputText value="#{messages['zajednicke.oznacen']}" />
                 </r:column>
                 ....
                 <r:column>
                 <t:outputText
                 value="#{messages['kadrovska.natjecaji.natjecaj.tezina']}" />
                 </r:column>
                 </r:columnGroup>
                 </f:facet>
                
                
                
                 <r:column styleClass="kolonaCentrirano">
                 <t:selectBooleanCheckbox id="oznacenKriterij" value="#{v.oznacen}" />
                 </r:column>
                
                 ...
                
                 <r:column>
                 <r:inputNumberSlider id="tezina" value="#{v.tezina}" maxValue="100"
                 step="1" showBoundaryValues="true" showInput="true"
                 showToolTip="true" onchange="preracunajTezine();" />
                 </r:column>
                
                
                 <f:facet name="footer">
                 <r:columnGroup id="grupaKolonaPodnozje">
                
                 <r:column>
                 <t:outputText value="" />
                 </r:column>
                 ...
                 <r:column>
                 <t:outputText id="ukupnoTezina" value="#{natjecaj.ukupnoTezina}" />
                 </r:column>
                 </r:columnGroup>
                 </f:facet>
                
                </r:dataTable>
                



                now in scrollableDataTable you recommend
                <r:scrollableDataTable id="tablicaKriteriji" var="v"value="#{natjecaj.kriterijiNaNatjecaju}">
                <r:column styleClass="kolonaCentrirano">
                 <f:facet name="header">
                 <t:outputText value="#{messages['zajednicke.oznacen']}" />
                 </f:facet>
                 <t:selectBooleanCheckbox id="oznacenKriterij" value="#{v.oznacen}" />
                </r:column>
                 ...
                
                </r:scrollableDataTable>
                

                (This kind off approach have tomahawk on there dataTable)

                I must said I will like to have (very much) sortable functionality on dataTable. Currently in our project there is over 70 dataTable components ad non off them is sortable :(
                Converting that in scrollableDataTable will give me more problem than benefits.

                Please, pretty pleas :) put sortable functionality in dataTable!

                • 5. Re: sortable column

                   

                  "tjakopec" wrote:
                  Do you recommend that we transform our dataTable components into scrollableDataTable components or to wait that you implement in dataTable?


                  The purpose of them are too different to suggest something like that.

                  The task of making a table column sortable on the application level is very easy. The solution is mentioned here, on the forum, couple times. I am not sure, but it is about 5-10 lines of code (might be less) .
                  Of course, waiting is always the option ;-)