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.

  1. #1
    Ext User
    Join Date
    Sep 2008
    Posts
    7
    Vote Rating
    0
    sgdevteam is on a distinguished road

      0  

    Question Need to reload single treepanel node, and treepanel node checkbox error

    Need to reload single treepanel node, and treepanel node checkbox error


    I am an Ext.Newb, and I've been killing myself on trying to figure this out. I'm actually having a couple different problems...

    Edit: I should probably mention that we're using Ext v2.2.0...


    First Problem:
    I have a TreePanel with two tiers. The first tier are the itemNodes, and we limit this to 25 rows.

    However, each itemNode could have thousands of children, so I am adding custom server-side pagination. I've added scroll buttons (images) to the itemNodeUI, and click handlers which call the following function:

    Code:
        onPaginationNextButtonClick: function(e,t) {
            var parentEl = Ext.get(t).findParentNode('.x-tree-node-ct', 10, false).previousSibling;
            var treeNodeId = parentEl.getAttribute('ext:tree-node-id');
            var treeNode = this.tree.getNodeById(treeNodeId);
            var currentPage = parseInt(treeNode.attributes.pageNumber);
    
            treeNode.attributes.pageNumber = currentPage + 1;
            treeNode.reload();
        }
    The tree loader pulls the pageNumber from the itemNode's attributes, and it's sent along with the baseParams to our php file, which then just adds "LIMIT" to the end of the SQL query. Pretty simple really, and it works great.

    But here's the problem: The itemNodeUI doesn't seem to be refreshed, so the text that shows how many results are being displayed, and the right/left scroll arrows, is not being updated like it should.

    So what I need to do here is, update the children (like I am above), and update the node itself so that the text and scroll arrows are updated. I tried using treeNode.parentNode.reload(), but all that did was reload the entire tree.

    Any suggestions on how I can update this node?



    Second Problem:
    We also need to do filtering. I added two checkboxes to the itemNodeUI, and the plan is to add another click handler to each, which sets an attribute on the itemNode. Again, this will be passed through with the baseParams.

    However, the problem is this: When I click on either of these checkboxes, I get the following error in FireBug:

    Code:
    node is null
    node.ui.onCheckChange(e);    ext-all-debug.js (line 22852)
    This is the code from that particular section of the ext file:

    Code:
        onCheckboxClick : function(e, node){
            node.ui.onCheckChange(e);
        }
    I've tried adding my own 'onCheckboxClick' to override it, but it didn't work.

    Is there a way that I can disable or override this somehow, so I can stick my own handler onto the checkboxes? This seems to me like it would be an easy fix, but it eludes me!



    Thanks in advance for your help!

  2. #2
    Ext User
    Join Date
    Sep 2008
    Posts
    7
    Vote Rating
    0
    sgdevteam is on a distinguished road

      0  

    Default


    So I've resolved my issue with the second problem by adding the following to the ext-overrides:

    Code:
        Ext.override(Ext.tree.TreeEventModel, {
            onCheckboxClick: function(e) {
                // This was causing a problem with the filtering checkboxes in the itemNodes.
            }
        });
    But I am still having problems with the first issue noted above. The only idea I've had so far is to do some crappy XPath crawling and innerHTML updating, lol. Any help is muchly appreciated!

  3. #3
    Ext User
    Join Date
    Sep 2008
    Posts
    7
    Vote Rating
    0
    sgdevteam is on a distinguished road

      0  

    Default


    Alright, I give up. Every HTML element got its own unique ID and I'm just using Ext.get to update the css styles and innerHTML. It's very hack-ish, but it's just going to have to work.

    I hope somebody out there (if there even IS anybody out there) can at least take something from this.