5

Listbox header and listcell not working fine in zk 7.0.1

asked 2014-03-12 10:12:56 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

updated 2014-03-12 12:02:12 +0800

Here's zul:

<zk>
    <window width="100%" height="400px"
        apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.demo.viewmodel.ViewModel')"
        vflex="true" hflex="true">

        <borderlayout>
            <north border="none">
                <menubar width="100%">
                    <menuitem label="@load(vm.getText('ICON_ADD'))"
                        image="/resource/image/insert.gif" visible="@load(vm.addButton)"
                        tooltiptext="@load(vm.getText('ICON_ADD'))" />
                    <menuitem image="/resource/image/delete.gif" />
                </menubar>
            </north>
            <center border="none">
                <listbox id="folderInfoList" sizedByContent="false"
                    sclass="vertical-scroll" vflex="1" model="@load(vm.folderInfoList)"
                    emptyMessage="@load(vm.getText('FolderInfoDetail:LABEL_NOROWS'))"
                    selectedItems="@bind(vm.selectedFolderInfo)"
                    checkmark="@load(vm.data)" multiple="true">
                    <listhead>
                        <listheader align="left" width="45%"
                            hflex="min">
                        </listheader>
                        <listheader width="10%" hflex="min"
                            image="/resource/image/flagwhite.gif">
                        </listheader>
                        <listheader align="left" hflex="min"
                            width="45%">
                        </listheader>
                    </listhead>
                    <template name="model:group">
                        <listgroup label="@load(each)" />
                    </template>
                    <template name="model" var="folderInfoData">

                        <listitem>

                            <listcell>
                                <label
                                    value="@load(folderInfoData.infoDesc)"
                                    tooltiptext="@load(folderInfoData.infoDesc)">
                                </label>
                            </listcell>
                            <listcell>
                                <zk
                                    if="${folderInfoData.folderInfoRecord.mandatory}">
                                    <image
                                        src="/resource/image/flagred.gif">
                                    </image>
                                </zk>
                            </listcell>
                            <listcell>
                                <zk>
                                    <datebox hflex="1" readonly="true"
                                        width="300px">
                                    </datebox>
                                </zk>

                            </listcell>
                        </listitem>
                    </template>
                </listbox>
            </center>
            <south>
                <menubar width="100%" height="100%">
                    <menuitem
                        label="@load(vm.getText('FolderInfoDetail:BUTTON_ENCRYPT'))"
                        onClick="@command('encryptInfo')"
                        tooltiptext="@load(vm.getText('FolderInfoDetail:BUTTON_ENCRYPT'))" />
                </menubar>
            </south>
        </borderlayout>
    </window>
</zk>

Here's my uI:

image description

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-03-15 07:39:10 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

updated 2016-02-29 09:54:00 +0800

I have resolved this issue just removed the attribute sizedByContent="false" ,hflex="min" from listbox and listheader .

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: 2014-03-12 10:12:56 +0800

Seen: 35 times

Last updated: Feb 29 '16