Announcement

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

    Bug? Filter when used with valueMap (does not filter partial matches)

    I'm looking for clarification that this is indeed the currently designed behavior.

    I have a field that is a Long -> String mapping, say Employee ID -> Employee Name. I am using ListGrid.setShowFilterEditor

    Example Data: 1002 -> "Bob"

    Observed: Partial matches of a name eg. "Bo" do not match and nothing is shown. A complete match "Bob" results in the value being shown.

    Expected: Partial substring matches should be shown. (as they would be if it was a String field - which to the user, it appears it is)

    Aside from the server sending the String field down instead of a valueMap ID, is there any setting that can do partial matches when a valueMap is used? It seems that the server sending simple String values down may be a better approach.

    As an aside, I've looked in the past at creating 'computed' fields (eg, in this case, a client-side computed String field) but did not find any nice way to do this. Computing a String field myself seems like a better alternative to sending the String from the server. eg, creating a Name field that computes it's value from the Id + valueMap.

    #2
    I'd really like to know if this is actually a bug or intended behavior.

    Being able to filter, say, on Employee name, seems like a really valid request. If my table contains an employee ID and uses a valueMap, then I need to find a good workaround for this.

    If I wanted to replace an ID value with the string value on the client, I believe transformResponse is one place this is possible. If I am using SmartGWTPro datasources, how can I use transformResponse? Or is there a better mechanism to do the substitution?

    Comment

    Working...
    X