Results 1 to 4 of 4

Thread: Filtered Tree - Where are filtered items held?

  1. #1

    Question Filtered Tree - Where are filtered items held?

    Hi,

    I have filtered a Tree but I would like to know where the list of filtered items is held.
    In the TreeStore I can still see all my ModelData items but I cannot see anywhere that holds the list of filtered ModelData items.

    Perhaps there is no where the filter items are stored, but if so, how is it determined what filtered items to display on screen?

    Can anybody point me in the right direction?

    Thanks

    Brian

  2. #2
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961

    Default

    if you look in the java code of TreeStore then you see that this method gives you the filtered children:


    http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/store/TreeStore.html#getChildren(M,%20boolean)
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts Search Results Advanced Search form Category overview http://www.extjs.com/forum/showthrea...041#post410041

  3. #3

    Default

    Ok, thanks. I see how it does it now.
    It doesnt give me exactly what I need though. For a TreeGrid it returns the parent of the filtered child and all the children that are at the same level as it.
    What i'm really looking for is to return jsut one result.....the child I have filtered.
    I think I might need to override some of the methods in TreeGrid to acheive this.

    Thanks

  4. #4
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961

    Default

    in a Store.java you have this:

    protected List<M> filtered;


    to get this you need to subclass your treestore to get this value.


    EDIT: sorry. i see the Store#applyFilter overwrite this Store#applyFilter and you dont have a already filtered list like in store.

    but you can call the method getAllItems and then check with this Store method if the item is filtered:
    protected boolean isFiltered(ModelData record, String property)
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts Search Results Advanced Search form Category overview http://www.extjs.com/forum/showthrea...041#post410041

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •