0

I have an issue loading dates in a listheader in zk.But i need load the same data in each day of the week, in my case the variable loadData is a List of Strings with two camps: {"atr1", "atr2"}, can anyone give me any idea

code:

<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>

The problem is that i have not the same data in columns for each day of the week.

I need something like this:

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

The problem is the listheader sort by name of my columns, and i have something like this:

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

but How can i resolve my issue, because i need load of a list, because the list is a query in my database.

Smern
  • 18,746
  • 21
  • 72
  • 90
user2768380
  • 151
  • 1
  • 5
  • 21
  • Show us How to create loadData List i mean to say add java code as well? –  Oct 09 '13 at 04:38
  • I am using somithing like: http://zkfiddle.org/sample/3op451q/12-Dynamic-Columns – user2768380 Oct 09 '13 at 21:55
  • So the result which is coming after running fiddle demo is wrong ? If yes what type of result you want? Its look ok to me because u set data in same manner. –  Oct 10 '13 at 04:34

0 Answers0