Revision history [back]

click to hide/show revision 1
initial version

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

sitansu gravatar image sitansu

http://java91.blogspot.in...

Listbox header and listcell not working fine in zk 7.0.1

Here's zul:

<zk> <window width="100%" height="400px" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('com.demo.viewmodel.FolderInfoEditViewModel')" vflex="true" hflex="true"> <style>div.z-calendar{ width:355px; }</style> <borderlayout> <north border="none"> <menubar width="100%"> <menuitem label="@load(vm.getText('ICON_ADD'))" image="/resource/image/insert.gif" visible="@load(vm.addButton)" onclick="@command('addFolderInfo')" tooltiptext="@load(vm.getText('ICON_ADD'))"/> <menuitem label="@load(vm.getText('ICON_DELETE'))" image="/resource/image/delete.gif" visible="@load(vm.deleteButton)" onclick="@command('deleteFolderInfo')" tooltiptext="@load(vm.getText('ICON_DELETE'))"/> <menuitem label="@load(vm.getText('ICON_SAVE'))" autodisable="save" image="/resource/image/save.gif" visible="@load(vm.showSave)" onclick="@command('saveFolderInfo')" tooltiptext="@load(vm.getText('ICON_SAVE'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:cancel'))" visible="@load(vm.showCancel)" onclick="@command('doCancelAutoAddPhase')" image="/resource/image/cancel.gif"/> <menuitem label="@load(vm.getText('ICON_REFRESH'))" image="/resource/image/refresh.gif" onclick="@command('refreshFolderInfo')" tooltiptext="@load(vm.getText('ICON_REFRESH'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" image="/resource/image/arrow_expand_all.gif" onclick="@command('expandAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" image="/resource/image/arrow_collapse_all.gif" onclick="@command('collapseAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))"/> <menu label="@load(vm.getText('FolderInfoDetail:VIEW'))" tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))"> <menupopup> <menuitem label="@load(vm.getText('FolderInfoDetail:EDIT_VIEW'))" onclick="@command('openEditView')"/> <menuitem label="@load(vm.getText('FolderInfoDetail:CODES_VIEW'))" onclick="@command('openCodesView')"/> </menupopup> </menu> <menuitem image="/resource/image/sortadhoc.gif" label="@load(vm.getText('ICON_SORT'))" onclick="@command('showSortingModel')" tooltiptext="@load(vm.getText('ICON_SORT'))"/> </menubar> </north>

<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" label="@load(vm.getText('FolderInfoDetail:LABEL_DESCRIPTION'))" width="45%" hflex="min"> </listheader> <listheader width="10%" hflex="min" image="/resource/image/flagwhite.gif"> </listheader> <listheader align="left" hflex="min" label="@load(vm.getText('FolderInfoDetail:LABEL_VALUE'))" 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
                                    if="${folderInfoData.infoType.code.equalsIgnoreCase('D') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
                                    <datebox hflex="1" readonly="true"
                                        value="@bind(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                        placeholder="@load(vm.getText('FolderInfoDetail:SELECT_DATE'))"
                                        tooltiptext="@load(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                        mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                        width="300px">
                                    </datebox>
                                </zk>
                                <zk
                                    if="${folderInfoData.infoType.code.equalsIgnoreCase('A') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
                                    <textbox
                                        value="@bind(folderInfoData.folderInfoRecord.infoValue)"
                                        placeholder="@load(vm.getText('FolderInfoDetail:ENTER_TEXT_NO'))"
                                        hflex="1" maxlength="400"
                                        mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                        tooltiptext="@load(folderInfoData.folderInfoRecord.infoValue)"
                                        multiline="true">
                                    </textbox>` 
                                </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

Listbox header and listcell not working fine in zk 7.0.1

Here's zul:

<zk> <window width="100%" height="400px" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('com.demo.viewmodel.FolderInfoEditViewModel')" vflex="true" hflex="true"> <style>div.z-calendar{ width:355px; }</style> <borderlayout> <north border="none"> <menubar width="100%"> <menuitem label="@load(vm.getText('ICON_ADD'))" image="/resource/image/insert.gif" visible="@load(vm.addButton)" onclick="@command('addFolderInfo')" tooltiptext="@load(vm.getText('ICON_ADD'))"/> <menuitem label="@load(vm.getText('ICON_DELETE'))" image="/resource/image/delete.gif" visible="@load(vm.deleteButton)" onclick="@command('deleteFolderInfo')" tooltiptext="@load(vm.getText('ICON_DELETE'))"/> <menuitem label="@load(vm.getText('ICON_SAVE'))" autodisable="save" image="/resource/image/save.gif" visible="@load(vm.showSave)" onclick="@command('saveFolderInfo')" tooltiptext="@load(vm.getText('ICON_SAVE'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:cancel'))" visible="@load(vm.showCancel)" onclick="@command('doCancelAutoAddPhase')" image="/resource/image/cancel.gif"/> <menuitem label="@load(vm.getText('ICON_REFRESH'))" image="/resource/image/refresh.gif" onclick="@command('refreshFolderInfo')" tooltiptext="@load(vm.getText('ICON_REFRESH'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" image="/resource/image/arrow_expand_all.gif" onclick="@command('expandAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))"/> <menuitem label="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" image="/resource/image/arrow_collapse_all.gif" onclick="@command('collapseAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))"/> <menu label="@load(vm.getText('FolderInfoDetail:VIEW'))" tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))"> <menupopup> <menuitem label="@load(vm.getText('FolderInfoDetail:EDIT_VIEW'))" onclick="@command('openEditView')"/> <menuitem label="@load(vm.getText('FolderInfoDetail:CODES_VIEW'))" onclick="@command('openCodesView')"/> </menupopup> </menu> <menuitem image="/resource/image/sortadhoc.gif" label="@load(vm.getText('ICON_SORT'))" onclick="@command('showSortingModel')" tooltiptext="@load(vm.getText('ICON_SORT'))"/> </menubar> </north>

<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" label="@load(vm.getText('FolderInfoDetail:LABEL_DESCRIPTION'))" width="45%" hflex="min"> </listheader> <listheader width="10%" hflex="min" image="/resource/image/flagwhite.gif"> </listheader> <listheader align="left" hflex="min" label="@load(vm.getText('FolderInfoDetail:LABEL_VALUE'))" width="45%"> </listheader> </listhead> <template name="model:group"> <listgroup label="@load(each)"/> </template> <template name="model" var="folderInfoData">

tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))">

 </menu>
                    <menuitem image="/resource/image/sortadhoc.gif"
                        label="@load(vm.getText('ICON_SORT'))"
                        onClick="@command('showSortingModel')"
                        tooltiptext="@load(vm.getText('ICON_SORT'))" />
                </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" 
                            label="@load(vm.getText('FolderInfoDetail:LABEL_DESCRIPTION'))"
                            width="45%"  hflex="min">
                        </listheader>
                        <listheader width="10%"  hflex="min"
                            image="/resource/image/flagwhite.gif">
                        </listheader>
                        <listheader align="left"  hflex="min"
                            label="@load(vm.getText('FolderInfoDetail:LABEL_VALUE'))"
                            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
                                    if="${folderInfoData.infoType.code.equalsIgnoreCase('D') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
                                    <datebox hflex="1" readonly="true"
                                        value="@bind(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                        placeholder="@load(vm.getText('FolderInfoDetail:SELECT_DATE'))"
                                        tooltiptext="@load(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                        mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                        width="300px">
                                    </datebox>
                                </zk>
                                <zk
                                    if="${folderInfoData.infoType.code.equalsIgnoreCase('A') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
                                    <textbox
                                        value="@bind(folderInfoData.folderInfoRecord.infoValue)"
                                        placeholder="@load(vm.getText('FolderInfoDetail:ENTER_TEXT_NO'))"
                                        hflex="1" maxlength="400"
                                        mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                        tooltiptext="@load(folderInfoData.folderInfoRecord.infoValue)"
                                        multiline="true">
                                    </textbox>` 
                                </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

Listbox header and listcell not working fine in zk 7.0.1

Here's zul:

 <zk>
        <window width="100%" height="400px" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('com.demo.viewmodel.FolderInfoEditViewModel')" 
            apply="org.zkoss.bind.BindComposer"
            viewModel="@id('vm') @init('com.demo.viewmodel.FolderInfoEditViewModel')"
            vflex="true" hflex="true">
            <style>div.z-calendar{ width:355px; }</style>
            <borderlayout>
                <north border="none">
                    <menubar width="100%">
                        <menuitem label="@load(vm.getText('ICON_ADD'))" label="@load(vm.getText('ICON_ADD'))"
                            image="/resource/image/insert.gif" visible="@load(vm.addButton)" onclick="@command('addFolderInfo')" tooltiptext="@load(vm.getText('ICON_ADD'))"/>
visible="@load(vm.addButton)"
                            onClick="@command('addFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_ADD'))" />
                        <menuitem label="@load(vm.getText('ICON_DELETE'))" image="/resource/image/delete.gif" visible="@load(vm.deleteButton)" onclick="@command('deleteFolderInfo')" tooltiptext="@load(vm.getText('ICON_DELETE'))"/>
label="@load(vm.getText('ICON_DELETE'))"
                            image="/resource/image/delete.gif"
                            visible="@load(vm.deleteButton)"
                            onClick="@command('deleteFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_DELETE'))" />
                        <menuitem label="@load(vm.getText('ICON_SAVE'))" label="@load(vm.getText('ICON_SAVE'))"
                            autodisable="save" image="/resource/image/save.gif" image="/resource/image/save.gif"
                            visible="@load(vm.showSave)" onclick="@command('saveFolderInfo')" tooltiptext="@load(vm.getText('ICON_SAVE'))"/>
onClick="@command('saveFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_SAVE'))" />
                        <menuitem
                            label="@load(vm.getText('FolderInfoDetail:cancel'))"
                            visible="@load(vm.showCancel)"
                            onClick="@command('doCancelAutoAddPhase')"
                            image="/resource/image/cancel.gif" />
                        <menuitem label="@load(vm.getText('FolderInfoDetail:cancel'))" visible="@load(vm.showCancel)" onclick="@command('doCancelAutoAddPhase')" image="/resource/image/cancel.gif"/>
                        <menuitem label="@load(vm.getText('ICON_REFRESH'))" image="/resource/image/refresh.gif" onclick="@command('refreshFolderInfo')" tooltiptext="@load(vm.getText('ICON_REFRESH'))"/>
                        <menuitem label="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" image="/resource/image/arrow_expand_all.gif" onclick="@command('expandAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))"/>
                        <menuitem label="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" image="/resource/image/arrow_collapse_all.gif" onclick="@command('collapseAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))"/>
                        <menu label="@load(vm.getText('FolderInfoDetail:VIEW'))" tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))">

label="@load(vm.getText('ICON_REFRESH'))" image="/resource/image/refresh.gif" onClick="@command('refreshFolderInfo')" tooltiptext="@load(vm.getText('ICON_REFRESH'))" /> <menuitem label="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" image="/resource/image/arrow_expand_all.gif" onClick="@command('expandAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" /> <menuitem label="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" image="/resource/image/arrow_collapse_all.gif" onClick="@command('collapseAll')" tooltiptext="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" /> <menu label="@load(vm.getText('FolderInfoDetail:VIEW'))" tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))">
                     </menu>
                     <menuitem image="/resource/image/sortadhoc.gif"
                         label="@load(vm.getText('ICON_SORT'))"
                         onClick="@command('showSortingModel')"
                         tooltiptext="@load(vm.getText('ICON_SORT'))" />
                 </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" 
                             label="@load(vm.getText('FolderInfoDetail:LABEL_DESCRIPTION'))"
                             width="45%"  hflex="min">
                         </listheader>
                         <listheader width="10%"  hflex="min"
                             image="/resource/image/flagwhite.gif">
                         </listheader>
                         <listheader align="left"  hflex="min"
                             label="@load(vm.getText('FolderInfoDetail:LABEL_VALUE'))"
                             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
                                     if="${folderInfoData.infoType.code.equalsIgnoreCase('D') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
                                     <datebox hflex="1" readonly="true"
                                         value="@bind(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                         placeholder="@load(vm.getText('FolderInfoDetail:SELECT_DATE'))"
                                         tooltiptext="@load(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                         mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                         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

