Announcement

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

    FilterBuilder customization of valueSetHint and valueItemTextHint

    Hi Isomorphic,

    We would like to customize the valueSetHint and the valueItemTextHint in the FilterBuilder, ideally within the getValueFieldProperties implementation.

    Could you please provide some guidance on how we might achieve that?

    Thank you

    SmartClient Version: v12.0p_2019-02-06/Pro Deployment (built 2019-02-06)

    Code:
    //> @attr filterClause.valueSetHint (String : "Comma-separated values" : IR)
    // A hint to show in the value-item when using an operator that takes an array of values.
    // @group i18nMessages
    // @visibility external
    //<
    valueSetHint:"Comma-separated values",
    
    //> @attr filterClause.valueItemTextHint (String : "Enter a value" : IR)
    // A hint to show in the value-item when using an operator that takes user-entered values.
    // @group i18nMessages
    // @visibility external
    //<
    valueItemTextHint:"Enter a value",

    #2
    This one's been fixed for builds dated February 25 and later - your hint would have been picked up correctly from getValueFieldProperties(), but framework code was clobbering it after that for some valueTypes.

    Comment


      #3
      Thank you,

      To clarify, it is the text that appears in the background of the form item, "Comma-separated values", that we are attempting to customize, specifically to remove it, not the field hover hint, which is it already picked up from our datasource.

      So with that being said, valueSetHint and valueItemTextHint don't appear to be configurable from the returned FormItem, so this is where we are looking for a little guidance.

      Alternatively, if we can change the defaults for FilterClause at a global level, that information would be helpful too.

      Thank you

      Comment


        #4
        Just set the "hint" on the formItem properties you return from getValueFieldProperties(), according to the valueType passed to that method.

        And, yes, you should also be able to FilterClause.setDefaultProperties() to set those attributes globally.
        Last edited by Isomorphic; 25 Feb 2019, 08:45.

        Comment


          #5
          OK, Thank you.
          I assume that requires the fix for builds dated February 25 and later?
          Without having to upgrade at the moment, is it feasible changing the default here globally?

          Comment


            #6
            Thank you, I see your edit to the previous post with the information I needed.

            Comment


              #7
              In fact, you probably want to do it like this:

              Code:
                      FilterClause fc = new FilterClause();
                      fc.setValueItemListHint("My hint");
                      FilterClause.setDefaultProperties(fc);

              Comment


                #8
                Excellent, thank you very much. I will give it a try.

                Comment


                  #9
                  Setting the "hint" on the FormItem properties returned from getValueFieldProperties() appears to be functioning with your fix in SmartClient Version: v12.0p_2019-02-26/Pro Deployment (built 2019-02-26).
                  Thank you

                  Comment

                  Working...
                  X