How to receive onOpen event of listgroup

asked 2017-05-16 14:04:47 +0800

scottz gravatar image scottz

I've got a large amount of data for a listbox, and the objects are relatively slow to create, so I'm trying to send limited numbers of the objects to the model at a time. The data is grouped (and the user can select four different groupings). I'm looking to be notified when the groups are collapsed so that I know when to go get more data from the DB and add the records to the model.

            <template name="model:group">
            <zk if="${vm.selectedGroupBy == 'Date/Time Called'}">
                    <listcell onOpen="@command('toggleGroup')">
            <zk if="${vm.selectedGroupBy == 'Agency'}">
                <listgroup label="@bind(each.agencyName)"
                    style="font-weight:bold;"  onOpen="@command('toggleGroup')" />
            <zk if="${vm.selectedGroupBy eq 'Location'}">
                <listgroup label="@bind(each.location)" style="font-weight:bold;"  onOpen="@command('toggleGroup')" />
            <zk if="${vm.selectedGroupBy eq 'Type of Call'}">
                <listgroup label="@bind(each.type)"
                    style="font-weight:bold;"  onOpen="@command('toggleGroup')" />

At the moment, the toggleGroup method is not being called.

public void toggleGroup(OpenEvent oe) {



How can I set things up so that I can receive notification and be able to expand the dataset when needed?

delete flag offensive retag edit


without seeing a working example I can only ask: do all the groups fail to send the onOpen event? or only the first one 'Date/Time Called' since here the onOpen event is not at the <listgroup> but at the <listcell> element instead. If possible share a runnable example e.g. on http://zkfiddle.org/

cor3000 ( 2017-05-22 06:22:12 +0800 )edit
Be the first one to answer this question!
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




Asked: 2017-05-16 14:04:47 +0800

Seen: 16 times

Last updated: May 16

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