Listbox header and listcell not working fine in zk 7.0.1

Here's zul: 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">

 <zk>
        <window width="100%" height="400px" 
            apply="org.zkoss.bind.BindComposer"
            viewModel="@id('vm') @init('com.demo.viewmodel.FolderInfoEditViewModel')"
            vflex="true" hflex="true">
            <style>div.z-calendar{ width:355px; }</style>
            <borderlayout>
         <north border="none">
             <menubar width="100%">
                 <menuitem label="@load(vm.getText('ICON_ADD'))"
                     image="/resource/image/insert.gif" visible="@load(vm.addButton)"
                            onClick="@command('addFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_ADD'))" />
                 <menuitem label="@load(vm.getText('ICON_DELETE'))"
                            image="/resource/image/delete.gif"
                            visible="@load(vm.deleteButton)"
                            onClick="@command('deleteFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_DELETE'))" image="/resource/image/delete.gif" />
                 <menuitem label="@load(vm.getText('ICON_SAVE'))"
                            autodisable="save" image="/resource/image/save.gif"
                            visible="@load(vm.showSave)" onClick="@command('saveFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_SAVE'))" i />
                        <menuitem
                            label="@load(vm.getText('FolderInfoDetail:cancel'))"
                            visible="@load(vm.showCancel)"
                            onClick="@command('doCancelAutoAddPhase')"
                            <menuitem image="/resource/image/cancel.gif" />
                 <menuitem label="@load(vm.getText('ICON_REFRESH'))"
                            image="/resource/image/refresh.gif"
                            onClick="@command('refreshFolderInfo')"
                            tooltiptext="@load(vm.getText('ICON_REFRESH'))" />
                        <menuitem
                            label="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))"
                             image="/resource/image/arrow_expand_all.gif"
                            onClick="@command('expandAll')"
                            tooltiptext="@load(vm.getText('FolderInfoDetail:EXPAND_ALL'))" <menuitem />
                        <menuitem
                            label="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))"
                             image="/resource/image/arrow_collapse_all.gif"
                            onClick="@command('collapseAll')"
                            tooltiptext="@load(vm.getText('FolderInfoDetail:COLLAPSE_ALL'))" <menuitem />
                        <menu
                            label="@load(vm.getText('FolderInfoDetail:VIEW'))"
                            tooltiptext="@load(vm.getText('FolderInfoDetail:VIEW'))">
