1 Reply Latest reply on Jan 23, 2013 3:58 AM by ravi Nagalingam

    rich:extendedDataTable, converted value and filter

    ravi Nagalingam Newbie

      Hello all,

       

      I want to filter a column of extendedDatatable, the value is convert.

       

      In the memory, the value is 1 or 2, but in the screen I want to show "Buy" or "Sell".

       

      But when I want to filter and write "Buy" in the filter box, the filter don't work... I must write "1" in order that work.

      How can i do for the filter work when I write "Buy" ?

       

       

      <rich:extendedDataTable var="notification"

                                      value="${notificationTableModel}"

                                      id="notificationList" rows="20" width="1200px" height="510px"

                                      enableContextMenu="false" selectionMode="single"

                                      selection="#{notificationTableModel.selection}"

                                      activeClass="active-row">

       

       

                                      <rich:column id="N1Typeordre" sortable="true"

                                          sortBy="#{notification.typeOrder}" width="100px"

                                          filterBy="#{notification.typeOrder}" filterEvent="onkeyup"

                                          sortOrder="${notificationTableModel.columns['notification.typeOrder'].sortOrder}"

                                          filterValue="${notificationTableModel.columns['notification.typeOrder'].filterValue}">

                                          <f:facet name="header">

                                              <h:outputText value="${translateApp.natureOrdre}" />

                                          </f:facet>

                                          <h:outputText

                                              value="#{notification.typeOrder == 1 ? translateApp.buy :

                                                      ( notification.typeOrder == 2 ? translateApp.sell : ' ') }" />

                                      </rich:column>

       

       

                                      <f:facet name="footer">

                                          <h:panelGrid columns="2" width="100%">

                                              <rich:datascroller align="center" for="notificationList"

                                                  maxPages="15" reRender="notificationList"

                                                  renderIfSinglePage="true" boundaryControls="show"

                                                  stepControls="hide" ajaxSingle="false"

                                                  page="${notificationTableModel.page}"

                                                  onpagechange="${rich:component('notificationList')}.showSplashScreen();"

                                                  oncomplete="${rich:component('notificationList')}.hideSplashScreen()" />

                                              <h:panelGroup>

                                                  <h:outputText value="${notificationTableModel.rowCount}" />

                                                  <h:outputText value=" ${msg.rowsNumber}"/>

                                              </h:panelGroup>

                                          </h:panelGrid>

                                      </f:facet>

      </rich:extendedDataTable>

       

      Thx !

       

      Ravi NAGALINGAM