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",

  • stonebranch2
    replied
    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

    Leave a comment:


  • stonebranch2
    replied
    Excellent, thank you very much. I will give it a try.

    Leave a comment:


  • Isomorphic
    replied
    In fact, you probably want to do it like this:

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

    Leave a comment:


  • stonebranch2
    replied
    Thank you, I see your edit to the previous post with the information I needed.

    Leave a comment:


  • stonebranch2
    replied
    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?

    Leave a comment:


  • Isomorphic
    replied
    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; 25th Feb 2019, 08:45.

    Leave a comment:


  • stonebranch2
    replied
    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

    Leave a comment:


  • Isomorphic
    replied
    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.

    Leave a comment:

Working...
X