1. #1
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default Change the access attribute of "filtering" in TreePanel class

    Change the access attribute of "filtering" in TreePanel class


    Hello, i have a problem with asynchronous tree and filters. To solve my problem I need the attribute "filtering" in TreePanel class going on to protected

    Thx!

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I will change it to protected. For now you need to use JSNI to access it

  3. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Change is in SVN as of revision 2290

  4. #4
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default


    thanks a lot

  5. #5
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default


    I tried JSNI :

    PHP Code:

    public class FilteredAsyncTreePanel<extends ModelData> extends TreePanel<M>{
        
        public 
    FilteredAsyncTreePanel(TreeStore<Mstore) {
        
    super(store);
        }
        
        @
    Override
        
    protected void onFilter(TreeStoreEvent<Mse) {
        
    setFiltering(store.isFiltered());
        
    clear();
        
    renderChildren(null);

        if (
    isExpandOnFilter() && getStore().isFiltered()) {
    //          expandAll();
            
    expandAllAfterFilter(); // TODO: dgrand
        
    }
        
    update();
        }
        
        public 
    void expandAllAfterFilter() { // TODO: dgrand
        
    for (M child store.getAllItems()) {
            
    TreeNode node findNode(child);
            if (
    node != null) {
            if (
    node.getItemCount() > 0) {
                
    setExpanded(childtruefalse);
                
            } else if (
    node.isLeaf()) {
                
    setExpanded(childtruefalse);
            }
            }
        }
        }
        
        @
    Override
        
    protected void onDataChanged(TreeStoreEvent<Mse) {
            
    super.onDataChanged(se);
            
    Logger.debug(getClass().getName(), "onDataChanged/applyFilters()");
            
    getStore().applyFilters(""); // TODO: DGRAND
        
    }
        
        private final 
    native void setFiltering(boolean trueOrFalse/*-{
        this@com.extjs.gxt.ui.client.widget.treepanel::filtering = trueOrFalse;
          }-*/
    ;


    but it does not work...

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Because your jsni code is wrong.

    Code:
     private final native void setFiltering(boolean trueOrFalse) /*-{
        this.@com.extjs.gxt.ui.client.widget.treepanel.TreePanel::filtering = trueOrFalse;
          }-*/;

  7. #7
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default


    Ok, but what is the problem?

  8. #8
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    What do you mean? I gave you the corrected code.

  9. #9
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default


    sorry I did not see the point missing!

  10. #10
    Sencha User
    Join Date
    Mar 2008
    Location
    France
    Posts
    56
    Vote Rating
    0
    Gordon25 is on a distinguished road

      0  

    Default


    stupid question but how download the revision 2290 ?
    Where is the SVN ?

Similar Threads

  1. Question on attribute "right" in x-form-field-wrap css class
    By NotChris in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 12 Oct 2010, 5:29 AM
  2. Replies: 2
    Last Post: 19 Aug 2010, 12:01 PM
  3. Replies: 4
    Last Post: 14 Jul 2010, 11:43 AM
  4. does "BasicForm" have any attribute like html Form "target" attribute
    By michoeal in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 25 Dec 2007, 3:05 AM

Thread Participants: 1