0

zk Tree with multiple and checkmark and paging

asked 2013-03-01 11:48:21 +0800

Brand gravatar image Brand
32 1

Hi guys

I am getting a pink popup box with an error "Failed to mount: Handle required for [object Object]" when i click next page.

Here is code you can use to reproduce the error

<window> <tree multiple="true" checkmark="true" mold="paging" pageSize="2"> <treecols> <treecol label="Test"/> <treecol label="Test"/> <treecol label="Test"/> <treecol label="Test"/> </treecols> <treechildren> <treeitem draggable="true" label="Test"/> <treeitem draggable="true" label="Test"/> <treeitem draggable="true" label="Test"/> <treeitem draggable="true" label="Test"/> </treechildren > </tree> </window>

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-22 05:11:53 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

This looks like an old bug, please refer to Add a draggable item to tree will cause js error

As a workaround, you can try the sample below:

<zk xmlns:w="client">
    <script><![CDATA[
        zk.afterLoad("zul.sel", function () {
            var _tiWgt = {};
            zk.override(zul.sel.Treeitem.prototype, _tiWgt, {
                initDrag_: function () {
                    if (zk(this.$n()).isRealVisible()) {
                        _tiWgt.initDrag_.apply(this, arguments);
                    }
                }
            });
        });
    ]]></script>
    <window>
        <tree multiple="true" checkmark="true" mold="paging" pageSize="2">
            <treecols>
                <treecol label="Test"/>
                <treecol label="Test"/>
                <treecol label="Test"/>
                <treecol label="Test"/>
            </treecols>
            <treechildren>
                <!-- the draggable attribute cause error while page changed -->
                <treeitem draggable="true" label="Test" />
                <treeitem draggable="true" label="Test" />
                <treeitem draggable="true" label="Test" />
                <treeitem draggable="true" label="Test" />
            </treechildren>
        </tree>
    </window>
</zk>
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-03-01 11:48:21 +0800

Seen: 29 times

Last updated: Mar 22 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More