Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Upgrade to SmartGWT 13 - don't see prompts in the FilterEditor

    Hi,

    After upgrading to SmartGWT 13 the following code has stopped working for us:

    ListGrid grid = new ListGrid();
    grid.setShowFilterEditor(true);
    ListGridField field = new ListGridField("Field", 100);
    TextItem textItem = new TextItem();
    textItem.setPrompt("Text Format");
    field.setFilterEditorProperties(textItem);
    grid.setFields(field);


    We're expecting to see "Text Format" prompt when hovering over Filter Editor for Field, but nothing comes up.
    This used to work in version 6.1
    Not sure if there's a new way to achieve same result..

    Thank you!

    #2
    Hi,

    I downloaded latest build from 13.1 branch, but this is still an issue for us. I'm seeing the default hover text over the filters, not our customized one. Is there anything besides the code above that we need to do?
    Thanks!

    Comment


      #3
      If you're seeing default prompts, then you must have set properties that causes the FilterEditor to show prompts, and that's why it's not showing yours.

      So what settings are you using, and given that for some modes (e.g. allowFilterWindow) it would be a functional break (and accessibility violation) to show your prompt instead of the built-in ones, so you'll need to think carefully about what exactly you want in this mode.

      Comment


        #4
        We have:


        grid.setAllowFilterExpressions(false);
        grid.setAllowFilterOperators(false);
        grid.setAllowFilterWindow(false);
        grid.setShowHeaderContextMenu(false);
        grid.setShowHeaderMenuButton(false);

        Comment


          #5
          That is turning a bunch of features off. If you are experiencing some default hovers, and you don't want to provide code to reproduce them so we can troubleshoot, can you then at least provide the text or a screenshot of the default hovers you are getting? Then we can figure out from that what settings are missing in your repro case.

          Comment


            #6
            Here's the complete code:


            ListGridField idField = new ListGridField("loadID", "Load ID");

            TextItem textItem = new TextItem();
            textItem.setPrompt("My Special Format");
            ListGridField trackingField = new ListGridField("loadDescription", "Load Tracking Number");
            trackingField.setFilterEditorProperties(textItem);

            ListGrid grid = new ListGrid();
            grid.setDataSource(ds);
            grid.setShowFilterEditor(true);
            grid.setAllowFilterExpressions(false);
            grid.setAllowFilterOperators(false);
            grid.setAllowFilterWindow(false);
            grid.setShowHeaderContextMenu(false);
            grid.setShowHeaderMenuButton(false);
            grid.setFields(idField, trackingField);


            Our expectation is when I hover over trackingField's filter I should see "My Special Format" (even without doing anything)
            Currently I see nothing. When I put 'test' in the filter value and run the filter and then hover I can see 'Load Tracking Number contains test'.

            Thank you!
            Last edited by smartiro; 21 Apr 2026, 15:30.

            Comment


              #7
              Looks like this was fixed correctly but there was a problem in the backport specifically to 13.1 which rendered the fix inactive. Builds from tomorrow on will have the full fix (April 24th or later).

              Comment


                #8
                Ok. Thank you!

                Comment


                  #9
                  Sorry to revive this, but one more question:
                  When there's a value applied in FilterEditor for text field our hover stops showing up and system one shows up that says: <Field> contains <Value>. E.g. "Tracking Number contains ABCD123" For numeric fields it says 'equals' instead of 'contains'.
                  Is this text controllable?
                  Our backend applies 'equals' filter to text values and not 'contains', so this prompt looks misleading for us.
                  Thank you!

                  Comment


                    #10
                    If your server ignores textMatchStyle and/or the operatorId and instead forces "equals" filtering, then you need to configure SmartClient properly for that - set either textMatchStyle to "exact" or "exactCase", or if this is a field-specific limitation, set listGridField.operation to "equals" or "iEquals".

                    This will fix your filtering (which is currently broken) and the hover text will also be correct.

                    Comment


                      #11
                      I tried
                      setDefaultTextMatchStyle(TextMatchStyle.EXACT) on DataSource, but that did not make a different in the hover text. Still says 'contains'

                      Is there another object where textMatchStyle needs to be set?
                      Thanks!

                      Comment


                        #12
                        That will not do anything if you are explicitly (or implicitly) setting the textMatchStyle at the ListGrid level (because what you've just tried to set is just a default, if no other system sets the textMatchStyle).

                        We don't have any of your code to look at, but:

                        1. you may be using autoFetchTextMatchStyle if you are using autoFetchData

                        2. you may be setting textMatchStyle in your call to fetchData()

                        3. you not be using textMatchStyle at all, because listGridField.operator has been set, to make that specific field use an explicit search operator

                        Any which way you set it, don't worry, you can see the result very clearly in both client- and server-side logs - it's prominently logged.

                        And then, again, also don't worry: if your server is going to ignore the setting and always use "exact" style, all you have to do is set one property (as above) to tell the client side system that that is the only option available from your server.

                        If you are having trouble:

                        1. show us the client-side (Developer Console) log of the request, and the server-side log for when it is executed

                        2. show us the full configuration of the grid that is sending the request you don't like

                        Comment

                        Working...
                        X