<menu ">
  </menu>
                 <menuitem image="/resource/image/sortadhoc.gif"
                            label="@load(vm.getText('ICON_SORT'))"
                            onClick="@command('showSortingModel')"
                            tooltiptext="@load(vm.getText('ICON_SORT'))" />
             </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" 
                                label="@load(vm.getText('FolderInfoDetail:LABEL_DESCRIPTION'))"
                                width="45%" width="45%"
                        hflex="min">
                     </listheader>
                     <listheader width="10%"  hflex="min"
                         image="/resource/image/flagwhite.gif">
                     </listheader>
                     <listheader align="left"  hflex="min"
                                label="@load(vm.getText('FolderInfoDetail:LABEL_VALUE'))"
                                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 
        <image
                                    src="/resource/image/flagred.gif">
                                 </image>
                             </zk>
                         </listcell>
                         <listcell>
                                    <zk
                                        if="${folderInfoData.infoType.code.equalsIgnoreCase('D') and empty folderInfoData.folderInfoRecord.infoValueCrypt}">
        <zk>
                                <datebox hflex="1" readonly="true"
                                            value="@bind(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                            placeholder="@load(vm.getText('FolderInfoDetail:SELECT_DATE'))"
                                            tooltiptext="@load(folderInfoData.folderInfoRecord.infoValueDateTime) "
                                            mandatory="@load(folderInfoData.folderInfoRecord.valueRequired)"
                                            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>

