Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default [FNR] Strange Behavior for TreeGrid and Selection Model

    [FNR] Strange Behavior for TreeGrid and Selection Model


    Example, I have 2 groups, with users within them. If one of the user is in both group, when a will click on the 2nd one, the TreeGrid will selection the 1st one.

    I try to re implement the key provider and the model comparer, but any of this works.

    Run the below example, expand both nodes, and click on the second "User2".

    This is two seprate instance, but the equals plays on the "id".
    I Guess if the equals plays on the "computeId", the problem doesn't occurs.



    - GXT version : 2.2.0
    - Host mode / web mode / both : Both
    - Browser and version : FF 3.6, Chrome 5 (all ?)
    - Operating System : WinXp
    - Sample code

    Code:
    public class TreeGridExample implements EntryPoint
    {
    
        /**
         * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
         */
        @Override
        public void onModuleLoad()
        {
    MyModel group1 = new MyModel();
            group1.set("id", 1);
            group1.set("name", "Group Admin");
            group1.set("computeId", Random.nextInt());
    
            MyModel group2 = new MyModel();
            group2.set("id", 2);
            group2.set("name", "Group Admin 2 ");
            group2.set("computeId", Random.nextInt());
    
            MyModel user1 = new MyModel();
            user1.set("id", 3);
            user1.set("name", "User Admin 1");
            user1.set("computeId", Random.nextInt());
    
            MyModel user2 = new MyModel();
            user2.set("id", 4);
            user2.set("name", "User Admin 2");
            user2.set("computeId", Random.nextInt());
    
            MyModel user2a = new MyModel();
            user2a.set("id", 4);
            user2a.set("name", "User Admin 2");
            user2a.set("computeId", Random.nextInt());
    
            MyModel user3 = new MyModel();
            user3.set("id", 5);
            user3.set("name", "User Admin 3");
            user3.set("computeId", Random.nextInt());
    
            group1.add(user1);
            group1.add(user2);
    
            group2.add(user2a);
            group2.add(user3);
    
            TreeStore<BaseTreeModel> store = new TreeStore<BaseTreeModel>();
            store.setModelComparer(new ModelComparer<BaseTreeModel>()
            {
    
                @Override
                public boolean equals(BaseTreeModel m1, BaseTreeModel m2)
                {
                    Integer o1 = m1.<Integer> get("computeId");
                    Integer o2 = m2.<Integer> get("computeId");
    
                    return o1.equals(o2);
                }
            });
            store.setKeyProvider(new ModelKeyProvider<BaseTreeModel>()
            {
    
                @Override
                public String getKey(BaseTreeModel model)
                {
                    return String.valueOf(model.<Integer> get("computeId"));
                }
            });
            store.add(group1, true);
            store.add(group2, true);
    
            ColumnConfig cc = new ColumnConfig("name", 200);
            cc.setRenderer(new TreeGridCellRenderer<BaseTreeModel>());
            TreeGrid<BaseTreeModel> treeGrid = new TreeGrid<BaseTreeModel>(store, new ColumnModel(Arrays.asList(cc)));
    
            Window win3 = new Window();
            win3.setSize(640, 480);
            win3.setLayout(new FitLayout());
            win3.add(treeGrid);
            win3.show();
        }
    
        class MyModel extends BaseTreeModel
        {
    
            /**
             * TODO Select constructor type. Default constructor. Constructor. Full construtor. Copy constructor.
             */
            public MyModel()
            {
            }
    
            /**
             * @see java.lang.Object#equals(java.lang.Object)
             */
            @Override
            public boolean equals(Object obj)
            {
                return this.<Integer> get("id").equals(((MyModel) obj).<Integer> get("id"));
            }
        }

  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 just added a change to GXT which will fix the problem for you. Your ModelComparer can throw a NPE, you should fix that.

    I will reply here once the change is in SVN.

  3. #3
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    Thx Sven for the quick reponse !

    But If the changes are not too important to make, is it possible to post those too? Or a new build of GXT will comes out soon for the public ?

  4. #4
    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


    There is no easy way to override it. 2.2.1 will come out early of october probably.

  5. #5
    Sencha User
    Join Date
    May 2009
    Posts
    118
    Vote Rating
    0
    mtarantini is on a distinguished road

      0  

    Default


    Okay no problem, thx again

  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


    Fixed in SVN as of revision 2246.

Similar Threads

  1. [FNR] RowEditor Buttons have strange behavior
    By mtarantini in forum Ext GWT: Bugs (2.x)
    Replies: 9
    Last Post: 16 Jun 2010, 11:00 AM
  2. Gridpanel : Strange behavior in IE vs good behavior with Firefox
    By Jayeff_land in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 13 Oct 2009, 5:31 AM
  3. Replies: 1
    Last Post: 8 Dec 2008, 12:39 AM
  4. Replies: 1
    Last Post: 28 Aug 2008, 7:53 AM

Thread Participants: 1