-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Hi all,
I'm currently busy with a listbox with paging and who contains a groupsmodel.
<window mode="modal" title="Double booking moves" closable="true" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('be.chillworld.web.vm.participant.DoubleBookingVM')" width="70%" height="80%">
<listbox id="theGrid" model="@bind(vm.movements)" emptyMessage="No data" mold="paging" pageSize="5">
<listhead>
<listheader label="Move type" sort="auto" />
<listheader label="Start date" />
<listheader label="End date" />
</listhead>
<template name="model:group">
<listgroup label="@load(each)" />
</template>
<template name="model" var="move">
<listitem>
<listcell label="@load(move.moveType.description)" />
<listcell label="@load(move.effectifStartDate) @converter('formatedDate',format='dd/MM/yyyy HH:mm')" />
<listcell label="@load(move.effectifEndDate) @converter('formatedDate',format='dd/MM/yyyy HH:mm')" />
</listitem>
</template>
</listbox>
</window>
What I want is that the list show's me a full group in each page.
A group consist's of a participant and entries of double booking.(in compare of the booking we are making)
Normally this should be 1, but of course I leave an option to make the double booking.
So sometimes there could be 2 entries.
If I set the pagesize for example 5 and the double booked participants has 1 double booking => I get the group as last entry and the data as first entry of second page.(So you can't see all the data in 1 page and you must change page to see the whole entry)
If I set pageSize to 10, same thing if there is one with 2 double bookings.
Is there some solution for this problem?
Greetz chill.
2 | No.2 Revision |
Hi all,
I'm currently busy with a listbox with paging and who contains a groupsmodel.
<window mode="modal" title="Double booking moves" closable="true" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('be.chillworld.web.vm.participant.DoubleBookingVM')" width="70%" height="80%">
<listbox id="theGrid" model="@bind(vm.movements)" emptyMessage="No data" mold="paging" pageSize="5">
<listhead>
<listheader label="Move type" sort="auto" />
<listheader label="Start date" />
<listheader label="End date" />
</listhead>
<template name="model:group">
<listgroup label="@load(each)" />
</template>
<template name="model" var="move">
<listitem>
<listcell label="@load(move.moveType.description)" />
<listcell label="@load(move.effectifStartDate) @converter('formatedDate',format='dd/MM/yyyy HH:mm')" />
<listcell label="@load(move.effectifEndDate) @converter('formatedDate',format='dd/MM/yyyy HH:mm')" />
</listitem>
</template>
</listbox>
</window>
Part 1 :
What I want is that the list show's me a full group in each page.
A group consist's of a participant and entries of double booking.(in compare of the booking we are making)
Normally this should be 1, but of course I leave an option to make the double booking.
So sometimes there could be 2 entries.
If I set the pagesize for example 5 and the double booked participants has 1 double booking => I get the group as last entry and the data as first entry of second page.(So you can't see all the data in 1 page and you must change page to see the whole entry)
If I set pageSize to 10, same thing if there is one with 2 double bookings.
Is there some solution for this problem?
Part 2 :
Because I need to have the option open for create the booking, even if it's double, I need to able to select only the group.
I know how to do it with the rowrenderer, but is this also possible from the zul?
The details of the double booking, I don't need to select. (Because it's the participant who will be booked and not the booking itself)
Again, someone knows how to implement this in the zul?
Greetz chill.