</zk>

Here's my uI:

image description

Listbox header and listcell not working fine in zk 7.0.1

Here's zul: 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" />
                <menuitem autodisable="save" i />
                <menuitem image="/resource/image/cancel.gif" />
                <menuitem />
                <menuitem />
                <menuitem />
                <menu ">

                </menu>
                <menuitem />
            </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

Listbox header and listcell not working fine in zk 7.0.1

Here's zul:

<zk>
    <window width="100%" height="400px" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('com.demo.viewmodel.ViewModel')" height="400px"
        apply="org.zkoss.bind.BindComposer"
        viewModel="@id('vm') @init('com.demo.viewmodel.ViewModel')"
        vflex="true" hflex="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" />
                 <menuitem autodisable="save" i />
                 <menuitem image="/resource/image/cancel.gif" />
                 <menuitem />
                 <menuitem />
                 <menuitem />
                 <menu ">

                 </menu>
                 <menuitem />
             </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>

</zk>

Here's my uI:

image description

Listbox header and listcell not working fine in zk 7.0.1

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" />
                    <menuitem autodisable="save" i />
                    <menuitem image="/resource/image/cancel.gif" />
                    <menuitem />
                    <menuitem />
                    <menuitem />
                    <menu ">

                    </menu>
                    <menuitem />
                </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

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