3

Expand first group and collapse remaining group by default.

asked 2013-06-27 09:25:00 +0800

iamsudhir4u gravatar image iamsudhir4u flag of India
545 7
http://corejavasupport.bl...

updated 2013-06-28 13:04:57 +0800

I have created a MyGroupModelList class by extending the AbstractGroupsModel class. I want first group present in MyGroupModelList should be expanded and remaining all other groups should be collapsed.

On View model I have written Below. private MyGroupModelList <tabdata> summaryGroupModel;

    @AfterCompose
    public void afterCompose(@ContextParam(ContextType.VIEW) Component view){    
    summaryGroupModel = getSummaryTabData(folderRSN);

    if (summaryGroupModel != null && summaryGroupModel.getGroupCount() > 0) {
    summaryGroupModel.addOpenGroup(0);
    }

On ZUL file I have written Below.

<zk>
    <window width="100%" height="100%"
        apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.test.MyGroupModelList ')">


        <listbox model="@bind(vm.summaryGroupModel.groupModel)">

            <listhead>
                <listheader label="Bill Number"></listheader>
                <listheader label="Bill Amount"></listheader>

            </listhead>

            <template name="model" var="Data">
                <listitem>
                    <listcell>
                        <label value="@load(Data.billNumber)" />
                    </listcell>
                    <listcell>
                        <label value="@load(Data.billAmount)" />
                    </listcell>

                </listitem>
            </template>
        </listbox>
    </window>
</zk>

Above code is not expanding first group present in MyGroupModelList.

Please help

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-07-01 06:51:32 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

This question answered Stackoverflow forum

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-06-27 09:25:00 +0800

Seen: 39 times

Last updated: Jul 01 '13

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