ICEfaces
  1. ICEfaces
  2. ICE-7678

Add Find feature to ice:dataTable

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-1.8.2.GA_P03
    • Fix Version/s: 3.0, EE-1.8.2.GA_P04
    • Labels:
      None
    • Environment:
      ICEfaces 3, ice:dataTable component
    • Assignee Priority:
      P2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial

      Description

      It would be a useful addition to the ice:dataTable component if application developers could implement a Find function that would search for a matching substring within a set of specified columns to include in the search. Upon finding the first match, the dataTable would navigate to ensure that row was visible on the screen, and use an effect to highlight the matching row.

      It would be the responsibility of the application to provide the search string and trigger the find operation via new APIs on the dataTable component. This approach provides the maximum flexibility for applications in terms of how the find text is acquired from the user, etc.


      In order to provide a Search/Find capability to the ace:dataTable, we need to add new component APIs as described below:


      double findRow(String str, Array columns, double startRow)

      The findRow API will accept a String argument ("str") to locate within the specified dataTable "columns". An optional startRow argument can be specified to begin searching at a specific row number (this enables a "Find Next" type functionality). The return value for this API is the first row number that has a column string value that matches the str argument value anywhere in the string. If no match is found, -1 is returned.

      Also might make sense to make the actual match condition a config. parameter in the findRow api. Possible settings would be Anywhere in String, StartsWith, endsWith.


      void navigateToRow( double row, EffectQueue highlightEffect)

      The navigateToRow API will accept a row number to navigate the datatable to such that the specified row number is made visible in the datatable, either via pagination to the page that contains the specified row, or via scrolling a scrollable datatable until the specified row is within the visible region on the page. An optional highlightEffect type may be specified that will be applied to the row once it is visible to draw the user's attention to the row.

        Activity

        Hide
        Carmen Cristurean added a comment -

        Retested with ICEdfaces3 build 8, and here are the results regarding the above issues:

        1. &2. still exist, Pulsate effect does not seem to work also in IE8.

        3. In IE7, there is a different behaviour when the search cannot find any more results, no message renders on the page.

        This issue is resolved for the other browsers.

        4. Could not reproduce the JS error this time.

        5. 'Start with', 'Ends With' 'Contains' appear to be fixed.
        'Exact Match' does not return an exact match, it seem to return the same search results as 'Contains'.

        Show
        Carmen Cristurean added a comment - Retested with ICEdfaces3 build 8, and here are the results regarding the above issues: 1. &2. still exist, Pulsate effect does not seem to work also in IE8. 3. In IE7, there is a different behaviour when the search cannot find any more results, no message renders on the page. This issue is resolved for the other browsers. 4. Could not reproduce the JS error this time. 5. 'Start with', 'Ends With' 'Contains' appear to be fixed. 'Exact Match' does not return an exact match, it seem to return the same search results as 'Contains'.
        Hide
        Nils Lundquist added a comment -

        Please rereport issue 1,2 & 5 noting with either ace or compat tables.

        Show
        Nils Lundquist added a comment - Please rereport issue 1,2 & 5 noting with either ace or compat tables.
        Hide
        Carmen Cristurean added a comment -

        ICEfaces3 Build 10 testing results:

        1. ace:dataTable: If using the default effect (Highlight), the highlight color is barely visible in some of the browsers.

        2. ice:dataTable & ace:dataTable: Pulsate effect is not visible in IE7 and IE8.

        3. ice:dataTable: if search does not return a result, messages similar to the ones used for ace:dataTable may be implemented here:
        "Search starting at index 0 for "i" did not return a result."

        4. Could not reproduce the JS error anymore, this issues considered resolved.

        5. ice:dataTable & ace:dataTable:'Exact Match' does not return an exact match, it seems to return the same search results as 'Contains'.
        As example, searching for exact match for 'flash' will return name='Superflash' and name='Flash', in total 4 records. The same results are returned when searching for 'flash' with search type='Contains'.

        Show
        Carmen Cristurean added a comment - ICEfaces3 Build 10 testing results: 1. ace:dataTable: If using the default effect (Highlight), the highlight color is barely visible in some of the browsers. 2. ice:dataTable & ace:dataTable: Pulsate effect is not visible in IE7 and IE8. 3. ice:dataTable: if search does not return a result, messages similar to the ones used for ace:dataTable may be implemented here: "Search starting at index 0 for "i" did not return a result." 4. Could not reproduce the JS error anymore, this issues considered resolved. 5. ice:dataTable & ace:dataTable:'Exact Match' does not return an exact match, it seems to return the same search results as 'Contains'. As example, searching for exact match for 'flash' will return name='Superflash' and name='Flash', in total 4 records. The same results are returned when searching for 'flash' with search type='Contains'.
        Hide
        Nils Lundquist added a comment -

        5 was due to a typo in the demo. Now resolved. 3 has been fixed also.

        Show
        Nils Lundquist added a comment - 5 was due to a typo in the demo. Now resolved. 3 has been fixed also.
        Hide
        Carmen Cristurean added a comment - - edited

        Verified fixes for 3. and 5. above with ICEfaces3 revision 27562, and with ICEfaces3 build11, in IE8, FF9, Chrome16.

        Show
        Carmen Cristurean added a comment - - edited Verified fixes for 3. and 5. above with ICEfaces3 revision 27562, and with ICEfaces3 build11, in IE8, FF9, Chrome16.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Ken Fyten
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: