0

我在 zk 的 listheader 中加载日期时遇到问题。但我需要在一周中的每一天加载相同的数据,在我的情况下,变量loadData是具有两个阵营的字符串列表:{“atr1”,“atr2”},谁能给我任何想法

代码:

<zk>
    <div apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('campaign.Campaign')">
        <window id="usersEdit">
            <listbox>
                <auxhead>
                    <auxheader colspan="2" class="topic">Lunes</auxheader>
                    <auxheader colspan="2" class="topic">Martes</auxheader>
                    <auxheader colspan="2" class="topic">Miercoles</auxheader>
                    <auxheader colspan="2" class="topic">Jueves</auxheader>
                    <auxheader colspan="2" class="topic">Viernes</auxheader>
                    <auxheader colspan="2" class="topic">Sabado</auxheader>
                    <auxheader colspan="2" class="topic">Domingo</auxheader>
                </auxhead>
                <listhead children="@load(vm.loadData)">
                    <template name="children" var="headerName">
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                        <listheader label="@load(headerName)" sort="auto"></listheader>
                    </template>
                </listhead>
            </listbox>
        </window>
    </div>
</zk>

问题是我在一周中的每一天的列中都没有相同的数据。

我需要这样的东西:

  lunes       martes       Miercoles      Jueves       Viernes       Sabado
atr1  atr2   atr1  atr2   atr1  atr2    atr1  atr2    atr1  atr2   atr1  atr2 ...

问题是 listheader 按我的列名排序,我有这样的事情:

  lunes       martes       Miercoles      Jueves       Viernes       Sabado
atr1  atr1   atr1  atr1   atr1  atr1    atr2  atr2    atr2  atr2   atr2  atr2 ...

但是我该如何解决我的问题,因为我需要加载一个列表,因为该列表是我数据库中的一个查询。

4

0 回答 0